@InterfaceAudience.Private @InterfaceStability.Evolving public class TableSnapshotInputFormatImpl extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TableSnapshotInputFormatImpl.InputSplit
Implementation class for InputSplit logic common between mapred and mapreduce.
|
static class |
TableSnapshotInputFormatImpl.RecordReader
Implementation class for RecordReader logic common between mapred and mapreduce.
|
| Constructor and Description |
|---|
TableSnapshotInputFormatImpl() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
getBestLocations(Configuration conf,
HDFSBlocksDistribution blockDistribution)
This computes the locations to be passed from the InputSplit.
|
static java.util.List<TableSnapshotInputFormatImpl.InputSplit> |
getSplits(Configuration conf) |
static void |
setInput(Configuration conf,
java.lang.String snapshotName,
Path restoreDir)
Configures the job to use TableSnapshotInputFormat to read from a snapshot.
|
public static java.util.List<TableSnapshotInputFormatImpl.InputSplit> getSplits(Configuration conf) throws java.io.IOException
java.io.IOExceptionpublic static java.util.List<java.lang.String> getBestLocations(Configuration conf,
HDFSBlocksDistribution blockDistribution)
public static void setInput(Configuration conf,
java.lang.String snapshotName,
Path restoreDir)
throws java.io.IOException
conf - the job to configurationsnapshotName - the name of the snapshot to read fromrestoreDir - 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.java.io.IOException - if an error occurs