Class MultiValueVarByteRawIndexCreator

    • Constructor Detail

      • MultiValueVarByteRawIndexCreator

        public MultiValueVarByteRawIndexCreator​(File baseIndexDir,
                                                ChunkCompressionType compressionType,
                                                String column,
                                                int totalDocs,
                                                FieldSpec.DataType valueType,
                                                int maxRowLengthInBytes,
                                                int maxNumberOfElements)
                                         throws IOException
        Create a var-byte raw index creator for the given column
        Parameters:
        baseIndexDir - Index directory
        compressionType - Type of compression to use
        column - Name of column to index
        totalDocs - Total number of documents to index
        valueType - Type of the values
        maxRowLengthInBytes - the length in bytes of the largest row
        maxNumberOfElements - the maximum number of elements in a row
        Throws:
        IOException
      • MultiValueVarByteRawIndexCreator

        public MultiValueVarByteRawIndexCreator​(File baseIndexDir,
                                                ChunkCompressionType compressionType,
                                                String column,
                                                int totalDocs,
                                                FieldSpec.DataType valueType,
                                                int writerVersion,
                                                int maxRowLengthInBytes,
                                                int maxNumberOfElements)
                                         throws IOException
        Create a var-byte raw index creator for the given column
        Parameters:
        baseIndexDir - Index directory
        compressionType - Type of compression to use
        column - Name of column to index
        totalDocs - Total number of documents to index
        valueType - Type of the values
        maxRowLengthInBytes - the size in bytes of the largest row, the chunk size cannot be smaller than this
        maxNumberOfElements - the maximum number of elements in a row
        writerVersion - writer format version
        Throws:
        IOException
    • Method Detail

      • getElementLengthStoragePrefixInBytes

        public static int getElementLengthStoragePrefixInBytes​(int maxNumberOfElements)
        The actual content in an MV array is prepended with 2 prefixes: 1. elementLengthStoragePrefixInBytes - bytes required to store the length of each element in the largest array 2. numElementsStoragePrefixInBytes - Number of elements in the array This function returns the total bytes needed to store (1) elementLengthStoragePrefixInBytes
      • getNumElementsStoragePrefix

        public static int getNumElementsStoragePrefix()
        The actual content in an MV array is prepended with 2 prefixes: 1. elementLengthStoragePrefixInBytes - bytes required to store the length of each element in the largest array 2. numElementsStoragePrefixInBytes - Number of elements in the array This function returns the bytes needed to store (2) numElementsStoragePrefixInBytes
      • getTotalRowStorageBytes

        public static int getTotalRowStorageBytes​(int maxNumberOfElements,
                                                  int maxRowDataLengthInBytes)
        The actual content in an MV array is prepended with 2 prefixes: 1. elementLengthStoragePrefixInBytes - bytes required to store the length of each element in the largest array 2. numElementsStoragePrefixInBytes - Number of elements in the array This function returns the bytes needed to store the (1), (2) and the actual content.
      • getMaxRowDataLengthInBytes

        public static int getMaxRowDataLengthInBytes​(int totalMaxLength,
                                                     int maxNumberOfElements)
        The actual content in an MV array is prepended with 2 prefixes: 1. elementLengthStoragePrefixInBytes - bytes required to store the length of each element in the largest array 2. numberOfElementsStoragePrefix - Number of elements in the array This function returns the bytes needed to store the actual content.