HBASE-6044 copytable: remove rs.* parameters
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1341200 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b36c9ceea2
commit
1da00e2f9b
|
@ -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>
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue