diff --git a/kafka/hbase-kafka-proxy/src/main/java/org/apache/hadoop/hbase/kafka/KafkaBridgeConnection.java b/kafka/hbase-kafka-proxy/src/main/java/org/apache/hadoop/hbase/kafka/KafkaBridgeConnection.java index a0d3dc24..68a88aff 100644 --- a/kafka/hbase-kafka-proxy/src/main/java/org/apache/hadoop/hbase/kafka/KafkaBridgeConnection.java +++ b/kafka/hbase-kafka-proxy/src/main/java/org/apache/hadoop/hbase/kafka/KafkaBridgeConnection.java @@ -40,7 +40,6 @@ import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.yetus.audience.InterfaceAudience; -import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; /** * a alternative implementation of a connection object that forwards the mutations to a kafka queue @@ -76,9 +75,7 @@ public KafkaBridgeConnection(Configuration conf, * @param conf hbase configuration * @param routingRules a set of routing rules * @param producer a kafka producer - * @throws IOException on error */ - @VisibleForTesting public KafkaBridgeConnection(Configuration conf, TopicRoutingRules routingRules, Producer producer) { this.conf = conf; diff --git a/pom.xml b/pom.xml index d6061ead..e00ffb70 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,9 @@ 8.18 3.1.0 3.0.0-M4 + 3.0.0-M3 + 1.2 + 0.14.0 2.5.0 0.5.0 @@ -437,12 +440,17 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + ${enforcer.version} org.codehaus.mojo extra-enforcer-rules - 1.2 + ${extra.enforcer.version} + + + de.skuzzle.enforcer + restrict-imports-enforcer-rule + ${restrict-imports.enforcer.version} @@ -513,6 +521,92 @@ + + banned-illegal-imports + process-sources + + enforce + + + + + true + 512 + Use SLF4j for logging + + org.apache.commons.logging.Log + org.apache.commons.logging.LogFactory + + + + true + 512 + Use shaded version in hbase-thirdparty + + com.google.common.** + io.netty.** + org.apache.commons.cli.** + org.apache.commons.collections.** + org.apache.commons.collections4.** + + + + true + 512 + Do not use shaded classes from other dependencies + + org.apache.curator.shaded.** + org.apache.htrace.shaded.** + + + + true + 512 + Use shaded gson in hbase-thirdparty + + org.codehaus.jackson.** + + + + true + 512 + Use commons lang 3 + + org.apache.commons.lang.** + + + + true + 512 + Use yetus IA and IS annotations + + org.apache.hadoop.classificatio.** + + + + true + 512 + Do not use htrace v3 + + org.htrace.** + + + + true + 512 + + You should never use this style of annotations(i.e, 'this is for test only') + in IA.Public or IA.LimitedPrivate classes. Use IA.Private to tell users this is + not for public use. + For IA.Private classes, use RestrictedApi annotation in error prone instead. + + + org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting + + + + +