Hello Dan Burkert, Grant Henke,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/10916
to review the following change.
Change subject: java: Fix NPE when connection torn down
......................................................................
java: Fix NPE when connection torn down
In cases where there is no message in a caught exception we would end up
with a NullPointerException in the Status constructor. Instead of
passing the message from the exception to Status, pass the
stringification of the exception instead, which will include the
exception type and the message, if present.
Found based on observing the following exception thrown from a Spark job
when the connection had timed out on read:
18/07/09 18:48:21 ERROR client.Connection: [peer
master-mpercy-cdh60-1.vpc.cloudera.com:7051(mpercy-cdh60-1.vpc.cloudera.com:7051)]
unexpected exception from downstream on [id: 0x64defe6e, 0.0.0.0/0.0.0.0:51086]
java.lang.NullPointerException
at org.apache.kudu.client.Status.<init>(Status.java:54)
at org.apache.kudu.client.Status.<init>(Status.java:68)
at org.apache.kudu.client.Status.NetworkError(Status.java:159)
at org.apache.kudu.client.Connection.channelClosed(Connection.java:271)
at
org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:88)
at org.apache.kudu.client.Connection.handleUpstream(Connection.java:243)
Change-Id: I0b2c9f75d5a25e40abc261404b99370483db17c3
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Connection.java
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/16/10916/1
--
To view, visit http://gerrit.cloudera.org:8080/10916
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b2c9f75d5a25e40abc261404b99370483db17c3
Gerrit-Change-Number: 10916
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>