VectorizedOrcAcidRowReader(AcidInputFormat.RowReader <OrcStruct> inner, Configuration conf, FileSplit split) { this.innerReader = inner; this.key = inner.createKey(); this.rowBatchCtx = new VectorizedRowBatchCtx(); this.value = inner.createValue(); this.objectInspector = inner.getObjectInspector(); try { rowBatchCtx.init(conf, split); } catch (ClassNotFoundException e) { throw new IOException("Failed to initialize context", e); } catch (SerDeException e) { throw new IOException("Failed to initialize context", e); } catch (InstantiationException e) { throw new IOException("Failed to initialize context", e); } catch (IllegalAccessException e) { throw new IOException("Failed to initialize context", e); } catch (HiveException e) { throw new IOException("Failed to initialize context", e); } }
VectorizedOrcRecordReader(Reader file, Configuration conf, FileSplit fileSplit) { List <OrcProto.Type> types = file.getTypes(); Reader.Options options = new Reader.Options(); this.offset = fileSplit.getStart(); this.length = fileSplit.getLength(); options.range(offset, length); options.include(OrcInputFormat.genIncludedColumns(types, conf, true)); OrcInputFormat.setSearchArgument(options, types, conf, true); this.reader = file.rowsOptions(options); try { rbCtx = new VectorizedRowBatchCtx(); rbCtx.init(conf, fileSplit); } catch (Exception e) { throw; } }