You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2012/05/21 22:56:25 UTC
svn commit: r1341200 - in /hbase/trunk/src: docbkx/ops_mgt.xml
main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
Author: jmhsieh
Date: Mon May 21 20:56:24 2012
New Revision: 1341200
URL: http://svn.apache.org/viewvc?rev=1341200&view=rev
Log:
HBASE-6044 copytable: remove rs.* parameters
Modified:
hbase/trunk/src/docbkx/ops_mgt.xml
hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
Modified: hbase/trunk/src/docbkx/ops_mgt.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/src/docbkx/ops_mgt.xml?rev=1341200&r1=1341199&r2=1341200&view=diff
==============================================================================
--- hbase/trunk/src/docbkx/ops_mgt.xml (original)
+++ hbase/trunk/src/docbkx/ops_mgt.xml Mon May 21 20:56:24 2012
@@ -88,14 +88,12 @@
<title>CopyTable</title>
<para>
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:
-<programlisting>$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable [--rs.class=CLASS] [--rs.impl=IMPL] [--starttime=X] [--endtime=Y] [--new.name=NEW] [--peer.adr=ADR] tablename
+<programlisting>$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable [--starttime=X] [--endtime=Y] [--new.name=NEW] [--peer.adr=ADR] tablename
</programlisting>
</para>
<para>
Options:
<itemizedlist>
- <listitem><varname>rs.class</varname> hbase.regionserver.class of the peer cluster. Specify if different from current cluster.</listitem>
- <listitem><varname>rs.impl</varname> hbase.regionserver.impl of the peer cluster. </listitem>
<listitem><varname>starttime</varname> Beginning of the time range. Without endtime means starttime to forever.</listitem>
<listitem><varname>endtime</varname> End of the time range. Without endtime means starttime to forever.</listitem>
<listitem><varname>versions</varname> Number of cell versions to copy.</listitem>
@@ -111,8 +109,6 @@
</para>
<para>Example of copying 'TestTable' to a cluster that uses replication for a 1 hour window:
<programlisting>$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable
---rs.class=org.apache.hadoop.hbase.ipc.ReplicationRegionInterface
---rs.impl=org.apache.hadoop.hbase.regionserver.replication.ReplicationRegionServer
--starttime=1265875194289 --endtime=1265878794289
--peer.adr=server1,server2,server3:2181:/hbase TestTable</programlisting>
</para>
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java?rev=1341200&r1=1341199&r2=1341200&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java Mon May 21 20:56:24 2012
@@ -43,8 +43,6 @@ import java.util.Map;
public class CopyTable {
final static String NAME = "copytable";
- static String rsClass = null;
- static String rsImpl = null;
static long startTime = 0;
static long endTime = 0;
static int versions = -1;
@@ -104,7 +102,7 @@ public class CopyTable {
Import.Importer.class, null, null, job);
TableMapReduceUtil.initTableReducerJob(
newTableName == null ? tableName : newTableName, null, job,
- null, peerAddress, rsClass, rsImpl);
+ null, peerAddress, null, null);
job.setNumReduceTasks(0);
return job;
}
@@ -116,8 +114,7 @@ public class CopyTable {
if (errorMsg != null && errorMsg.length() > 0) {
System.err.println("ERROR: " + errorMsg);
}
- System.err.println("Usage: CopyTable [general options] [--rs.class=CLASS] " +
- "[--rs.impl=IMPL] [--starttime=X] [--endtime=Y] " +
+ System.err.println("Usage: CopyTable [general options] [--starttime=X] [--endtime=Y] " +
"[--new.name=NEW] [--peer.adr=ADR] <tablename>");
System.err.println();
System.err.println("Options:");
@@ -142,8 +139,7 @@ public class CopyTable {
System.err.println("Examples:");
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 --rs.class=org.apache.hadoop.hbase.ipc.ReplicationRegionInterface " +
- "--rs.impl=org.apache.hadoop.hbase.regionserver.replication.ReplicationRegionServer --starttime=1265875194289 --endtime=1265878794289 " +
+ "org.apache.hadoop.hbase.mapreduce.CopyTable --starttime=1265875194289 --endtime=1265878794289 " +
"--peer.adr=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"
@@ -165,18 +161,6 @@ public class CopyTable {
return false;
}
- final String rsClassArgKey = "--rs.class=";
- if (cmd.startsWith(rsClassArgKey)) {
- rsClass = cmd.substring(rsClassArgKey.length());
- continue;
- }
-
- final String rsImplArgKey = "--rs.impl=";
- if (cmd.startsWith(rsImplArgKey)) {
- rsImpl = cmd.substring(rsImplArgKey.length());
- continue;
- }
-
final String startTimeArgKey = "--starttime=";
if (cmd.startsWith(startTimeArgKey)) {
startTime = Long.parseLong(cmd.substring(startTimeArgKey.length()));