hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-5162 Basic client pushback mechanism (Jesse Yates); ADDENDUM
Date Wed, 17 Dec 2014 05:10:07 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 13970bfa5 -> f7154e1ac


HBASE-5162 Basic client pushback mechanism (Jesse Yates); ADDENDUM


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

Branch: refs/heads/master
Commit: f7154e1ac9e6c0bd2dd3c39078a52d49d3485504
Parents: 13970bf
Author: stack <stack@apache.org>
Authored: Tue Dec 16 21:09:52 2014 -0800
Committer: stack <stack@apache.org>
Committed: Tue Dec 16 21:09:52 2014 -0800

----------------------------------------------------------------------
 hbase-client/pom.xml                            | 44 ++++++++++++++++----
 .../hbase/client/RpcRetryingCallerFactory.java  |  9 ++--
 .../client/StatsTrackingRpcRetryingCaller.java  |  2 +-
 .../hadoop/hbase/client/TestClientPushback.java | 12 +++---
 4 files changed, 49 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f7154e1a/hbase-client/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index 5d21ea3..a1d9cef 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -108,6 +108,16 @@
     <dependency>
       <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-common</artifactId>
+      <exclusions>
+            <exclusion>
+              <groupId>org.apache.hadoop</groupId>
+              <artifactId>hadoop-mapreduce-client-core</artifactId>
+            </exclusion>
+            <exclusion>
+              <groupId>com.google.guava</groupId>
+              <artifactId>guava</artifactId>
+            </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
@@ -136,14 +146,6 @@
       <artifactId>commons-logging</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-    </dependency>
-    <dependency>
       <groupId>io.netty</groupId>
       <artifactId>netty-all</artifactId>
     </dependency>
@@ -220,14 +222,38 @@
           <artifactId>hadoop-common</artifactId>
           <exclusions>
             <exclusion>
+              <groupId>com.google.code.findbugs</groupId>
+              <artifactId>jsr305</artifactId>
+            </exclusion>
+            <exclusion>
+              <groupId>com.github.stephenc.findbugs</groupId>
+              <artifactId>findbugs-annotations</artifactId>
+            </exclusion>
+            <exclusion>
+              <groupId>net.java.dev.jets3t</groupId>
+              <artifactId>jets3t</artifactId>
+            </exclusion>
+            <exclusion>
               <groupId>javax.servlet.jsp</groupId>
               <artifactId>jsp-api</artifactId>
             </exclusion>
             <exclusion>
+              <groupId>org.mortbay.jetty</groupId>
+              <artifactId>jetty</artifactId>
+            </exclusion>
+            <exclusion>
               <groupId>com.sun.jersey</groupId>
               <artifactId>jersey-server</artifactId>
             </exclusion>
             <exclusion>
+              <groupId>com.sun.jersey</groupId>
+              <artifactId>jersey-core</artifactId>
+            </exclusion>
+            <exclusion>
+              <groupId>com.sun.jersey</groupId>
+              <artifactId>jersey-json</artifactId>
+            </exclusion> 
+            <exclusion>
               <groupId>javax.servlet</groupId>
               <artifactId>servlet-api</artifactId>
             </exclusion>
@@ -241,6 +267,7 @@
             </exclusion>
           </exclusions>
         </dependency>
+<!--
         <dependency>
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-auth</artifactId>
@@ -255,6 +282,7 @@
           </exclusion>
         </exclusions>
         </dependency>
+-->
       </dependencies>
     </profile>
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/f7154e1a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
index 6f2760f..0af8210 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
@@ -90,11 +90,14 @@ public class RpcRetryingCallerFactory {
     String clazzName = RpcRetryingCallerFactory.class.getName();
     String rpcCallerFactoryClazz =
         configuration.get(RpcRetryingCallerFactory.CUSTOM_CALLER_CONF_KEY, clazzName);
+    RpcRetryingCallerFactory factory;
     if (rpcCallerFactoryClazz.equals(clazzName)) {
-      return new RpcRetryingCallerFactory(configuration, interceptor);
+      factory = new RpcRetryingCallerFactory(configuration, interceptor);
+    } else {
+      factory = ReflectionUtils.instantiateWithCustomCtor(
+          rpcCallerFactoryClazz, new Class[] { Configuration.class },
+          new Object[] { configuration });
     }
-    RpcRetryingCallerFactory factory = ReflectionUtils.instantiateWithCustomCtor(
-        rpcCallerFactoryClazz, new Class[] { Configuration.class }, new Object[] { configuration
});
 
     // setting for backwards compat with existing caller factories, rather than in the ctor
     factory.setStatisticTracker(stats);

http://git-wip-us.apache.org/repos/asf/hbase/blob/f7154e1a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/StatsTrackingRpcRetryingCaller.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/StatsTrackingRpcRetryingCaller.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/StatsTrackingRpcRetryingCaller.java
index cec0ee5..e82f1e8 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/StatsTrackingRpcRetryingCaller.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/StatsTrackingRpcRetryingCaller.java
@@ -64,7 +64,7 @@ public class StatsTrackingRpcRetryingCaller<T> implements RpcRetryingCaller<T>
{
 
     // mutli-server callables span multiple regions, so they don't have a location,
     // but they are region server callables, so we have to handle them when we process the
-    // result, not in here
+    // result in AsyncProcess#receiveMultiAction, not in here
     if (callable instanceof MultiServerCallable) {
       return result;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/f7154e1a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
index dfb9a70..76914e0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
@@ -50,8 +50,7 @@ public class TestClientPushback {
     conf.setBoolean(HConstants.ENABLE_CLIENT_BACKPRESSURE, true);
     // turn the memstore size way down so we don't need to write a lot to see changes in
memstore
     // load
-    conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE,
-        flushSizeBytes);
+    conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeBytes);
     // ensure we block the flushes when we are double that flushsize
     conf.setLong("hbase.hregion.memstore.block.multiplier", 2);
 
@@ -65,10 +64,11 @@ public class TestClientPushback {
   }
 
   @Test
-  public void testClientTrackesServerPushback() throws Exception{
+  public void testClientTracksServerPushback() throws Exception{
     Configuration conf = UTIL.getConfiguration();
     TableName tablename = TableName.valueOf(tableName);
-    HTable table = new HTable(conf, tablename);
+    Connection conn = ConnectionFactory.createConnection(conf);
+    HTable table = (HTable) conn.getTable(tablename);
     //make sure we flush after each put
     table.setAutoFlushTo(true);
 
@@ -78,8 +78,8 @@ public class TestClientPushback {
     table.put(p);
 
     // get the stats for the region hosting our table
-    ClusterConnection conn = ConnectionManager.getConnectionInternal(conf);
-    ServerStatisticTracker stats = conn.getStatisticsTracker();
+    ClusterConnection connection = table.connection;
+    ServerStatisticTracker stats = connection.getStatisticsTracker();
     assertNotNull( "No stats configured for the client!", stats);
     // get the names so we can query the stats
     ServerName server = UTIL.getHBaseCluster().getRegionServer(0).getServerName();


Mime
View raw message