31323334353637
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(InfoSchemaBatchCreator.class); @Override public RecordBatch getBatch(FragmentContext context, InfoSchemaSubScan config, List<RecordBatch> children) throws ExecutionSetupException { RecordReader rr = config.getTable().getRecordReader(context.getRootSchema()); return new ScanBatch(config, context, Collections.singleton(rr).iterator()); }
39404142434445
List<MockScanEntry> entries = config.getReadEntries(); List<RecordReader> readers = Lists.newArrayList(); for(MockScanEntry e : entries){ readers.add(new MockRecordReader(context, e)); } return new ScanBatch(config, context, readers.iterator()); }
30313233343536
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DirectBatchCreator.class); @Override public RecordBatch getBatch(FragmentContext context, DirectSubScan config, List<RecordBatch> children) throws ExecutionSetupException { return new ScanBatch(config, context, Collections.singleton(config.getReader()).iterator()); }
157158159160161162163
for (int i = 0; i < numParts; i++) { selectedPartitionColumns.add(i); } } return new ScanBatch(scan, context, readers.iterator(), partitionColumns, selectedPartitionColumns); }
139140141142143144145
for (int i = 0; i < numParts; i++) { selectedPartitionColumns.add(i); } } return new ScanBatch(rowGroupScan, context, readers.iterator(), partitionColumns, selectedPartitionColumns); }
66676869707172
if (readers.size() == 0) { readers.add(new HiveRecordReader(table, null, null, config.getColumns(), context, config.getHiveReadEntry().hiveConfigOverride)); } return new ScanBatch(config, context, readers.iterator()); }
47484950515253
readers.add(new HBaseRecordReader(subScan.getStorageConfig().getHBaseConf(), scanSpec, columns, context)); } catch (Exception e1) { throw new ExecutionSetupException(e1); } } return new ScanBatch(subScan, context, readers.iterator()); }
162163164165166167168
142143144145146147148149150151152153154
for (int i = 0; i < numParts; i++) { selectedPartitionColumns.add(i); } } ScanBatch s = new ScanBatch(rowGroupScan, context, readers.iterator(), partitionColumns, selectedPartitionColumns); for(RecordReader r : readers){ r.setOperatorContext(s.getOperatorContext()); } return s; }
60616263646566
logger.error(e.getMessage(), e); throw new ExecutionSetupException(e); } } logger.info("Number of record readers initialized : " + readers.size()); return new ScanBatch(subScan, context, readers.iterator()); }