From b7100c934b8ca8e77208949f92a7d173c9e4c558 Mon Sep 17 00:00:00 2001 From: anoopsjohn Date: Tue, 22 Dec 2015 09:58:12 +0530 Subject: [PATCH] HBASE-13158 When client supports CellBlock, return the result Cells as controller payload for get(Get) API also - Addendum --- .../src/main/java/org/apache/hadoop/hbase/client/HTable.java | 2 +- .../java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 35d9a74a956..24dc06a9ea0 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -756,7 +756,7 @@ public class HTable implements HTableInterface, RegionLocator { try { ClientProtos.GetResponse response = getStub().get(controller, request); if (!response.hasResult()) return null; - return ProtobufUtil.toResult(response.getResult()); + return ProtobufUtil.toResult(response.getResult(), controller.cellScanner()); } catch (ServiceException se) { throw ProtobufUtil.getRemoteException(se); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index 907650b2cb9..47305ffb9f5 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -1591,6 +1591,7 @@ public final class ProtobufUtil { try { GetResponse response = client.get(null, request); if (!response.hasResult()) return null; + // We pass 'null' RpcController. So Result will be pure RB. return toResult(response.getResult()); } catch (ServiceException se) { throw getRemoteException(se);