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:
parent
9a151d2e73
commit
04e4855bc8
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue