Class GroupVIntUtil


  • public final class GroupVIntUtil
    extends Object
    This class contains utility methods and constants for group varint
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • GroupVIntUtil

        public GroupVIntUtil()
    • Method Detail

      • readGroupVInt

        public static void readGroupVInt​(DataInput in,
                                         long[] dst,
                                         int offset)
                                  throws IOException
        Default implementation of read single group, for optimal performance, you should use DataInput.readGroupVInts(long[], int) instead.
        Parameters:
        dst - the array to read ints into.
        offset - the offset in the array to start storing ints.
        Throws:
        IOException
      • readGroupVInt

        public static int readGroupVInt​(DataInput in,
                                        long remaining,
                                        GroupVIntUtil.IntReader reader,
                                        long pos,
                                        long[] dst,
                                        int offset)
                                 throws IOException
        Faster implementation of read single group, It read values from the buffer that would not cross boundaries.
        Parameters:
        in - the input to use to read data.
        remaining - the number of remaining bytes allowed to read for current block/segment.
        reader - the supplier of read int.
        pos - the start pos to read from the reader.
        dst - the array to read ints into.
        offset - the offset in the array to start storing ints.
        Returns:
        the number of bytes read excluding the flag. this indicates the number of positions should to be increased for caller, it is 0 or positive number and less than MAX_LENGTH_PER_GROUP
        Throws:
        IOException