diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 424d5346e92..9989ceeb44f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -963,12 +963,11 @@ public class HBaseAdmin implements Abortable, Closeable { return execute(new MasterMonitorCallable>() { @Override public Pair call() throws ServiceException { - GetSchemaAlterStatusRequest req = - RequestConverter.buildGetSchemaAlterStatusRequest(tableName); - GetSchemaAlterStatusResponse ret = masterMonitor.getSchemaAlterStatus(null,req); - Pair pair = - new Pair( - new Integer(ret.getYetToUpdateRegions()),new Integer(ret.getTotalRegions())); + GetSchemaAlterStatusRequest req = RequestConverter + .buildGetSchemaAlterStatusRequest(tableName); + GetSchemaAlterStatusResponse ret = masterMonitor.getSchemaAlterStatus(null, req); + Pair pair = new Pair(Integer.valueOf(ret + .getYetToUpdateRegions()), Integer.valueOf(ret.getTotalRegions())); return pair; } }); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java index 8f0cef1d4c7..204b24ae276 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java @@ -1133,7 +1133,7 @@ public abstract class HBaseServer implements RpcServer { SaslServer saslServer; private boolean useWrap = false; // Fake 'call' for failed authorization response - private final int AUTHROIZATION_FAILED_CALLID = -1; + private static final int AUTHROIZATION_FAILED_CALLID = -1; private final Call authFailedCall = new Call(AUTHROIZATION_FAILED_CALLID, null, this, null, 0, null); private ByteArrayOutputStream authFailedResponse = diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java index b4b139bd318..d43fd7f434b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java @@ -557,11 +557,10 @@ public class StochasticLoadBalancer extends BaseLoadBalancer { double value = 0; // Compute the min, value, and max. - for (String tableName : tableRegionsTotal.keySet()) { - max += tableRegionsTotal.get(tableName).doubleValue(); - min += tableRegionsTotal.get(tableName).doubleValue() / (double) clusterState.size(); - value += tableCostSeenSoFar.get(tableName).doubleValue(); - + for (Entry currentEntry : tableRegionsTotal.entrySet()) { + max += tableRegionsTotal.get(currentEntry.getKey()).doubleValue(); + min += tableRegionsTotal.get(currentEntry.getKey()).doubleValue() / clusterState.size(); + value += tableCostSeenSoFar.get(currentEntry.getKey()).doubleValue(); } return scale(min, max, value); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java index 492e2edfd7e..01b8b23354e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/IncrementCoalescer.java @@ -223,7 +223,7 @@ public class IncrementCoalescer implements IncrementCoalescerMBean { Long value = countersMap.remove(key); if (value == null) { // There was nothing there, create a new value - value = new Long(currentAmount); + value = Long.valueOf(currentAmount); } else { value += currentAmount; successfulCoalescings.incrementAndGet();