hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-11679) Replace "HTable" with "HTableInterface" where backwards-compatible
Date Thu, 07 Aug 2014 05:15:13 GMT

     [ https://issues.apache.org/jira/browse/HBASE-11679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

stack updated HBASE-11679:

    Attachment: HBASE_11679.patch


I tried it locally and got below:


Results :

Failed tests:   testGroupOrSplitPresplit(org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFilesSplitRecovery):
expected:<20> but was:<0>
expected:<20> but was:<0>
  testRetainAssignmentOnRestart(org.apache.hadoop.hbase.master.TestRestartCluster): expected:<localhost:618[85]>
but was:<localhost:618[79]>

Tests in error:
  org.apache.hadoop.hbase.client.TestReplicasClient: KeeperErrorCode = NoNode for /hbase/region-in-transition/1588230740
  testClusterStatus(org.apache.hadoop.hbase.client.TestHCM): Unexpected exception, expected<org.apache.hadoop.hbase.regionserver.RegionServerStoppedException>
but was<junit.framework.AssertionFailedError>
Unexpected exception, expected<java.io.IOException> but was<java.lang.AssertionError>
Unexpected exception, expected<java.io.IOException> but was<java.lang.AssertionError>
  org.apache.hadoop.hbase.regionserver.TestRegionReplicas: KeeperErrorCode = NoNode for /hbase/region-in-transition/1588230740

Tests run: 2020, Failures: 3, Errors: 5, Skipped: 18


Replica failures are being dealt wither elsewhere, HBASE-11611.  Ditto TestIOFencing -- it
was supposed to be fixed but still failing.

TestLoadIncrementalHFilesSplitRecovery fails with this patch in place and passes without.
 Haven't spent much time on it.  Lets see what happens on second time through.

Skimmed patch.  Looks innocuous.  Let me take a closer look.

> Replace "HTable" with "HTableInterface" where backwards-compatible
> ------------------------------------------------------------------
>                 Key: HBASE-11679
>                 URL: https://issues.apache.org/jira/browse/HBASE-11679
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Carter
>            Assignee: Carter
>         Attachments: HBASE_11679.patch, HBASE_11679.patch
> This is a refactor to move more of the code towards using interfaces for proper encapsulation
of logic.
> The amount of code touched is large, but it should be fairly easy to review.  It changes
variable declarations from HTable to HTableInterface where the following holds:
> # The declaration being updated won't break assignment
> # The declaration change does not break the compile (eg trying to access non-interface
> The two main situations are to change something like this:
> {code}
> HTable h = new HTable(c, tn);
> {code}
> to
> {code}
> HTableInterface h = new HTable(c, tn);
> {code}
> and this:
> {code}
> public void doSomething(HTable h) { ... }
> {code}
> to this:
> {code}
> public void doSomething(HTableInterface h) { ... }
> {code}
> This gets most of the obvious cases out of the way and prepares for more complicated
interface refactors in the future.  In method signatures, I changed parameters, but did _not_
change any public or protected method return values, since that would violate criteria #1
above and break compatibility.

This message was sent by Atlassian JIRA

View raw message