hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1514309 - in /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase: client/RpcRetryingCaller.java ipc/RpcClient.java security/access/TablePermission.java
Date Thu, 15 Aug 2013 14:59:00 GMT
Author: stack
Date: Thu Aug 15 14:59:00 2013
New Revision: 1514309

URL: http://svn.apache.org/r1514309
Log:
HBASE-9232 Fix javadoc warning and a few findbugs items

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java?rev=1514309&r1=1514308&r2=1514309&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
Thu Aug 15 14:59:00 2013
@@ -66,7 +66,7 @@ public class RpcRetryingCaller<T> {
   private final int retries;
 
   public RpcRetryingCaller(Configuration conf) {
-    this.pause = conf.getLong(HConstants.HBASE_CLIENT_PAUSE, 
+    this.pause = conf.getLong(HConstants.HBASE_CLIENT_PAUSE,
       HConstants.DEFAULT_HBASE_CLIENT_PAUSE);
     this.retries =
         conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
@@ -224,4 +224,4 @@ public class RpcRetryingCaller<T> {
     }
     return t;
   }
-}
\ No newline at end of file
+}

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java?rev=1514309&r1=1514308&r2=1514309&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java Thu
Aug 15 14:59:00 2013
@@ -466,6 +466,8 @@ public class RpcClient {
      *  It is up to the user code to check this status.
      * @param call to add
      */
+    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NN_NAKED_NOTIFY",
+      justification="Notify because new call available for processing")
     protected synchronized void addCall(Call call) {
       // If the connection is about to close, we manage this as if the call was already added
       //  to the connection calls list. If not, the connection creations are serialized,
as
@@ -1149,6 +1151,8 @@ public class RpcClient {
       cleanupCalls(0);
     }
 
+    @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NN_NAKED_NOTIFY",
+      justification="Notify because timedout")
     protected void cleanupCalls(long rpcTimeout) {
       Iterator<Entry<Integer, Call>> itor = calls.entrySet().iterator();
       while (itor.hasNext()) {
@@ -1184,9 +1188,7 @@ public class RpcClient {
         }
         if (!shouldCloseConnection.get()) {
           closeException = null;
-          if (socket != null) {
-            socket.setSoTimeout((int) rpcTimeout);
-          }
+          setSocketTimeout(socket, (int) rpcTimeout);
         }
       } catch (SocketException e) {
         LOG.debug("Couldn't lower timeout, which may result in longer than expected calls");
@@ -1194,6 +1196,14 @@ public class RpcClient {
     }
   }
 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="IS2_INCONSISTENT_SYNC",
+    justification="Presume sync not needed setting socket timeout")
+  private static void setSocketTimeout(final Socket socket, final int rpcTimeout)
+  throws java.net.SocketException {
+    if (socket == null) return;
+    socket.setSoTimeout(rpcTimeout);
+  }
+
   /**
    * Client-side call timeout
    */
@@ -1649,4 +1659,4 @@ public class RpcClient {
         this.isa, this.rpcTimeout);
     }
   }
-}
\ No newline at end of file
+}

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java?rev=1514309&r1=1514308&r2=1514309&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/TablePermission.java
Thu Aug 15 14:59:00 2013
@@ -310,6 +310,8 @@ public class TablePermission extends Per
   }
 
   @Override
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_NULL_ON_SOME_PATH",
+    justification="Passed on construction except on constructor not to be used")
   public boolean equals(Object obj) {
     if (!(obj instanceof TablePermission)) {
       return false;



Mime
View raw message