HBASE-13671 More classes to add to org.apache.hadoop.hbase.mapreduce.driver (li xiang)
This commit is contained in:
parent
a6cf9c51d9
commit
ee5263db8c
|
@ -22,6 +22,7 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
||||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
||||||
import org.apache.hadoop.hbase.classification.InterfaceStability;
|
import org.apache.hadoop.hbase.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication;
|
import org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication;
|
||||||
|
import org.apache.hadoop.hbase.snapshot.ExportSnapshot;
|
||||||
import org.apache.hadoop.util.ProgramDriver;
|
import org.apache.hadoop.util.ProgramDriver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,21 +38,26 @@ public class Driver {
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Throwable {
|
public static void main(String[] args) throws Throwable {
|
||||||
ProgramDriver pgd = new ProgramDriver();
|
ProgramDriver pgd = new ProgramDriver();
|
||||||
|
|
||||||
pgd.addClass(RowCounter.NAME, RowCounter.class,
|
pgd.addClass(RowCounter.NAME, RowCounter.class,
|
||||||
"Count rows in HBase table");
|
"Count rows in HBase table.");
|
||||||
pgd.addClass(CellCounter.NAME, CellCounter.class,
|
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(Export.NAME, Export.class, "Write table data to HDFS.");
|
||||||
pgd.addClass(Import.NAME, Import.class, "Import data written by Export.");
|
pgd.addClass(Import.NAME, Import.class, "Import data written by Export.");
|
||||||
pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format.");
|
pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format.");
|
||||||
pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class,
|
pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class,
|
||||||
"Complete a bulk data load.");
|
"Complete a bulk data load.");
|
||||||
pgd.addClass(CopyTable.NAME, CopyTable.class,
|
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" +
|
pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" +
|
||||||
" the data from tables in two different clusters. WARNING: It" +
|
" the data from tables in two different clusters. WARNING: It" +
|
||||||
" doesn't work for incrementColumnValues'd cells since the" +
|
" doesn't work for incrementColumnValues'd cells since the" +
|
||||||
" timestamp is changed after being appended to the log.");
|
" 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}).
|
ProgramDriver.class.getMethod("driver", new Class [] {String[].class}).
|
||||||
invoke(pgd, new Object[]{args});
|
invoke(pgd, new Object[]{args});
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,8 @@ import org.apache.hadoop.util.ToolRunner;
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
@InterfaceStability.Evolving
|
@InterfaceStability.Evolving
|
||||||
public class ExportSnapshot extends Configured implements Tool {
|
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 Log LOG = LogFactory.getLog(ExportSnapshot.class);
|
||||||
|
|
||||||
private static final String MR_NUM_MAPS = "mapreduce.job.maps";
|
private static final String MR_NUM_MAPS = "mapreduce.job.maps";
|
||||||
|
|
Loading…
Reference in New Issue