diff --git src/docbkx/ops_mgt.xml src/docbkx/ops_mgt.xml
index c8054ed..ffb9db8 100644
--- src/docbkx/ops_mgt.xml
+++ src/docbkx/ops_mgt.xml
@@ -88,7 +88,7 @@
CopyTable
CopyTable is a utility that can copy part or of all of a table, either to the same cluster or another cluster. The usage is as follows:
-$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable [--starttime=X] [--endtime=Y] [--new.name=NEW] [--peer.adr=ADR] tablename
+$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable [--starttime=X] [--endtime=Y] [--new.name=NEW] [--dest.addr=ADR] tablename
@@ -98,7 +98,7 @@
endtime End of the time range. Without endtime means starttime to forever.
versions Number of cell versions to copy.
new.name New table's name.
- peer.adr Address of the peer cluster given in the format hbase.zookeeper.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent
+ dest.addr Address of the destiination cluster given in the format hbase.zookeeper.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent
families Comma-separated list of ColumnFamilies to copy.
all.cells Also copy delete markers and uncollected deleted cells (advanced option).
@@ -110,7 +110,7 @@
Example of copying 'TestTable' to a cluster that uses replication for a 1 hour window:
$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable
--starttime=1265875194289 --endtime=1265878794289
---peer.adr=server1,server2,server3:2181:/hbase TestTable
+--dest.addr=server1,server2,server3:2181:/hbase TestTable
Note: caching for the input Scan is configured via hbase.client.scanner.caching in the job configuration.
diff --git src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
index 0e14d01..f45a8ff 100644
--- src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
+++ src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
@@ -48,7 +48,7 @@ public class CopyTable {
static int versions = -1;
static String tableName = null;
static String newTableName = null;
- static String peerAddress = null;
+ static String destAddress = null;
static String families = null;
static boolean allCells = false;
@@ -102,7 +102,7 @@ public class CopyTable {
Import.Importer.class, null, null, job);
TableMapReduceUtil.initTableReducerJob(
newTableName == null ? tableName : newTableName, null, job,
- null, peerAddress, null, null);
+ null, destAddress, null, null);
job.setNumReduceTasks(0);
return job;
}
@@ -115,7 +115,7 @@ public class CopyTable {
System.err.println("ERROR: " + errorMsg);
}
System.err.println("Usage: CopyTable [general options] [--starttime=X] [--endtime=Y] " +
- "[--new.name=NEW] [--peer.adr=ADR] ");
+ "[--new.name=NEW] [--dest.addr=ADR] ");
System.err.println();
System.err.println("Options:");
System.err.println(" starttime beginning of the time range");
@@ -123,7 +123,7 @@ public class CopyTable {
System.err.println(" endtime end of the time range");
System.err.println(" versions number of cell versions to copy");
System.err.println(" new.name new table's name");
- System.err.println(" peer.adr Address of the peer cluster given in the format");
+ System.err.println(" dest.addr Address of the destination cluster given in the format");
System.err.println(" hbase.zookeeer.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent");
System.err.println(" families comma-separated list of families to copy");
System.err.println(" To copy from cf1 to cf2, give sourceCfName:destCfName. ");
@@ -137,7 +137,7 @@ public class CopyTable {
System.err.println(" To copy 'TestTable' to a cluster that uses replication for a 1 hour window:");
System.err.println(" $ bin/hbase " +
"org.apache.hadoop.hbase.mapreduce.CopyTable --starttime=1265875194289 --endtime=1265878794289 " +
- "--peer.adr=server1,server2,server3:2181:/hbase --families=myOldCf:myNewCf,cf2,cf3 TestTable ");
+ "--dest.addr=server1,server2,server3:2181:/hbase --families=myOldCf:myNewCf,cf2,cf3 TestTable ");
System.err.println("For performance consider the following general options:\n"
+ "-Dhbase.client.scanner.caching=100\n"
+ "-Dmapred.map.tasks.speculative.execution=false");
@@ -182,12 +182,13 @@ public class CopyTable {
continue;
}
- final String peerAdrArgKey = "--peer.adr=";
- if (cmd.startsWith(peerAdrArgKey)) {
- peerAddress = cmd.substring(peerAdrArgKey.length());
+ final String destAdrArgKey = "--dest.addr=";
+ if (cmd.startsWith(destAdrArgKey)) {
+ destAddress = cmd.substring(destAdrArgKey.length());
continue;
}
+
final String familiesArgKey = "--families=";
if (cmd.startsWith(familiesArgKey)) {
families = cmd.substring(familiesArgKey.length());
@@ -203,9 +204,9 @@ public class CopyTable {
tableName = cmd;
}
}
- if (newTableName == null && peerAddress == null) {
+ if (newTableName == null && destAddress == null) {
printUsage("At least a new table name or a " +
- "peer address must be specified");
+ "destination address must be specified");
return false;
}
} catch (Exception e) {