BukrosSzabolcs commented on a change in pull request #1921:
URL: https://github.com/apache/hbase/pull/1921#discussion_r441613924
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/security/HBaseSaslRpcClient.java
##########
@@ -148,6 +148,18 @@ public boolean saslConnect(InputStream inS, OutputStream
outS) throws IOExceptio
inStream.readFully(saslToken);
}
}
+
+ if(isComplete()){
+ try {
+ readStatus(inStream);
+ }
+ catch (Exception e){
+ if(e instanceof RemoteException){
+ LOG.debug("Sasl connection failed: ", e);
+ throw e;
Review comment:
You are right, the if condition is not necessary, I'll fix that.
As far as I understand `SaslStatus.SUCCESS` should have been handled at this
point and having no new data in the stream is a valid usecase. If we would
re-throw IOExceptions we would re-throw the `EOFException` we would get when
trying to read from such a stream.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]