Q:

java.lang.NumberFormatException when trying to connect to HBase

I am setting HBase configuration new HBaseGraphConfiguration().set("hbase.zookeeper.quorum", ZOOKEPER_QORUM_NODE) where 
ZOOKEPER_QORUM_NODE = "172.31.17.251:2181,172.31.17.252:2181,172.31.17.253:2181";
However it throws an java.lang.NumberFormatException, the part of the error is 
Caused by: java.lang.NumberFormatException: For input string: "2181]"
  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
  at java.lang.Integer.parseInt(Integer.java:580)
  at java.lang.Integer.parseInt(Integer.java:615)
  at org.apache.zookeeper.client.ConnectStringParser.<init>(ConnectStringParser.java:72)

The console output before the error line is 
2018-05-30 14:40:52 INFO  org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=[172.31.17.251:2181, 172.31.17.252:2181, 172.31.17.253:2181] sessionTimeout=180000 watcher=hconnection-0x25a65b770x0, quorum=[172.31.17.251:2181, 172.31.17.252:2181, 172.31.17.253:2181], baseZNode=/hbase
2018-05-30 14:40:52 INFO  org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=[172.31.17.251:2181, 172.31.17.252:2181, 172.31.17.253:2181] sessionTimeout=180000 watcher=hconnection-0x25a65b770x0, quorum=[172.31.17.251:2181, 172.31.17.252:2181, 172.31.17.253:2181], baseZNode=/hbase

How to solve it?

A:

Thanks for the answer of @VS_FF, I have found the issue and also now posting the whole answer
The short solution of this problem is just set conf.setDelimiterParsingDisabled(true);
First it is suggested to set the hbase.zookeeper.quorum = "ip1,ip2,ip3" (host ip) and hbase.zookeeper.property.clientPort = 2181 (port) separately.
The string of ip addresses are inputted to HBase configuration . Then, it has two sorts of parsing method, controlled by 
conf = new PropertiesConfiguration();
conf.setDelimiterParsingDisabled(true);

if this setDelimiterParsingDisabled(true) is applied, then configuration will input the origin string to zookeeper, saying "ip1,ip2,ip3", otherwise setDelimiterParsingDisabled(false) (this is the default setting), in this condition, it will input an array to zookeeper, saying [ip1,ip2,ip3].
However, zookeeper need to get a String variable, so if setDelimiterParsingDisabled(false), it will first convert the array to String, adding the brackets [].
Finally, zookeeper parse the String variable by using split of notation ,, that is why it finally gets ip1 = "[ip1", ip2 = "ip2", ip3 = "ip3]" and throws an NumberFormatException

