HBASE-27247 TestPerTableCFReplication.testParseTableCFsFromConfig is broken because of ReplicationPeerConfigUtil.parseTableCFsFromConfig (#4658)

Co-authored-by: comnetwork <comnetwork@163.com>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
chenglei 2022-07-27 20:48:54 +08:00 committed by GitHub
parent 80b366817e
commit a3eeab8c56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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);