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

Jonathan Hsieh commented on HBASE-9579:
---------------------------------------

{quote}
THis should be private?
-@InterfaceStability.Evolving
+@InterfaceAudience.Private
public abstract class FSUtils {
{quote}

Putting the question slightly different slant -- should all application writers 
have the ability to traverse and potentially modify HBase's hdfs dirctory 
structure?  I think only hbase services should be touching that stuff (or via a 
helper interface like hbck).  Marking private doesn't mean they don't have 
access to these methods -- it just means that they shouldn't unless they are 
willing to deal with the api changing. (and gives us the ability to change 
these).

{quote}
Hmmm.. I suppose this general utility... but no harm making it internal
-@InterfaceAudience.Public
+@InterfaceAudience.Private
@InterfaceStability.Stable
public class HashedBytes {
{quote}
Honestly, it seems like a wrapper that provides little value -- it is only used 
in 5 lines of HRegion and if anything should be folded in as a private static 
inner class in that class.  Let's keep it private. 

{code}
jon@swoop:~/proj/hbase-trunk$ grep -R HashedBytes . | grep \\.java
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:import
 org.apache.hadoop.hbase.util.HashedBytes;
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 
 private final ConcurrentHashMap<HashedBytes, RowLockContext> lockedRows =
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 
     new ConcurrentHashMap<HashedBytes, RowLockContext>();
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 
     HashedBytes rowKey = new HashedBytes(row);
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 
   private final HashedBytes row;
./hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java: 
   RowLockContext(HashedBytes row) {
./hbase-server/src/main/java/org/apache/hadoop/hbase/util/HashedBytes.java:public
 class HashedBytes {
./hbase-server/src/main/java/org/apache/hadoop/hbase/util/HashedBytes.java:  
public HashedBytes(byte[] bytes) {
./hbase-server/src/main/java/org/apache/hadoop/hbase/util/HashedBytes.java:    
HashedBytes other = (HashedBytes) obj;
{code}
                
> Sanity check visiblity and audience for server-side modules.
> ------------------------------------------------------------
>
>                 Key: HBASE-9579
>                 URL: https://issues.apache.org/jira/browse/HBASE-9579
>             Project: HBase
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 0.95.2
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>         Attachments: hbase-9579.patch, hbase-9579.v2.patch
>
>
> Similar to HBASE-9495 we should audit the hbase-hadoop*-compat, 
> hbase-prefix-tree, hbase-protocol and hbase server-modules. 
> I'll go through each module first making most things private, and then do a 
> second pass using some sort of LimitedPrivate marking for apis that we'd 
> expect coprocs or advanced tests to use.
> This is less urgent that the work for the client facing apis.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to