Repository: hadoop Updated Branches: refs/heads/branch-2.6 888fc4af4 -> 83ed42fa6
HDFS-7367. HDFS short-circuit read cannot negotiate shared memory slot and file descriptors when SASL is enabled on DataTransferProtocol. Contributed by Chris Nauroth. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/83ed42fa Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/83ed42fa Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/83ed42fa Branch: refs/heads/branch-2.6 Commit: 83ed42fa6bf83eb429001a344d6dee9820b9ef4e Parents: 888fc4a Author: Haohui Mai <[email protected]> Authored: Wed Nov 5 20:29:17 2014 -0800 Committer: Haohui Mai <[email protected]> Committed: Wed Nov 5 20:34:25 2014 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 4 ++++ .../hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java | 5 +++++ 2 files changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/83ed42fa/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 53387ed..44b99ca 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -729,6 +729,10 @@ Release 2.6.0 - UNRELEASED fails on Windows, because we cannot deny access to the file owner. (Chris Nauroth via wheat9) + HDFS-7367. HDFS short-circuit read cannot negotiate shared memory slot and + file descriptors when SASL is enabled on DataTransferProtocol. + (Chris Nauroth via wheat9) + BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS HDFS-6387. HDFS CLI admin tool for creating & deleting an http://git-wip-us.apache.org/repos/asf/hadoop/blob/83ed42fa/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java index 005856d..9f94534 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/SaslDataTransferServer.java @@ -277,6 +277,11 @@ public class SaslDataTransferServer { */ private IOStreamPair getSaslStreams(Peer peer, OutputStream underlyingOut, InputStream underlyingIn, final DatanodeID datanodeId) throws IOException { + if (peer.hasSecureChannel() || + dnConf.getTrustedChannelResolver().isTrusted(getPeerAddress(peer))) { + return new IOStreamPair(underlyingIn, underlyingOut); + } + SaslPropertiesResolver saslPropsResolver = dnConf.getSaslPropsResolver(); Map<String, String> saslProps = saslPropsResolver.getServerProperties( getPeerAddress(peer));
