Skip to content

Commit a3eeab8

Browse files
authored
HBASE-27247 TestPerTableCFReplication.testParseTableCFsFromConfig is broken because of ReplicationPeerConfigUtil.parseTableCFsFromConfig (apache#4658)
Co-authored-by: comnetwork <comnetwork@163.com> Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 80b3668 commit a3eeab8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ public static ReplicationProtos.TableCF[] convert(String tableCFsConfig) {
125125
}
126126
// 2 split to "table" and "cf1,cf2"
127127
// for each table: "table#cf1,cf2" or "table"
128-
Iterator<String> i = Splitter.on(':').split(tab).iterator();
128+
List<String> pair = Splitter.on(':').splitToList(tab);
129+
if (pair.size() > 2) {
130+
LOG.info("incorrect format:" + tableCFsConfig);
131+
continue;
132+
}
133+
assert pair.size() > 0;
134+
Iterator<String> i = pair.iterator();
129135
String tabName = i.next().trim();
130136
if (tabName.length() == 0) {
131137
LOG.info("incorrect format:" + tableCFsConfig);

0 commit comments

Comments
 (0)