You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by jd...@apache.org on 2017/01/13 16:36:10 UTC
[1/2] kudu git commit: KUDU-1771. Java client "connection refused"
errors logged as "connection reset"
Repository: kudu
Updated Branches:
refs/heads/master f907db137 -> b7e2089f8
KUDU-1771. Java client "connection refused" errors logged as
"connection reset"
This commit changes cleanup() to accepts a string input.
It allows a caller to customize its error message based
on the caller site context.
Change-Id: If9eb40f11757ae76bc430b3f513b96592068d6e2
Reviewed-on: http://gerrit.cloudera.org:8080/5680
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/ef710cd0
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/ef710cd0
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/ef710cd0
Branch: refs/heads/master
Commit: ef710cd00c3fa93ab63c175ed32e946ca057702e
Parents: f907db1
Author: Jun He <ju...@gmail.com>
Authored: Tue Jan 10 23:36:31 2017 -0800
Committer: Jean-Daniel Cryans <jd...@apache.org>
Committed: Fri Jan 13 16:32:35 2017 +0000
----------------------------------------------------------------------
.../java/org/apache/kudu/client/TabletClient.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/ef710cd0/java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java b/java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
index eb6adf0..4550751 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
@@ -680,7 +680,7 @@ public class TabletClient extends ReplayingDecoder<VoidEnum> {
final ChannelStateEvent e) throws Exception {
chan = null;
super.channelDisconnected(ctx, e); // Let the ReplayingDecoder cleanup.
- cleanup(e.getChannel());
+ cleanup("Connection disconnected");
}
@Override
@@ -691,7 +691,7 @@ public class TabletClient extends ReplayingDecoder<VoidEnum> {
// super.channelDisconnected(). If we get here without getting a
// DISCONNECTED event, then we were never connected in the first place so
// the ReplayingDecoder has nothing to cleanup.
- cleanup(e.getChannel());
+ cleanup("Connection closed");
}
/**
@@ -699,8 +699,10 @@ public class TabletClient extends ReplayingDecoder<VoidEnum> {
* <p>
* All RPCs in flight will fail with a {@link RecoverableException} and
* all edits buffered will be re-scheduled.
+ *
+ * @param errorMessage string to describe the cause of cleanup
*/
- private void cleanup(final Channel chan) {
+ private void cleanup(final String errorMessage) {
final ArrayList<KuduRpc<?>> rpcs;
// The timing of this block is critical. If this TabletClient is 'dead' then it means that
@@ -725,8 +727,8 @@ public class TabletClient extends ReplayingDecoder<VoidEnum> {
pendingRpcs = null;
}
- Status statusNetworkError =
- Status.NetworkError(getPeerUuidLoggingString() + "Connection reset");
+ Status statusNetworkError = Status.NetworkError(getPeerUuidLoggingString() +
+ (errorMessage == null ? "Connection reset" : errorMessage));
RecoverableException exception = new RecoverableException(statusNetworkError);
failOrRetryRpcs(rpcs, exception);
@@ -794,9 +796,9 @@ public class TabletClient extends ReplayingDecoder<VoidEnum> {
gotUncaughtException = true;
}
if (c.isOpen()) {
- Channels.close(c); // Will trigger channelClosed(), which will cleanup()
- } else { // else: presumably a connection timeout.
- cleanup(c); // => need to cleanup() from here directly.
+ Channels.close(c); // Will trigger channelClosed(), which will cleanup()
+ } else { // else: presumably a connection timeout.
+ cleanup(e.getMessage()); // => need to cleanup() from here directly.
}
}
[2/2] kudu git commit: Remove Schema#toString from RowResult#toString
Posted by jd...@apache.org.
Remove Schema#toString from RowResult#toString
In RowResult#toString, the result string is consists of some strings including
the result of Schema#toString but Schema doesn't explicitly declare the method
so we should remove it.
Change-Id: Id2e01cc1cc52958c73dfd75304a826ea033ce785
Reviewed-on: http://gerrit.cloudera.org:8080/5534
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/b7e2089f
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/b7e2089f
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/b7e2089f
Branch: refs/heads/master
Commit: b7e2089f870cf35d3bb95ac0a099e661df392cdc
Parents: ef710cd
Author: Kousuke Saruta <sa...@oss.nttdata.co.jp>
Authored: Fri Dec 16 14:01:33 2016 +0900
Committer: Jean-Daniel Cryans <jd...@apache.org>
Committed: Fri Jan 13 16:35:38 2017 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/kudu/client/RowResult.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/b7e2089f/java/kudu-client/src/main/java/org/apache/kudu/client/RowResult.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/RowResult.java b/java/kudu-client/src/main/java/org/apache/kudu/client/RowResult.java
index d85e777..7a10380 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/RowResult.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/RowResult.java
@@ -507,8 +507,7 @@ public class RowResult {
@Override
public String toString() {
- return "RowResult index: " + this.index + ", size: " + this.rowSize + ", " +
- "schema: " + this.schema;
+ return "RowResult index: " + this.index + ", size: " + this.rowSize;
}
/**