This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 7910f7738f1 HBASE-27247 
TestPerTableCFReplication.testParseTableCFsFromConfig is broken because of 
ReplicationPeerConfigUtil.parseTableCFsFromConfig (#4658)
7910f7738f1 is described below

commit 7910f7738f1aefdb24d75d4f6289def14afa81be
Author: chenglei <[email protected]>
AuthorDate: Wed Jul 27 20:48:54 2022 +0800

    HBASE-27247 TestPerTableCFReplication.testParseTableCFsFromConfig is broken 
because of ReplicationPeerConfigUtil.parseTableCFsFromConfig (#4658)
    
    Co-authored-by: comnetwork <[email protected]>
    Signed-off-by: Duo Zhang <[email protected]>
---
 .../hbase/client/replication/ReplicationPeerConfigUtil.java       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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<String> i = Splitter.on(':').split(tab).iterator();
+      List<String> pair = Splitter.on(':').splitToList(tab);
+      if (pair.size() > 2) {
+        LOG.info("incorrect format:" + tableCFsConfig);
+        continue;
+      }
+      assert pair.size() > 0;
+      Iterator<String> i = pair.iterator();
       String tabName = i.next().trim();
       if (tabName.length() == 0) {
         LOG.info("incorrect format:" + tableCFsConfig);

Reply via email to