You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Qianxi Zhang (JIRA)" <ji...@apache.org> on 2014/06/20 10:36:24 UTC
[jira] [Commented] (HBASE-11386) Replication#table,CF config will
be wrong if the table name includes namespace
[ https://issues.apache.org/jira/browse/HBASE-11386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038584#comment-14038584 ]
Qianxi Zhang commented on HBASE-11386:
--------------------------------------
[~fenghh] Pls correct me if am wrong. If the config is "ns:table1:cf1,cf2" , the parser will be wrong. But I think if the config is flexible, the parser will be complex, such as "ns:table:cf1,cf2" or "table:cf1" or "table" or "ns:table".
> Replication#table,CF config will be wrong if the table name includes namespace
> ------------------------------------------------------------------------------
>
> Key: HBASE-11386
> URL: https://issues.apache.org/jira/browse/HBASE-11386
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Reporter: Qianxi Zhang
> Assignee: Qianxi Zhang
> Priority: Minor
>
> Now we can config the table and CF in Replication, but I think the parse will be wrong if the table name includes namespace
> ReplicationPeer#parseTableCFsFromConfig(line 125)
> {code}
> Map<String, List<String>> tableCFsMap = null;
> // parse out (table, cf-list) pairs from tableCFsConfig
> // format: "table1:cf1,cf2;table2:cfA,cfB"
> String[] tables = tableCFsConfig.split(";");
> for (String tab : tables) {
> // 1 ignore empty table config
> tab = tab.trim();
> if (tab.length() == 0) {
> continue;
> }
> // 2 split to "table" and "cf1,cf2"
> // for each table: "table:cf1,cf2" or "table"
> String[] pair = tab.split(":");
> String tabName = pair[0].trim();
> if (pair.length > 2 || tabName.length() == 0) {
> LOG.error("ignore invalid tableCFs setting: " + tab);
> continue;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)