Hello Adar Dembo, Alexey Serbin,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/4949
to review the following change.
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 flushes that the client isn't waiting on
would get lost since they don't have a recipient. You could find them in the
log, but that's it.
This patch augments one of the errbacks in AsyncKuduSession to start creating
OperationResponses for KuduExceptions. For those cases, we return a
List<OperationResponses which switches us from the _errback_ to the _callback_
track. Other exceptions are sent straight back.
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 most likely came from testBatchErrorCauseSessionStuck which has
some loose ends, that this patch is fixing. It *may* make it more often,
but in more obvious ways.
Change-Id: Ie871cde658036d04b9c07a3efe2fdfb4a7e98273
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
M
java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduSession.java
2 files changed, 93 insertions(+), 33 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/49/4949/1
--
To view, visit http://gerrit.cloudera.org:8080/4949
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie871cde658036d04b9c07a3efe2fdfb4a7e98273
Gerrit-PatchSet: 1
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]>