This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new a3eeab8c569 HBASE-27247
TestPerTableCFReplication.testParseTableCFsFromConfig is broken because of
ReplicationPeerConfigUtil.parseTableCFsFromConfig (#4658)
a3eeab8c569 is described below
commit a3eeab8c569068f4f85346733b46adb722524e51
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 b2ddc4eaec1..2fc5fa3c115 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
@@ -125,7 +125,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);