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

Enis Soztutar updated HBASE-10462:
----------------------------------

    Attachment: hbase-10462_wip1.patch

I've been playing with this and I have a patch that shows which has a unit test 
to check which classes in the hbase-client dependency tree and in hbase 
packages do not have InterfaceAudience annotation. 

Unfortunately, the patch needs a hadoop with HADOOP-10374, so that we can 
enable this as a unit test.

However, it is still useful to run manually for now so that we can fill up the 
missing categorizations. 

{code}
      // find classes that are:
      // AND are public
      // NOT test classes
      // AND NOT generated classes
      // AND are NOT annotated with InterfaceAudience
{code}

Results in: 
{code}
2014-03-03 17:24:57,502 DEBUG [main] hbase.ClassFinder(147): Will look for 
classes in 
/Users/enis/projects/hbase/hbase-client/target/classes/org/apache/hadoop/hbase
2014-03-03 17:24:57,506 DEBUG [main] hbase.ClassFinder(147): Will look for 
classes in 
/Users/enis/.m2/repository/org/apache/hbase/hbase-common/0.99.0-SNAPSHOT/hbase-common-0.99.0-SNAPSHOT.jar
2014-03-03 17:24:57,506 DEBUG [main] hbase.ClassFinder(147): Will look for 
classes in 
/Users/enis/.m2/repository/org/apache/hbase/hbase-protocol/0.99.0-SNAPSHOT/hbase-protocol-0.99.0-SNAPSHOT.jar
2014-03-03 17:24:58,614 INFO  [main] hbase.TestAPIStability(135): These are the 
classes that DO NOT have @InterfaceAudience annotation:
2014-03-03 17:24:58,614 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.SecurityInfo
2014-03-03 17:24:58,614 INFO  [main] hbase.TestAPIStability(137): interface 
org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFuture
2014-03-03 17:24:58,614 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.SaslUtil
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.exceptions.UnknownProtocolException
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.access.Permission
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationQueuesClientZKImpl
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl$PeerRegionServerListener
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.ipc.IPCUtil$CellScannerButNoCodecException
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.ChecksumType
2014-03-03 17:24:58,615 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.io.ImmutableBytesWritable$Comparator
2014-03-03 17:24:58,616 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.access.Permission$Action
2014-03-03 17:24:58,616 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.SaslStatus
2014-03-03 17:24:58,617 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.zookeeper.ZKUtil$ZKUtilOp$SetData
2014-03-03 17:24:58,617 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.Base64$Base64OutputStream
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.token.AuthenticationTokenSelector
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.io.LimitInputStream
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationTrackerZKImpl$OtherRegionServerWatcher
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.exceptions.FailedSanityCheckException
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.UserProvider
2014-03-03 17:24:58,618 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.ConcatenatedLists$Iterator
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.ConcatenatedLists
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.ipc.ServerRpcController
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.access.TablePermission
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.client.DelegatingRetryingCallable
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.access.UserPermission
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.BaseConfigurable
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): interface 
org.apache.hadoop.hbase.replication.ReplicationQueuesClient
2014-03-03 17:24:58,619 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.HConstants$OperationStatusCode
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.exceptions.LockTimeoutException
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.NamespaceDescriptor$Builder
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.client.RpcRetryingCallerFactory
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationTrackerZKImpl$PeersWatcher
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.ChecksumFactory
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationFactory
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationTrackerZKImpl
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.HConstants$Modify
2014-03-03 17:24:58,620 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.io.crypto.Encryption$Context
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): interface 
org.apache.hadoop.hbase.MetaMutationAnnotation
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.HBaseSaslRpcClient
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationQueuesZKImpl
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.MurmurHash3
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.protobuf.ProtobufUtil
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.util.ExceptionUtil
2014-03-03 17:24:58,621 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.ipc.TimeLimitedRpcController
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.zookeeper.ZKUtil$ZKUtilOp$CreateAndFailSilent
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationStateZKBase
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.zookeeper.ZKUtil$ZKUtilOp$DeleteNodeFailSilent
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.replication.ReplicationQueueInfo
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.AuthMethod
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.security.SecureBulkLoadUtil
2014-03-03 17:24:58,622 INFO  [main] hbase.TestAPIStability(137): class 
org.apache.hadoop.hbase.client.RetriesExhaustedException$ThrowableWithExtraContext
{code}






> Recategorize some of the client facing Public / Private interfaces
> ------------------------------------------------------------------
>
>                 Key: HBASE-10462
>                 URL: https://issues.apache.org/jira/browse/HBASE-10462
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>            Reporter: Enis Soztutar
>            Assignee: Enis Soztutar
>            Priority: Blocker
>             Fix For: 0.99.0
>
>         Attachments: hbase-10462_wip1.patch
>
>
> We should go over the list of InterfaceAudience.Public interfaces one more to 
> remove those that are NOT indeed public interfaces. 
> From current trunk, we should change these from public to private: 
> {code}
> ReversedScannerCallable
> ReversedClientScanner
> ClientScanner  (note that ResultScanner is public interface, while 
> ClientScanner should not be) 
> ClientSmallScanner
> TableSnapshotScanner -> We need a way of constructing this since it cannot be 
> constructed from HConnection / HTable. Maybe a basic factory. 
> {code}
> These are not marked: 
> {code}
> Registry, 
> ZooKeeperRegistry
> RpcRetryingCallerFactory
> ZooKeeperKeepAliveConnection
> AsyncProcess
> DelegatingRetryingCallable
> HConnectionKey
> MasterKeepAliveConnection
> MultiServerCallable
> {code}
> We can think about making these public interface: 
> {code}
> ScanMetrics
> {code}
> Add javadoc to: 
> {code}
> Query
> {code}
> We can add a test to find out all classes in client package to check for 
> interface mark. 
> We can extend this to brainstorm on the preferred API options. We probably 
> want the clients to use HTableInterface, instead of HTable everywhere. 
> HConnectionManager comes with bazillion methods which are not intended for 
> public use, etc. 
> Raising this as blocker to 1.0



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to