Skip to content

Commit

Permalink
HADOOP-16292. Refactor checkTrustAndSend in SaslDataTransferClient to…
Browse files Browse the repository at this point in the history
… make it cleaner. Contributed by Sherwood Zheng.
  • Loading branch information
Chen Liang committed May 3, 2019
1 parent f1875b2 commit 1d59cc4
Showing 1 changed file with 1 addition and 10 deletions.
Expand Up @@ -169,7 +169,7 @@ public Peer peerSend(Peer peer, DataEncryptionKeyFactory encryptionKeyFactory,
throws IOException {
IOStreamPair ios = checkTrustAndSend(getPeerAddress(peer),
peer.getOutputStream(), peer.getInputStream(), encryptionKeyFactory,
accessToken, datanodeId);
accessToken, datanodeId, null);
// TODO: Consider renaming EncryptedPeer to SaslPeer.
return ios != null ? new EncryptedPeer(peer, ios) : peer;
}
Expand Down Expand Up @@ -219,15 +219,6 @@ public IOStreamPair socketSend(
* @return new pair of streams, wrapped after SASL negotiation
* @throws IOException for any error
*/
private IOStreamPair checkTrustAndSend(InetAddress addr,
OutputStream underlyingOut, InputStream underlyingIn,
DataEncryptionKeyFactory encryptionKeyFactory,
Token<BlockTokenIdentifier> accessToken, DatanodeID datanodeId)
throws IOException {
return checkTrustAndSend(addr, underlyingOut, underlyingIn,
encryptionKeyFactory, accessToken, datanodeId, null);
}

private IOStreamPair checkTrustAndSend(
InetAddress addr, OutputStream underlyingOut, InputStream underlyingIn,
DataEncryptionKeyFactory encryptionKeyFactory,
Expand Down

0 comments on commit 1d59cc4

Please sign in to comment.