You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Hsieh (JIRA)" <ji...@apache.org> on 2017/05/24 16:41:04 UTC

[jira] [Comment Edited] (HBASE-15930) Make IntegrationTestReplication's waitForReplication() smarter

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

Jonathan Hsieh edited comment on HBASE-15930 at 5/24/17 4:41 PM:
-----------------------------------------------------------------

Did you test the pre-setup case? 

line 190 seems backwards.  -- shouldn't it be 'if (!tableCFs.getcolumnFamilyMap().isEmpty()) ' ?

{code}
187	        Admin admin = source.getConnection().getAdmin();
188	        for (TableCFs tableCFs : admin.listReplicatedTableCFs()) {
189	          if (tableCFs.getTable().equals(expected)) {
190	            if (tableCFs.getColumnFamilyMap().isEmpty()) {
191	              // Replicating at least one CF is good enough
192	              return;
193	            }
194	          }
195	        }
196	        throw new RuntimeException("Aborting test: replication not configured and we were instructed to not set it up.");
197	      } finally {
{code}


was (Author: jmhsieh):
Did you test the pre-setup case? 

line 190 seems backwards.  -- shouldn't it be 'if (!tableCFs.getcolumnFamilyMap(0.isEmpty()) ' ?

{code}
187	        Admin admin = source.getConnection().getAdmin();
188	        for (TableCFs tableCFs : admin.listReplicatedTableCFs()) {
189	          if (tableCFs.getTable().equals(expected)) {
190	            if (tableCFs.getColumnFamilyMap().isEmpty()) {
191	              // Replicating at least one CF is good enough
192	              return;
193	            }
194	          }
195	        }
196	        throw new RuntimeException("Aborting test: replication not configured and we were instructed to not set it up.");
197	      } finally {
{code}

> Make IntegrationTestReplication's waitForReplication() smarter
> --------------------------------------------------------------
>
>                 Key: HBASE-15930
>                 URL: https://issues.apache.org/jira/browse/HBASE-15930
>             Project: HBase
>          Issue Type: Improvement
>          Components: integration tests
>            Reporter: Dima Spivak
>            Assignee: Mike Drob
>             Fix For: 2.0.0
>
>         Attachments: HBASE-15930.patch
>
>
> {{IntegrationTestReplication}} is a great test, but can improved by changing how we handle waiting between generation of the linked list on the source cluster and verifying the linked list on the destination cluster. [Even the code suggests this should be done|https://github.com/apache/hbase/blob/master/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestReplication.java#L251-252], so I'd like to take it on. [~mbertozzi] and [~busbey] have both suggested a simple solution wherein we write a row into each region on the source cluster after the linked list generation and then assume replication has gone through once these rows are detected on the destination cluster.
> Since you lads at Facebook are some of the heaviest users, [~eclark], would you prefer I maintain the API and add a new command line option (say {{\-c | \-\-check-replication}}) that would run before any {{--generateVerifyGap}} sleep is carried out as it is now?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)