BukrosSzabolcs commented on a change in pull request #1921:
URL: https://github.com/apache/hbase/pull/1921#discussion_r442089279
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/security/HBaseSaslRpcClient.java
##########
@@ -148,6 +148,16 @@ public boolean saslConnect(InputStream inS, OutputStream
outS) throws IOExceptio
inStream.readFully(saslToken);
}
}
+
+ try {
+ readStatus(inStream);
+ }
+ catch (IOException e){
+ if(e instanceof RemoteException){
Review comment:
I just run a test on a test system. This time authentication was set up
correctly and the goal was to see what happens in a normal usecase.
When it reached the new `readStatus(inStream);` The following exception was
thrown:
```
java.net.SocketTimeoutException: 20000 millis timeout while waiting for
channel to be ready for read. ch : java.nio.channels.SocketChannel[connected
local=/xxx remote=yyy ]
at
org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:164)
at
org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:161)
at
org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:131)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
at java.io.DataInputStream.readInt(DataInputStream.java:387)
at
org.apache.hadoop.hbase.security.HBaseSaslRpcClient.readStatus(HBaseSaslRpcClient.java:51)
```
This is an `IOException`. This is exactly the kind of exception that we do
not want to re-throw, because it is caused by the additional `readStatus` and
would not exist otherwise. The line `if(e instanceof RemoteException)` is there
to filter out exceptions like this.
----------------------------------------------------------------
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]