Interface CompactionUDF

All Superinterfaces:
Serializable

public interface CompactionUDF extends Serializable
This interface provides control over how the data is compacted in the index layer.

The interface provides one method for merging the data that has same indexing attributes.

Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    merge(Map<String,Object> keys, Iterator<byte[]> files)
    Merges all files in user-defined format and returns an array of bytes.
  • Method Details

    • merge

      byte[] merge(Map<String,Object> keys, Iterator<byte[]> files)
      Merges all files in user-defined format and returns an array of bytes.

      These bytes will be re-archived in a blob-store and the corresponding indexing attributes with updated metadata will be available in the index layer for querying.

      The user-defined format has to be the same as the one used when aggregating the messages.

      Parameters:
      keys - a collection containing same index attribute values for a group of files to be compacted
      files - a collection containing indexed files to be merged for query efficiency
      Returns:
      the resulting byte array to be re-archived to blob-store or a null value if an error is encountered