You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by li...@apache.org on 2017/05/25 03:00:51 UTC
hive git commit: HIVE-16613: SaslClientHandler.sendHello is eating
exceptions (Rui reviewed by Xuefu)
Repository: hive
Updated Branches:
refs/heads/master ef6a90af4 -> 8a093a7d2
HIVE-16613: SaslClientHandler.sendHello is eating exceptions (Rui reviewed by Xuefu)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/8a093a7d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/8a093a7d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/8a093a7d
Branch: refs/heads/master
Commit: 8a093a7d24705e317a84f0af3fa1e4e5ad941b98
Parents: ef6a90a
Author: Rui Li <li...@apache.org>
Authored: Thu May 25 11:00:46 2017 +0800
Committer: Rui Li <li...@apache.org>
Committed: Thu May 25 11:00:46 2017 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hive/spark/client/rpc/Rpc.java | 7 ++++++-
.../java/org/apache/hive/spark/client/rpc/SaslHandler.java | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/8a093a7d/spark-client/src/main/java/org/apache/hive/spark/client/rpc/Rpc.java
----------------------------------------------------------------------
diff --git a/spark-client/src/main/java/org/apache/hive/spark/client/rpc/Rpc.java b/spark-client/src/main/java/org/apache/hive/spark/client/rpc/Rpc.java
index 680e6b8..cbbfb1c 100644
--- a/spark-client/src/main/java/org/apache/hive/spark/client/rpc/Rpc.java
+++ b/spark-client/src/main/java/org/apache/hive/spark/client/rpc/Rpc.java
@@ -491,7 +491,12 @@ public class Rpc implements Closeable {
void sendHello(Channel c) throws Exception {
byte[] hello = client.hasInitialResponse() ?
client.evaluateChallenge(new byte[0]) : new byte[0];
- c.writeAndFlush(new SaslMessage(clientId, hello));
+ c.writeAndFlush(new SaslMessage(clientId, hello)).addListener(future -> {
+ if (!future.isSuccess()) {
+ LOG.error("Failed to send hello to server", future.cause());
+ onError(future.cause());
+ }
+ });
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/8a093a7d/spark-client/src/main/java/org/apache/hive/spark/client/rpc/SaslHandler.java
----------------------------------------------------------------------
diff --git a/spark-client/src/main/java/org/apache/hive/spark/client/rpc/SaslHandler.java b/spark-client/src/main/java/org/apache/hive/spark/client/rpc/SaslHandler.java
index 26edc63..8a42773 100644
--- a/spark-client/src/main/java/org/apache/hive/spark/client/rpc/SaslHandler.java
+++ b/spark-client/src/main/java/org/apache/hive/spark/client/rpc/SaslHandler.java
@@ -36,7 +36,7 @@ abstract class SaslHandler extends SimpleChannelInboundHandler<Rpc.SaslMessage>
// LOG is not static to make debugging easier (being able to identify which sub-class
// generated the log message).
- private final Logger LOG;
+ protected final Logger LOG;
private final boolean requiresEncryption;
private KryoMessageCodec kryo;
private boolean hasAuthResponse = false;