Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5970A1793A for ; Thu, 6 Nov 2014 04:34:46 +0000 (UTC) Received: (qmail 16595 invoked by uid 500); 6 Nov 2014 04:34:46 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 16518 invoked by uid 500); 6 Nov 2014 04:34:46 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 16509 invoked by uid 99); 6 Nov 2014 04:34:46 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Nov 2014 04:34:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C18DB93072D; Thu, 6 Nov 2014 04:34:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wheat9@apache.org To: common-commits@hadoop.apache.org Message-Id: <942df0ac701648f6a72bec3161a0023a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: HDFS-7367. HDFS short-circuit read cannot negotiate shared memory slot and file descriptors when SASL is enabled on DataTransferProtocol. Contributed by Chris Nauroth. Date: Thu, 6 Nov 2014 04:34:45 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/trunk 240cb59b9 -> 8e33d4bdb 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/8e33d4bd Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8e33d4bd Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8e33d4bd Branch: refs/heads/trunk Commit: 8e33d4bdb35eed8b60cf197247fad465b1912ef7 Parents: 240cb59 Author: Haohui Mai Authored: Wed Nov 5 20:29:17 2014 -0800 Committer: Haohui Mai Committed: Wed Nov 5 20:31:39 2014 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 6 +++++- .../protocol/datatransfer/sasl/SaslDataTransferServer.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e33d4bd/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 c6e848f..59f6d92 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1027,9 +1027,13 @@ Release 2.6.0 - UNRELEASED HDFS-7218. FSNamesystem ACL operations should write to audit log on failure. (clamb via yliu) - HDFS-7199. DFSOutputStream should not silently drop data if DataStreamer + HDFS-7199. DFSOutputStream should not silently drop data if DataStreamer crashes with an unchecked exception (rushabhs via cmccabe) + 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/8e33d4bd/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 saslProps = saslPropsResolver.getServerProperties( getPeerAddress(peer));