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:15 UTC
svn commit: r1341199 - in /hbase/branches/0.94/src: docbkx/ops_mgt.xml
main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
Author: jmhsieh
Date: Mon May 21 20:56:15 2012
New Revision: 1341199
URL: http://svn.apache.org/viewvc?rev=1341199&view=rev
Log:
HBASE-6044 copytable: remove rs.* parameters
Modified:
hbase/branches/0.94/src/docbkx/ops_mgt.xml
hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
Modified: hbase/branches/0.94/src/docbkx/ops_mgt.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/docbkx/ops_mgt.xml?rev=1341199&r1=1341198&r2=1341199&view=diff
==============================================================================
--- hbase/branches/0.94/src/docbkx/ops_mgt.xml (original)
+++ hbase/branches/0.94/src/docbkx/ops_mgt.xml Mon May 21 20:56:15 2012
@@ -81,14 +81,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>
@@ -104,8 +102,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/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java?rev=1341199&r1=1341198&r2=1341199&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java Mon May 21 20:56:15 2012
@@ -39,8 +39,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;
@@ -100,7 +98,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;
}
@@ -112,8 +110,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:");
@@ -138,8 +135,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"
@@ -161,18 +157,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()));