hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [06/12] hbase git commit: HBASE-13342 Fix incorrect interface annotations
Date Fri, 27 Mar 2015 13:59:01 GMT
HBASE-13342 Fix incorrect interface annotations


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5d2c3315
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5d2c3315
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5d2c3315

Branch: refs/heads/hbase-12439
Commit: 5d2c33158c47fc791d4973c5013d7ae50795d3bc
Parents: b6b1e3b
Author: Elliott Clark <eclark@apache.org>
Authored: Thu Mar 26 11:48:19 2015 -0700
Committer: Elliott Clark <eclark@apache.org>
Committed: Fri Mar 27 00:19:15 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh                       | 25 ++++++++++++++++++++
 .../hbase/namespace/NamespaceStateManager.java  |  2 +-
 .../namespace/NamespaceTableAndRegionInfo.java  |  2 +-
 .../hbase/quotas/RegionStateListener.java       |  2 +-
 .../handler/RegionReplicaFlushHandler.java      |  2 +-
 .../hbase/regionserver/wal/ReplayHLogKey.java   |  2 +-
 6 files changed, 30 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 20d5f25..a735be8 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -513,6 +513,29 @@ checkAntiPatterns () {
 }
 
 ###############################################################################
+### Check that there are no incorrect annotations
+checkInterfaceAudience () {
+  echo ""
+  echo ""
+  echo "======================================================================"
+  echo "======================================================================"
+  echo "    Checking against hadoop InterfaceAudience."
+  echo "======================================================================"
+  echo "======================================================================"
+  echo ""
+  echo ""
+  warnings=`$GREP 'import org.apache.hadoop.classification' $PATCH_DIR/patch`
+  if [[ $warnings != "" ]]; then
+    JIRA_COMMENT="$JIRA_COMMENT
+
+		    {color:red}-1 InterfaceAudience{color}.  The patch appears to contain InterfaceAudience
from hadoop rather than hbase:
+             $warnings."
+	  return 1
+  fi
+  return 0
+}
+
+###############################################################################
 ### Check there are no javadoc warnings
 checkJavadocWarnings () {
   echo ""
@@ -1030,6 +1053,8 @@ checkJavadocWarnings
 (( RESULT = RESULT + $? ))
 checkCheckstyleErrors
 (( RESULT = RESULT + $? ))
+checkInterfaceAudience
+(( RESULT = RESULT + $? ))
 checkFindbugsWarnings
 (( RESULT = RESULT + $? ))
 checkReleaseAuditWarnings

http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java
index 1c8f524..981748b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceStateManager.java
@@ -24,12 +24,12 @@ import java.util.concurrent.ConcurrentMap;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.MetaTableAccessor;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.TableNamespaceManager;
 import org.apache.hadoop.hbase.util.Bytes;

http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java
index 66fcaa6..86651e4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceTableAndRegionInfo.java
@@ -24,10 +24,10 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.TableName;
 
 import com.google.common.base.Joiner;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 
 /**
  * NamespaceTableAndRegionInfo is a helper class that contains information

http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java
index 6b954ac..368e21e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionStateListener.java
@@ -19,8 +19,8 @@ package org.apache.hadoop.hbase.quotas;
 
 import java.io.IOException;
 
-import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 
 /**
  * The listener interface for receiving region state events.

http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java
index 9661b30..e0921b0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/RegionReplicaFlushHandler.java
@@ -23,11 +23,11 @@ import java.io.InterruptedIOException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.Server;
 import org.apache.hadoop.hbase.TableNotFoundException;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.FlushRegionCallable;
 import org.apache.hadoop.hbase.client.RegionReplicaUtil;

http://git-wip-us.apache.org/repos/asf/hbase/blob/5d2c3315/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ReplayHLogKey.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ReplayHLogKey.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ReplayHLogKey.java
index 4506b19..55c057b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ReplayHLogKey.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ReplayHLogKey.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 
 /**
  * An HLogKey specific to WalEdits coming from replay.


Mime
View raw message