hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject hbase git commit: HBASE-12711 Fix new findbugs warnings in hbase-thrift module (Srikanth)
Date Sat, 03 Jan 2015 01:02:53 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 f9ce55558 -> 4083306c3


HBASE-12711 Fix new findbugs warnings in hbase-thrift module (Srikanth)


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

Branch: refs/heads/branch-1.0
Commit: 4083306c3d8a0300c940859a17a55616afd4150c
Parents: f9ce555
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Dec 18 19:32:39 2014 -0800
Committer: Enis Soztutar <enis@apache.org>
Committed: Fri Jan 2 17:01:24 2015 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/thrift/ThriftHttpServlet.java       | 15 ++++++++++-----
 .../org/apache/hadoop/hbase/thrift/ThriftServer.java |  2 +-
 .../apache/hadoop/hbase/thrift2/ThriftServer.java    |  2 +-
 3 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4083306c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java
index 0284772..d8221a6 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.net.util.Base64;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.security.SecurityUtil;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.authorize.AuthorizationException;
@@ -43,15 +44,19 @@ import org.ietf.jgss.GSSManager;
 import org.ietf.jgss.GSSName;
 import org.ietf.jgss.Oid;
 
-
+/**
+ * Thrift Http Servlet is used for performing Kerberos authentication if security is enabled
and
+ * also used for setting the user specified in "doAs" parameter.
+ */
+@InterfaceAudience.Private
 public class ThriftHttpServlet extends TServlet {
   private static final long serialVersionUID = 1L;
   public static final Log LOG = LogFactory.getLog(ThriftHttpServlet.class.getName());
-  private final UserGroupInformation realUser;
-  private final Configuration conf;
+  private transient final UserGroupInformation realUser;
+  private transient final Configuration conf;
   private final boolean securityEnabled;
   private final boolean doAsEnabled;
-  ThriftServerRunner.HBaseHandler hbaseHandler;
+  private transient ThriftServerRunner.HBaseHandler hbaseHandler;
 
   public ThriftHttpServlet(TProcessor processor, TProtocolFactory protocolFactory,
       UserGroupInformation realUser, Configuration conf, ThriftServerRunner.HBaseHandler
@@ -116,7 +121,7 @@ public class ThriftHttpServlet extends TServlet {
   }
 
 
-  class HttpKerberosServerAction implements PrivilegedExceptionAction<String> {
+  private static class HttpKerberosServerAction implements PrivilegedExceptionAction<String>
{
     HttpServletRequest request;
     UserGroupInformation serviceUGI;
     HttpKerberosServerAction(HttpServletRequest request, UserGroupInformation serviceUGI)
{

http://git-wip-us.apache.org/repos/asf/hbase/blob/4083306c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
index c87e5f5..59c7e2d 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
@@ -168,7 +168,7 @@ public class ThriftServer {
     try {
       if (cmd.hasOption("infoport")) {
         String val = cmd.getOptionValue("infoport");
-        conf.setInt("hbase.thrift.info.port", Integer.valueOf(val));
+        conf.setInt("hbase.thrift.info.port", Integer.parseInt(val));
         LOG.debug("Web UI port set to " + val);
       }
     } catch (NumberFormatException e) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/4083306c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
index f79276c..60f4763 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
@@ -409,7 +409,7 @@ public class ThriftServer {
     try {
       if (cmd.hasOption("infoport")) {
         String val = cmd.getOptionValue("infoport");
-        conf.setInt("hbase.thrift.info.port", Integer.valueOf(val));
+        conf.setInt("hbase.thrift.info.port", Integer.parseInt(val));
         log.debug("Web UI port set to " + val);
       }
     } catch (NumberFormatException e) {


Mime
View raw message