kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/2] incubator-kudu git commit: [java client] fix ClassCastException: DeferredGroupException cannot be cast to ArrayList
Date Wed, 11 May 2016 18:12:00 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master f9708338a -> 659cfc42d


[java client] fix ClassCastException: DeferredGroupException cannot be cast to ArrayList

For some reason the shutdown method was terminating with a addBothDeferring,
which is wrong because we specifically say in the javadoc that errors will
come back via the errback. This is fixed and a comment was added.

Testing this would require many contortions at the moment.

Change-Id: I1f3d084fae276c5dbbb46f36c43ad0d337f260a8
Reviewed-on: http://gerrit.cloudera.org:8080/3020
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


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

Branch: refs/heads/master
Commit: c9910207068e30bbb431c5516a4a9e459c711105
Parents: f970833
Author: Jean-Daniel Cryans <jdcryans@apache.org>
Authored: Tue May 10 15:51:50 2016 -0700
Committer: Jean-Daniel Cryans <jdcryans@gerrit.cloudera.org>
Committed: Wed May 11 17:36:42 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/kududb/client/AsyncKuduClient.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/c9910207/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
index ee56f1d..f67f8a3 100644
--- a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
@@ -1480,15 +1480,17 @@ public class AsyncKuduClient implements AutoCloseable {
     // 2. Terminate all connections.
     final class DisconnectCB implements Callback<Deferred<ArrayList<Void>>,
         ArrayList<List<OperationResponse>>> {
-      public Deferred<ArrayList<Void>> call(final ArrayList<List<OperationResponse>>
arg) {
+      public Deferred<ArrayList<Void>> call(ArrayList<List<OperationResponse>>
ignoredResponses) {
         return disconnectEverything().addCallback(new ReleaseResourcesCB());
       }
       public String toString() {
         return "disconnect callback";
       }
     }
+
     // 1. Flush everything.
-    return closeAllSessions().addBothDeferring(new DisconnectCB());
+    // Notice that we do not handle the errback, if there's an exception it will come straight
out.
+    return closeAllSessions().addCallbackDeferring(new DisconnectCB());
   }
 
   private void checkIsClosed() {


Mime
View raw message