hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject git commit: HBASE-11837: Scanner from RegionCoprocessorEnvironment.getTable(TableName) returns no local data
Date Fri, 29 Aug 2014 18:21:27 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 6a775e087 -> fd35f6704


HBASE-11837: Scanner from RegionCoprocessorEnvironment.getTable(TableName) returns no local
data


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

Branch: refs/heads/0.98
Commit: fd35f67040dce49bebb6f01db3b402eac136b90d
Parents: 6a775e0
Author: Jeffrey Zhong <jeffreyz@apache.org>
Authored: Fri Aug 29 11:20:26 2014 -0700
Committer: Jeffrey Zhong <jeffreyz@apache.org>
Committed: Fri Aug 29 11:20:41 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/client/CoprocessorHConnection.java     | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fd35f670/hbase-server/src/main/java/org/apache/hadoop/hbase/client/CoprocessorHConnection.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/CoprocessorHConnection.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/CoprocessorHConnection.java
index 789db5e..792e550 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/CoprocessorHConnection.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/CoprocessorHConnection.java
@@ -22,10 +22,12 @@ import java.io.IOException;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.CellScanner;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.client.HConnectionManager.HConnectionImplementation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
+import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController;
 import org.apache.hadoop.hbase.ipc.RpcServerInterface;
 import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler;
 import org.apache.hadoop.hbase.monitoring.TaskMonitor;
@@ -34,6 +36,7 @@ import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
+import org.apache.hadoop.hbase.util.Pair;
 
 import com.google.protobuf.BlockingRpcChannel;
 import com.google.protobuf.BlockingService;
@@ -132,8 +135,13 @@ public class CoprocessorHConnection extends HConnectionImplementation
{
       public Message callBlockingMethod(MethodDescriptor method, RpcController controller,
           Message request, Message responsePrototype) throws ServiceException {
         try {
-          // we never need a cell-scanner - everything is already fully formed
-          return rpc.call(blocking, method, request, null, timestamp, status).getFirst();
+          Pair<Message, CellScanner> ret = rpc.call(blocking, method, request, null,
timestamp,
+            status);
+          if (ret.getSecond() != null) {
+            PayloadCarryingRpcController rpcc = (PayloadCarryingRpcController) controller;
+            rpcc.setCellScanner(ret.getSecond());
+          }
+          return ret.getFirst();
         } catch (IOException e) {
           throw new ServiceException(e);
         }


Mime
View raw message