hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Singhi (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-16446) append_peer_tableCFs failed when there already have this table's partial cfs in the peer
Date Fri, 19 Aug 2016 11:12:20 GMT

    [ https://issues.apache.org/jira/browse/HBASE-16446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428003#comment-15428003
] 

Ashish Singhi edited comment on HBASE-16446 at 8/19/16 11:11 AM:
-----------------------------------------------------------------

{code}
282	    tableCFs.put(tab5, new ArrayList<String>());
283	    admin.appendPeerTableCFs(ID_ONE, tableCFs);
284	    tableCFs.clear();
285	    tableCFs.put(tab5, new ArrayList<String>());
286	    tableCFs.get(tab5).add("f1");
287	    admin.appendPeerTableCFs(ID_ONE, tableCFs);
288	    result = ReplicationSerDeHelper.parseTableCFsFromConfig(admin.getPeerTableCFs(ID_ONE));
289	    assertEquals(5, result.size());
290	    assertTrue("Should contain t5", result.containsKey(tab5));
291	    // null means replication all cfs of tab5
292	    assertNull(result.get(tab5));
{code}
Isn't the assertion in test wrong ? The result should be not null and return "f1". 
May be another similar bug in source code, can you handle it here ?


was (Author: ashish singhi):
{code}
282	    tableCFs.put(tab5, new ArrayList<String>());
283	    admin.appendPeerTableCFs(ID_ONE, tableCFs);
284	    tableCFs.clear();
285	    tableCFs.put(tab5, new ArrayList<String>());
286	    tableCFs.get(tab5).add("f1");
287	    admin.appendPeerTableCFs(ID_ONE, tableCFs);
288	    result = ReplicationSerDeHelper.parseTableCFsFromConfig(admin.getPeerTableCFs(ID_ONE));
289	    assertEquals(5, result.size());
290	    assertTrue("Should contain t5", result.containsKey(tab5));
291	    // null means replication all cfs of tab5
292	    assertNull(result.get(tab5));
{code}
Isn't this test wrong ? The result should be not null and return "f1". 
May be another similar bug in source code, can you handle it here ?

> append_peer_tableCFs failed when there already have this table's partial cfs in the peer
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-16446
>                 URL: https://issues.apache.org/jira/browse/HBASE-16446
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 2.0.0, 1.1.6, 1.3.1, 0.98.21, 1.2.3
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Minor
>         Attachments: HBASE-16446.patch
>
>
> {code}
> hbase(main):011:0> list_peers
>  PEER_ID CLUSTER_KEY STATE TABLE_CFS PROTOCOL BANDWIDTH
>  20 hbase://c3tst-pressure98 ENABLED default.test_replication:A NATIVE 0
> 1 row(s) in 0.0080 seconds
> hbase(main):012:0> append_peer_tableCFs '20', {"test_replication" => []}
> 0 row(s) in 0.0060 seconds
> hbase(main):013:0> list_peers
>  PEER_ID CLUSTER_KEY STATE TABLE_CFS PROTOCOL BANDWIDTH
>  20 hbase://c3tst-pressure98 ENABLED default.test_replication:A NATIVE 0
> 1 row(s) in 0.0030 seconds
> {code}
> "test_replication" => [] means replication all cf of this table,so the result is not
right. It should not just contain cf A after append_peer_tableCFs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message