Package org.apache.flink.orc.shim
Class OrcShimV200
java.lang.Object
org.apache.flink.orc.shim.OrcShimV200
- All Implemented Interfaces:
Serializable,OrcShim<org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch>
- Direct Known Subclasses:
OrcShimV210
public class OrcShimV200
extends Object
implements OrcShim<org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch>
Shim orc for Hive version 2.0.0 and upper versions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean[]computeProjectionMask(org.apache.orc.TypeDescription schema, int[] selectedFields) Computes the ORC projection mask of the fields to include from the selected fields.rowOrcInputFormat.nextRecord(null).createBatchWrapper(org.apache.orc.TypeDescription schema, int batchSize) protected org.apache.orc.ReadercreateReader(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) org.apache.orc.RecordReadercreateRecordReader(org.apache.hadoop.conf.Configuration conf, org.apache.orc.TypeDescription schema, int[] selectedFields, List<OrcFilters.Predicate> conjunctPredicates, org.apache.flink.core.fs.Path path, long splitStart, long splitLength) Create orcRecordReaderfrom conf, schema and etc...protected org.apache.orc.RecordReadercreateRecordReader(org.apache.orc.Reader reader, org.apache.orc.Reader.Options options) getOffsetAndLengthForSplit(long splitStart, long splitLength, List<org.apache.orc.StripeInformation> stripes) booleannextBatch(org.apache.orc.RecordReader reader, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch rowBatch) Read the next row batch.protected org.apache.orc.Reader.OptionsreadOrcConf(org.apache.orc.Reader.Options options, org.apache.hadoop.conf.Configuration conf)
-
Constructor Details
-
OrcShimV200
public OrcShimV200()
-
-
Method Details
-
createReader
protected org.apache.orc.Reader createReader(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
createRecordReader
protected org.apache.orc.RecordReader createRecordReader(org.apache.orc.Reader reader, org.apache.orc.Reader.Options options) throws IOException - Throws:
IOException
-
readOrcConf
protected org.apache.orc.Reader.Options readOrcConf(org.apache.orc.Reader.Options options, org.apache.hadoop.conf.Configuration conf) -
createRecordReader
public org.apache.orc.RecordReader createRecordReader(org.apache.hadoop.conf.Configuration conf, org.apache.orc.TypeDescription schema, int[] selectedFields, List<OrcFilters.Predicate> conjunctPredicates, org.apache.flink.core.fs.Path path, long splitStart, long splitLength) throws IOException Description copied from interface:OrcShimCreate orcRecordReaderfrom conf, schema and etc...- Specified by:
createRecordReaderin interfaceOrcShim<org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch>- Throws:
IOException
-
createBatchWrapper
- Specified by:
createBatchWrapperin interfaceOrcShim<org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch>
-
nextBatch
public boolean nextBatch(org.apache.orc.RecordReader reader, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch rowBatch) throws IOException Description copied from interface:OrcShimRead the next row batch.- Specified by:
nextBatchin interfaceOrcShim<org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch>- Throws:
IOException
-
getOffsetAndLengthForSplit
-
computeProjectionMask
public static boolean[] computeProjectionMask(org.apache.orc.TypeDescription schema, int[] selectedFields) Computes the ORC projection mask of the fields to include from the selected fields.rowOrcInputFormat.nextRecord(null).- Returns:
- The ORC projection mask.
-