Adar Dembo has submitted this change and it was merged.

Change subject: [java client] Redirect KuduExceptions to RowError in KuduSession
......................................................................


[java client] Redirect KuduExceptions to RowError in KuduSession

Currently the only RowErrors that the users were going to see were the ones
sent from the tablet servers. Any other client-side error was sent as an
exception, even timeouts. The other problem with timeouts is that, when using
AUTO_FLUSH_BACKGROUND, background flush responses that the client isn't waiting
on would get lost since we don't have an equivalent to the error collector
for exceptions. You could find them in the log, but that's it.

This patch augments the errbacks in AsyncKuduSession to start creating
OperationResponses for KuduExceptions. For those cases, we return a
OperationResponse (or a list of) which switches us from the _errback_ to the
_callback_ track. Other exceptions are still thrown.

This patch also makes some changes for an issue that Adar saw in 
TestAsyncKuduSession
that was kind of hard to debug, a stray buffer was being flushed against a 
table that
was deleted (but then the table's name was reused which made reading the logs 
harder).

The stray buffer most likely came from testBatchErrorCauseSessionStuck which 
isn't
checking for all the error conditions. This patch adds more checking but 
doesn't fix
the root cause (which is currently unknown) so it *may* make it fail more often,
but in more obvious ways.

Change-Id: Ie871cde658036d04b9c07a3efe2fdfb4a7e98273
Reviewed-on: http://gerrit.cloudera.org:8080/4949
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduClient.java
M 
java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduSession.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduSession.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduTable.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTimeouts.java
6 files changed, 137 insertions(+), 70 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie871cde658036d04b9c07a3efe2fdfb4a7e98273
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Kudu Jenkins

Reply via email to