@InterfaceAudience.LimitedPrivate(value="HBase") @InterfaceStability.Evolving public class MultiTableSnapshotInputFormatImpl extends Object
.MultiTableSnapshotInputFormat
and mapred
(MultiTableSnapshotInputFormat
implementations.Modifier and Type | Field and Description |
---|---|
static String |
RESTORE_DIRS_KEY |
static String |
SNAPSHOT_TO_SCANS_KEY |
Constructor and Description |
---|
MultiTableSnapshotInputFormatImpl() |
Modifier and Type | Method and Description |
---|---|
Map<String,org.apache.hadoop.fs.Path> |
getSnapshotDirs(org.apache.hadoop.conf.Configuration conf)
Retrieve the directories into which snapshots have been restored from
(
RESTORE_DIRS_KEY ) |
Map<String,Collection<Scan>> |
getSnapshotsToScans(org.apache.hadoop.conf.Configuration conf)
Retrieve the snapshot name -> list<scan> mapping pushed to configuration by
setSnapshotToScans(org.apache.hadoop.conf.Configuration, java.util.Map) |
List<TableSnapshotInputFormatImpl.InputSplit> |
getSplits(org.apache.hadoop.conf.Configuration conf)
Return the list of splits extracted from the scans/snapshots pushed to conf by
setInput(org.apache.hadoop.conf.Configuration, java.util.Map, org.apache.hadoop.fs.Path) |
void |
restoreSnapshots(org.apache.hadoop.conf.Configuration conf,
Map<String,org.apache.hadoop.fs.Path> snapshotToDir,
org.apache.hadoop.fs.FileSystem fs)
Restore each (snapshot name, restore directory) pair in snapshotToDir
|
void |
setInput(org.apache.hadoop.conf.Configuration conf,
Map<String,Collection<Scan>> snapshotScans,
org.apache.hadoop.fs.Path restoreDir)
Configure conf to read from snapshotScans, with snapshots restored to a subdirectory of
restoreDir.
|
void |
setSnapshotDirs(org.apache.hadoop.conf.Configuration conf,
Map<String,org.apache.hadoop.fs.Path> snapshotDirs) |
void |
setSnapshotToScans(org.apache.hadoop.conf.Configuration conf,
Map<String,Collection<Scan>> snapshotScans)
Push snapshotScans to conf (under the key
SNAPSHOT_TO_SCANS_KEY ) |
public static final String RESTORE_DIRS_KEY
public static final String SNAPSHOT_TO_SCANS_KEY
public void setInput(org.apache.hadoop.conf.Configuration conf, Map<String,Collection<Scan>> snapshotScans, org.apache.hadoop.fs.Path restoreDir) throws IOException
RESTORE_DIRS_KEY
, SNAPSHOT_TO_SCANS_KEY
conf
- snapshotScans
- restoreDir
- IOException
public List<TableSnapshotInputFormatImpl.InputSplit> getSplits(org.apache.hadoop.conf.Configuration conf) throws IOException
setInput(org.apache.hadoop.conf.Configuration, java.util.Map, org.apache.hadoop.fs.Path)
conf
- Configuration to determine splits fromIOException
public Map<String,Collection<Scan>> getSnapshotsToScans(org.apache.hadoop.conf.Configuration conf) throws IOException
setSnapshotToScans(org.apache.hadoop.conf.Configuration, java.util.Map)
conf
- Configuration to extract name -> list<scan> mappings from.IOException
public void setSnapshotToScans(org.apache.hadoop.conf.Configuration conf, Map<String,Collection<Scan>> snapshotScans) throws IOException
SNAPSHOT_TO_SCANS_KEY
)conf
- snapshotScans
- IOException
public Map<String,org.apache.hadoop.fs.Path> getSnapshotDirs(org.apache.hadoop.conf.Configuration conf) throws IOException
RESTORE_DIRS_KEY
)conf
- Configuration to extract restore directories fromIOException
public void setSnapshotDirs(org.apache.hadoop.conf.Configuration conf, Map<String,org.apache.hadoop.fs.Path> snapshotDirs)
public void restoreSnapshots(org.apache.hadoop.conf.Configuration conf, Map<String,org.apache.hadoop.fs.Path> snapshotToDir, org.apache.hadoop.fs.FileSystem fs) throws IOException
conf
- configuration to restore withsnapshotToDir
- mapping from snapshot names to restore directoriesfs
- filesystem to do snapshot restoration onIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.