HBASE-8795 bin/hbase zkcli cannot take arguments anymore

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1496573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2013-06-25 18:28:13 +00:00
parent 9a151d2e73
commit 04e4855bc8
1 changed files with 8 additions and 2 deletions

View File

@ -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);
}
}