Repository: hbase Updated Branches: refs/heads/branch-1 a6cf9c51d -> ee5263db8
HBASE-13671 More classes to add to org.apache.hadoop.hbase.mapreduce.driver (li xiang) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ee5263db Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ee5263db Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ee5263db Branch: refs/heads/branch-1 Commit: ee5263db8cf38a30c6bd893a3cc0171dd02cd9bb Parents: a6cf9c5 Author: Jerry He <jerry...@apache.org> Authored: Fri May 22 12:40:27 2015 -0700 Committer: Jerry He <jerry...@apache.org> Committed: Fri May 22 12:40:27 2015 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/mapreduce/Driver.java | 12 +++++++++--- .../apache/hadoop/hbase/snapshot/ExportSnapshot.java | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/ee5263db/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Driver.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Driver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Driver.java index 4371894..9737b55 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Driver.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Driver.java @@ -22,6 +22,7 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; import org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication; +import org.apache.hadoop.hbase.snapshot.ExportSnapshot; import org.apache.hadoop.util.ProgramDriver; /** @@ -37,21 +38,26 @@ public class Driver { */ public static void main(String[] args) throws Throwable { ProgramDriver pgd = new ProgramDriver(); + pgd.addClass(RowCounter.NAME, RowCounter.class, - "Count rows in HBase table"); + "Count rows in HBase table."); pgd.addClass(CellCounter.NAME, CellCounter.class, - "Count cells in HBase table"); + "Count cells in HBase table."); pgd.addClass(Export.NAME, Export.class, "Write table data to HDFS."); pgd.addClass(Import.NAME, Import.class, "Import data written by Export."); pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format."); pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class, "Complete a bulk data load."); pgd.addClass(CopyTable.NAME, CopyTable.class, - "Export a table from local cluster to peer cluster"); + "Export a table from local cluster to peer cluster."); pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" + " the data from tables in two different clusters. WARNING: It" + " doesn't work for incrementColumnValues'd cells since the" + " timestamp is changed after being appended to the log."); + pgd.addClass(WALPlayer.NAME, WALPlayer.class, "Replay WAL files."); + pgd.addClass(ExportSnapshot.NAME, ExportSnapshot.class, "Export" + + " the specific snapshot to a given FileSystem."); + ProgramDriver.class.getMethod("driver", new Class [] {String[].class}). invoke(pgd, new Object[]{args}); } http://git-wip-us.apache.org/repos/asf/hbase/blob/ee5263db/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java index 2655e2b..5021c74 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java @@ -86,6 +86,8 @@ import org.apache.hadoop.util.ToolRunner; @InterfaceAudience.Public @InterfaceStability.Evolving public class ExportSnapshot extends Configured implements Tool { + public static final String NAME = "exportsnapshot"; + private static final Log LOG = LogFactory.getLog(ExportSnapshot.class); private static final String MR_NUM_MAPS = "mapreduce.job.maps";