public class TestInterfaceAudienceAnnotations extends Object
InterfaceAudience
.
All classes in hbase-client and hbase-common module MUST have InterfaceAudience
annotations. All InterfaceAudience.Public annotated classes MUST also have InterfaceStability
annotations. Think twice about marking an interface InterfaceAudience.Public. Make sure that
it is an interface, not a class (for most cases), and clients will actually depend on it. Once
something is marked with Public, we cannot change the signatures within the major release. NOT
everything in the hbase-client module or every java public class has to be marked with
InterfaceAudience.Public. ONLY the ones that an hbase application will directly use (Table, Get,
etc, versus ProtobufUtil).
Also note that HBase has it's own annotations in hbase-annotations module with the same names
as in Hadoop. You should use the HBase's classes.
See https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/InterfaceClassification.html
and https://issues.apache.org/jira/browse/HBASE-10462.Constructor and Description |
---|
TestInterfaceAudienceAnnotations() |
Modifier and Type | Method and Description |
---|---|
void |
testInterfaceAudienceAnnotation()
Checks whether all the classes in client and common modules contain
InterfaceAudience annotations. |
void |
testInterfaceStabilityAnnotation()
Checks whether all the classes in client and common modules that are marked
InterfaceAudience.Public also have
InterfaceStability annotations. |
public void testInterfaceAudienceAnnotation() throws ClassNotFoundException, IOException, LinkageError
InterfaceAudience
annotations.public void testInterfaceStabilityAnnotation() throws ClassNotFoundException, IOException, LinkageError
InterfaceStability
annotations.