@Override public Configuration getConf() { return tableInputFormat.getConf(); } }
/** * If there is an open hash batch, complete it and sync if there are diffs. * Start a new batch, and seek to read the */ private void moveToNextBatch(Context context) throws IOException, InterruptedException { if (targetHasher.isBatchStarted()) { finishBatchAndCompareHashes(context); } targetHasher.startBatch(nextSourceKey); currentSourceHash = sourceHashReader.getCurrentHash(); findNextKeyHashPair(); }
public int getAttributeKeyOffset() { if (hasAttributes()) { return getColumnOffset(attrKeyColumnIndex); } else { return DEFAULT_ATTRIBUTES_COLUMN_INDEX; } }
private void initCopyTableMapperReducerJob(Job job, Scan scan) throws IOException { Class<? extends TableMapper> mapper = bulkload ? CellImporter.class : Importer.class; if (readingSnapshot) { TableMapReduceUtil.initTableSnapshotMapperJob(snapshot, scan, mapper, null, null, job, true, generateUniqTempDir(true)); } else { TableMapReduceUtil.initTableMapperJob(tableName, scan, mapper, null, null, job); } }
@Override protected void initJob(List<Scan> scans, Job job) throws IOException { TableMapReduceUtil.initTableMapperJob(scans, ScanMapper.class, ImmutableBytesWritable.class, ImmutableBytesWritable.class, job); } }
@Override public List<InputSplit> getSplits(final JobContext jobContext) throws IOException, InterruptedException { return this.tableInputFormat.getSplits(jobContext); }
public int getAttributeKeyLength() { if (hasAttributes()) { return getColumnLength(attrKeyColumnIndex); } else { return DEFAULT_ATTRIBUTES_COLUMN_INDEX; } }
public int getCellVisibilityColumnOffset() { if (hasCellVisibility()) { return getColumnOffset(cellVisibilityColumnIndex); } else { return DEFAULT_CELL_VISIBILITY_COLUMN_INDEX; } }
public int getCellTTLColumnLength() { if (hasCellTTL()) { return getColumnLength(cellTTLColumnIndex); } else { return DEFAULT_CELL_TTL_COLUMN_INDEX; } }
@Override public void close() throws IOException { trr.close(); closeTable(); }
public int getCellVisibilityColumnLength() { if (hasCellVisibility()) { return getColumnLength(cellVisibilityColumnIndex); } else { return DEFAULT_CELL_VISIBILITY_COLUMN_INDEX; } }
public int getCellTTLColumnOffset() { if (hasCellTTL()) { return getColumnOffset(cellTTLColumnIndex); } else { return DEFAULT_CELL_TTL_COLUMN_INDEX; } }
@Override public void initialize(final InputSplit inputSplit, final TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException { reader.initialize(inputSplit, taskAttemptContext); }
@Override public boolean nextKeyValue() throws IOException, InterruptedException { return reader.nextKeyValue(); }
@Override public void close() throws IOException { this.reader.close(); }
@Override public float getProgress() { return this.reader.getProgress(); }
@Override protected void initializeTable(Connection connection, TableName tableName) throws IOException { super.initializeTable(connection, tableName); ConnectionForMergeTesting cft = (ConnectionForMergeTesting) connection; sizeCalculator = cft.getRegionSizeCalculator(); }
@Override protected void initJob(List<Scan> scans, Job job) throws IOException { TableMapReduceUtil .initMultiTableSnapshotMapperJob(getSnapshotScanMapping(scans), ScanMapper.class, ImmutableBytesWritable.class, ImmutableBytesWritable.class, job, true, restoreDir); }
@Override protected void reduce(ImmutableBytesWritable key, Iterable<ImmutableBytesWritable> values, Context context) throws IOException, InterruptedException { makeAssertions(key, values); }
/** * Closes this stream and releases any system resources associated * with it. If the stream is already closed then invoking this * method has no effect. * * @throws IOException if an I/O error occurs */ @Override public void close() throws IOException { super.cleanup(this.jobConf); }