diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java index c5836a99e37..5618a4166af 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java @@ -124,7 +124,13 @@ public final class ReplicationPeerConfigUtil { } // 2 split to "table" and "cf1,cf2" // for each table: "table#cf1,cf2" or "table" - Iterator i = Splitter.on(':').split(tab).iterator(); + List pair = Splitter.on(':').splitToList(tab); + if (pair.size() > 2) { + LOG.info("incorrect format:" + tableCFsConfig); + continue; + } + assert pair.size() > 0; + Iterator i = pair.iterator(); String tabName = i.next().trim(); if (tabName.length() == 0) { LOG.info("incorrect format:" + tableCFsConfig);