public class RecordReaderUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RecordReaderUtils.ByteBufferAllocatorPool |
Constructor and Description |
---|
RecordReaderUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addEntireStreamToRanges(long offset,
long length,
DiskRangeList.CreateHelper list,
boolean doMergeBuffers) |
static void |
addRgFilteredStreamToRanges(OrcProto.Stream stream,
boolean[] includedRowGroups,
boolean isCompressed,
OrcProto.RowIndex index,
OrcProto.ColumnEncoding encoding,
OrcProto.Type type,
int compressionSize,
boolean hasNull,
long offset,
long length,
DiskRangeList.CreateHelper list,
boolean doMergeBuffers) |
static DataReader |
createDefaultDataReader(DataReaderProperties properties) |
static long |
estimateRgEndOffset(boolean isCompressed,
boolean isLast,
long nextGroupOffset,
long streamLength,
int bufferSize) |
static boolean[] |
findPresentStreamsByColumn(List<OrcProto.Stream> streamList,
List<OrcProto.Type> types) |
static int |
getIndexPosition(OrcProto.ColumnEncoding.Kind columnEncoding,
OrcProto.Type.Kind columnType,
OrcProto.Stream.Kind streamType,
boolean isCompressed,
boolean hasNulls)
Get the offset in the index positions for the column that the given
stream starts.
|
static boolean |
isDictionary(OrcProto.Stream.Kind kind,
OrcProto.ColumnEncoding encoding)
Is this stream part of a dictionary?
|
static String |
stringifyDiskRanges(DiskRangeList range)
Build a string representation of a list of disk ranges.
|
public static DataReader createDefaultDataReader(DataReaderProperties properties)
public static boolean[] findPresentStreamsByColumn(List<OrcProto.Stream> streamList, List<OrcProto.Type> types)
public static void addEntireStreamToRanges(long offset, long length, DiskRangeList.CreateHelper list, boolean doMergeBuffers)
public static void addRgFilteredStreamToRanges(OrcProto.Stream stream, boolean[] includedRowGroups, boolean isCompressed, OrcProto.RowIndex index, OrcProto.ColumnEncoding encoding, OrcProto.Type type, int compressionSize, boolean hasNull, long offset, long length, DiskRangeList.CreateHelper list, boolean doMergeBuffers)
public static long estimateRgEndOffset(boolean isCompressed, boolean isLast, long nextGroupOffset, long streamLength, int bufferSize)
public static int getIndexPosition(OrcProto.ColumnEncoding.Kind columnEncoding, OrcProto.Type.Kind columnType, OrcProto.Stream.Kind streamType, boolean isCompressed, boolean hasNulls)
columnEncoding
- the encoding of the columncolumnType
- the type of the columnstreamType
- the kind of the streamisCompressed
- is the file compressedhasNulls
- does the column have a PRESENT stream?public static boolean isDictionary(OrcProto.Stream.Kind kind, OrcProto.ColumnEncoding encoding)
public static String stringifyDiskRanges(DiskRangeList range)
range
- ranges to stringifyCopyright © 2016 The Apache Software Foundation. All rights reserved.