hbase-dev mailing list archives

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

             Summary: 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

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 methods)

The two main situations are to change something like this:

HTable h = new HTable(c, tn);


HTableInterface h = new HTable(c, tn);

and this:

public void doSomething(HTable h) { ... }

to this:

public void doSomething(HTableInterface h) { ... }

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