hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1496573 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java
Date Tue, 25 Jun 2013 18:28:14 GMT
Author: enis
Date: Tue Jun 25 18:28:13 2013
New Revision: 1496573

URL: http://svn.apache.org/r1496573
Log:
HBASE-8795 bin/hbase zkcli cannot take arguments anymore

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java?rev=1496573&r1=1496572&r2=1496573&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java
Tue Jun 25 18:28:13 2013
@@ -69,7 +69,13 @@ public class ZooKeeperMainServer {
   public static void main(String args[]) throws Exception {
     Configuration conf = HBaseConfiguration.create();
     String hostport = new ZooKeeperMainServer().parse(conf);
-    String zkArg = (hostport == null || hostport.length() == 0)? "": "-server " + hostport;
-    ZooKeeperMain.main(new String[] {zkArg});
+    String[] newArgs = args;
+    if (hostport != null && hostport.length() > 0) {
+      newArgs = new String[args.length + 2];
+      System.arraycopy(args, 0, newArgs, 2, args.length);
+      newArgs[0] = "-server";
+      newArgs[1] = hostport;
+    }
+    ZooKeeperMain.main(newArgs);
   }
 }



Mime
View raw message