@InterfaceAudience.Private @InterfaceStability.Evolving public class TableSnapshotInputFormatImpl extends 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.
|
Modifier and Type | Field and Description |
---|---|
private static float |
DEFAULT_LOCALITY_CUTOFF_MULTIPLIER |
private static String |
LOCALITY_CUTOFF_MULTIPLIER
|
static org.apache.commons.logging.Log |
LOG |
protected static String |
RESTORE_DIR_KEY |
private static String |
SNAPSHOT_NAME_KEY |
Constructor and Description |
---|
TableSnapshotInputFormatImpl() |
Modifier and Type | Method and Description |
---|---|
static Scan |
extractScanFromConf(org.apache.hadoop.conf.Configuration conf) |
static List<String> |
getBestLocations(org.apache.hadoop.conf.Configuration conf,
HDFSBlocksDistribution blockDistribution)
This computes the locations to be passed from the InputSplit.
|
static List<HRegionInfo> |
getRegionInfosFromManifest(SnapshotManifest manifest) |
static SnapshotManifest |
getSnapshotManifest(org.apache.hadoop.conf.Configuration conf,
String snapshotName,
org.apache.hadoop.fs.Path rootDir,
org.apache.hadoop.fs.FileSystem fs) |
private static String |
getSnapshotName(org.apache.hadoop.conf.Configuration conf) |
static List<TableSnapshotInputFormatImpl.InputSplit> |
getSplits(org.apache.hadoop.conf.Configuration conf) |
static List<TableSnapshotInputFormatImpl.InputSplit> |
getSplits(Scan scan,
SnapshotManifest manifest,
List<HRegionInfo> regionManifests,
org.apache.hadoop.fs.Path restoreDir,
org.apache.hadoop.conf.Configuration conf) |
static void |
setInput(org.apache.hadoop.conf.Configuration conf,
String snapshotName,
org.apache.hadoop.fs.Path restoreDir)
Configures the job to use TableSnapshotInputFormat to read from a snapshot.
|
public static final org.apache.commons.logging.Log LOG
private static final String SNAPSHOT_NAME_KEY
protected static final String RESTORE_DIR_KEY
private static final String LOCALITY_CUTOFF_MULTIPLIER
private static final float DEFAULT_LOCALITY_CUTOFF_MULTIPLIER
public static List<TableSnapshotInputFormatImpl.InputSplit> getSplits(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static List<HRegionInfo> getRegionInfosFromManifest(SnapshotManifest manifest)
public static SnapshotManifest getSnapshotManifest(org.apache.hadoop.conf.Configuration conf, String snapshotName, org.apache.hadoop.fs.Path rootDir, org.apache.hadoop.fs.FileSystem fs) throws IOException
IOException
public static Scan extractScanFromConf(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static List<TableSnapshotInputFormatImpl.InputSplit> getSplits(Scan scan, SnapshotManifest manifest, List<HRegionInfo> regionManifests, org.apache.hadoop.fs.Path restoreDir, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static List<String> getBestLocations(org.apache.hadoop.conf.Configuration conf, HDFSBlocksDistribution blockDistribution)
private static String getSnapshotName(org.apache.hadoop.conf.Configuration conf)
public static void setInput(org.apache.hadoop.conf.Configuration conf, String snapshotName, org.apache.hadoop.fs.Path restoreDir) throws IOException
conf
- the job to configuresnapshotName
- 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.IOException
- if an error occursCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.