drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/3] drill git commit: Fix issue where FutureBitComment didn't return buffer as part of future.
Date Mon, 11 Jan 2016 06:44:49 GMT
Repository: drill
Updated Branches:
  refs/heads/master 5cb8eb95e -> f964908ae


Fix issue where FutureBitComment didn't return buffer as part of future.


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

Branch: refs/heads/master
Commit: 467c405cf48017f668f779d24978b4ffaa4ea8f0
Parents: 5cb8eb9
Author: Jacques Nadeau <jacques@apache.org>
Authored: Sat Jan 2 16:32:36 2016 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Sat Jan 9 18:33:06 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/rpc/FutureBitCommand.java    | 1 +
 .../java/org/apache/drill/exec/rpc/RpcCheckedFuture.java    | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/467c405c/exec/rpc/src/main/java/org/apache/drill/exec/rpc/FutureBitCommand.java
----------------------------------------------------------------------
diff --git a/exec/rpc/src/main/java/org/apache/drill/exec/rpc/FutureBitCommand.java b/exec/rpc/src/main/java/org/apache/drill/exec/rpc/FutureBitCommand.java
index 53d0772..1b19561 100644
--- a/exec/rpc/src/main/java/org/apache/drill/exec/rpc/FutureBitCommand.java
+++ b/exec/rpc/src/main/java/org/apache/drill/exec/rpc/FutureBitCommand.java
@@ -55,6 +55,7 @@ public abstract class FutureBitCommand<T extends MessageLite, C extends
RemoteCo
 
     @Override
     public void success(T value, ByteBuf buf) {
+      parentFuture.setBuffer(buf);
       settableFuture.set(value);
     }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/467c405c/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcCheckedFuture.java
----------------------------------------------------------------------
diff --git a/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcCheckedFuture.java b/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcCheckedFuture.java
index 11b07ad..8746a20 100644
--- a/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcCheckedFuture.java
+++ b/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcCheckedFuture.java
@@ -30,8 +30,11 @@ public class RpcCheckedFuture<T> extends AbstractCheckedFuture<T,
RpcException>
     super(delegate);
   }
 
-  public void set(T obj, ByteBuf buffer){
-    this.buffer = buffer;
+  public void setBuffer(ByteBuf buffer) {
+    if (buffer != null) {
+      buffer.retain();
+      this.buffer = buffer;
+    }
   }
 
   @Override
@@ -41,7 +44,7 @@ public class RpcCheckedFuture<T> extends AbstractCheckedFuture<T,
RpcException>
 
   @Override
   public ByteBuf getBuffer() {
-    return null;
+    return buffer;
   }
 
 }


Mime
View raw message