@Override public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { List<TableSnapshotInputFormatImpl.InputSplit> splits = delegate.getSplits(job); InputSplit[] results = new InputSplit[splits.size()]; for (int i = 0; i < splits.size(); i++) { results[i] = new TableSnapshotRegionSplit(splits.get(i)); } return results; }
@Override public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { List<TableSnapshotInputFormatImpl.InputSplit> splits = TableSnapshotInputFormatImpl.getSplits(job); InputSplit[] results = new InputSplit[splits.size()]; for (int i = 0; i < splits.size(); i++) { results[i] = new TableSnapshotRegionSplit(splits.get(i)); } return results; }
public TableSnapshotRegionSplit() { this.delegate = new TableSnapshotInputFormatImpl.InputSplit(); }
public TableSnapshotRegionSplit(TableSnapshotInputFormatImpl.InputSplit delegate) { this.delegate = delegate; }
public TableSnapshotRegionSplit(HTableDescriptor htd, HRegionInfo regionInfo, List<String> locations, Scan scan, Path restoreDir) { this.delegate = new TableSnapshotInputFormatImpl.InputSplit(htd, regionInfo, locations, scan, restoreDir); }
public TableSnapshotRecordReader(TableSnapshotRegionSplit split, JobConf job) throws IOException { delegate = new TableSnapshotInputFormatImpl.RecordReader(); delegate.initialize(split.delegate, job); }
public TableSnapshotRegionSplit(HTableDescriptor htd, HRegionInfo regionInfo, List<String> locations) { this.delegate = new TableSnapshotInputFormatImpl.InputSplit(htd, regionInfo, locations); }
public TableSnapshotRegionSplit(String regionName, List<String> locations) { this.delegate = new TableSnapshotInputFormatImpl.InputSplit(regionName, locations); }
/** * Configures the job to use TableSnapshotInputFormat to read from a snapshot. * @param job the job to configure * @param snapshotName the name of the snapshot to read from * @param restoreDir a temporary directory to restore the snapshot into. Current user should * have write permissions to this directory, and this should not be a subdirectory of rootdir. * After the job is finished, restoreDir can be deleted. * @throws IOException if an error occurs */ public static void setInput(JobConf job, String snapshotName, Path restoreDir) throws IOException { TableSnapshotInputFormatImpl.setInput(job, snapshotName, restoreDir); }
/** * Configures the job to use TableSnapshotInputFormat to read from a snapshot. * @param job the job to configure * @param snapshotName the name of the snapshot to read from * @param restoreDir a temporary directory to restore the snapshot into. Current user should * have write permissions to this directory, and this should not be a subdirectory of rootdir. * After the job is finished, restoreDir can be deleted. * @param splitAlgo split algorithm to generate splits from region * @param numSplitsPerRegion how many input splits to generate per one region * @throws IOException if an error occurs */ public static void setInput(JobConf job, String snapshotName, Path restoreDir, RegionSplitter.SplitAlgorithm splitAlgo, int numSplitsPerRegion) throws IOException { TableSnapshotInputFormatImpl.setInput(job, snapshotName, restoreDir, splitAlgo, numSplitsPerRegion); }