private void processResponseForConnectionHeader() throws IOException { // if no response excepted, return if (!waitingConnectionHeaderResponse) return; try { // read the ConnectionHeaderResponse from server int len = this.in.readInt(); byte[] buff = new byte[len]; int readSize = this.in.read(buff); if (LOG.isDebugEnabled()) { LOG.debug("Length of response for connection header:" + readSize); } RPCProtos.ConnectionHeaderResponse connectionHeaderResponse = RPCProtos.ConnectionHeaderResponse.parseFrom(buff); // Get the CryptoCipherMeta, update the HBaseSaslRpcClient for Crypto Cipher if (connectionHeaderResponse.hasCryptoCipherMeta()) { negotiateCryptoAes(connectionHeaderResponse.getCryptoCipherMeta()); } waitingConnectionHeaderResponse = false; } catch (SocketTimeoutException ste) { LOG.error(HBaseMarkers.FATAL, "Can't get the connection header response for rpc timeout, " + "please check if server has the correct configuration to support the additional " + "function.", ste); // timeout when waiting the connection header response, ignore the additional function throw new IOException("Timeout while waiting connection header response", ste); } }
private void processResponseForConnectionHeader() throws IOException { // if no response excepted, return if (!waitingConnectionHeaderResponse) return; try { // read the ConnectionHeaderResponse from server int len = this.in.readInt(); byte[] buff = new byte[len]; int readSize = this.in.read(buff); if (LOG.isDebugEnabled()) { LOG.debug("Length of response for connection header:" + readSize); } RPCProtos.ConnectionHeaderResponse connectionHeaderResponse = RPCProtos.ConnectionHeaderResponse.parseFrom(buff); // Get the CryptoCipherMeta, update the HBaseSaslRpcClient for Crypto Cipher if (connectionHeaderResponse.hasCryptoCipherMeta()) { negotiateCryptoAes(connectionHeaderResponse.getCryptoCipherMeta()); } waitingConnectionHeaderResponse = false; } catch (SocketTimeoutException ste) { LOG.error(HBaseMarkers.FATAL, "Can't get the connection header response for rpc timeout, " + "please check if server has the correct configuration to support the additional " + "function.", ste); // timeout when waiting the connection header response, ignore the additional function throw new IOException("Timeout while waiting connection header response", ste); } }
private void processResponseForConnectionHeader() throws IOException { // if no response excepted, return if (!waitingConnectionHeaderResponse) return; try { // read the ConnectionHeaderResponse from server int len = this.in.readInt(); byte[] buff = new byte[len]; int readSize = this.in.read(buff); if (LOG.isDebugEnabled()) { LOG.debug("Length of response for connection header:" + readSize); } RPCProtos.ConnectionHeaderResponse connectionHeaderResponse = RPCProtos.ConnectionHeaderResponse.parseFrom(buff); // Get the CryptoCipherMeta, update the HBaseSaslRpcClient for Crypto Cipher if (connectionHeaderResponse.hasCryptoCipherMeta()) { negotiateCryptoAes(connectionHeaderResponse.getCryptoCipherMeta()); } waitingConnectionHeaderResponse = false; } catch (SocketTimeoutException ste) { LOG.error(HBaseMarkers.FATAL, "Can't get the connection header response for rpc timeout, " + "please check if server has the correct configuration to support the additional " + "function.", ste); // timeout when waiting the connection header response, ignore the additional function throw new IOException("Timeout while waiting connection header response", ste); } }