|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.mapreduce.MultiTableSnapshotInputFormatImpl
@InterfaceAudience.LimitedPrivate(value="HBase") @InterfaceStability.Evolving public class MultiTableSnapshotInputFormatImpl
Shared implementation of mapreduce code over multiple table snapshots.
Utilized by both mapreduce (.MultiTableSnapshotInputFormat and mapred
(MultiTableSnapshotInputFormat implementations.
| Field Summary | |
|---|---|
static String |
RESTORE_DIRS_KEY
|
static String |
SNAPSHOT_TO_SCANS_KEY
|
| Constructor Summary | |
|---|---|
MultiTableSnapshotInputFormatImpl()
|
|
| Method Summary | |
|---|---|
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 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) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RESTORE_DIRS_KEY
public static final String SNAPSHOT_TO_SCANS_KEY
| Constructor Detail |
|---|
public MultiTableSnapshotInputFormatImpl()
| Method Detail |
|---|
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 from
IOException
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 -> listIOException
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 from
IOException
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 on
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||