From 8304001861073a3f570afc32e25b0280018f427a Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Wed, 20 Aug 2014 22:46:35 +0000 Subject: [PATCH] HDFS-6858. Allow dfs.data.transfer.saslproperties.resolver.class default to hadoop.security.saslproperties.resolver.class. Contributed by Benoy Antony. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1619256 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../protocol/datatransfer/sasl/DataTransferSaslUtil.java | 4 +++- .../hadoop-hdfs/src/main/resources/hdfs-default.xml | 7 ++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8bdfb0e8bc..6bc8e74a85 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -496,6 +496,9 @@ Release 2.6.0 - UNRELEASED HDFS-6188. An ip whitelist based implementation of TrustedChannelResolver. (Benoy Antony via Arpit Agarwal) + HDFS-6858. Allow dfs.data.transfer.saslproperties.resolver.class default to + hadoop.security.saslproperties.resolver.class. (Benoy Antony via cnauroth) + OPTIMIZATIONS HDFS-6690. Deduplicate xattr names in memory. (wang) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java index cd18b9fa0f..81d740f235 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java @@ -162,8 +162,10 @@ public static SaslPropertiesResolver getSaslPropertiesResolver( Configuration saslPropsResolverConf = new Configuration(conf); saslPropsResolverConf.set(HADOOP_RPC_PROTECTION, qops); Class resolverClass = conf.getClass( - DFS_DATA_TRANSFER_SASL_PROPS_RESOLVER_CLASS_KEY, + HADOOP_SECURITY_SASL_PROPS_RESOLVER_CLASS, SaslPropertiesResolver.class, SaslPropertiesResolver.class); + resolverClass = conf.getClass(DFS_DATA_TRANSFER_SASL_PROPS_RESOLVER_CLASS_KEY, + resolverClass, SaslPropertiesResolver.class); saslPropsResolverConf.setClass(HADOOP_SECURITY_SASL_PROPS_RESOLVER_CLASS, resolverClass, SaslPropertiesResolver.class); SaslPropertiesResolver resolver = SaslPropertiesResolver.getInstance( diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml index 0b0657b266..201560d0cc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml @@ -1474,11 +1474,8 @@ SaslPropertiesResolver used to resolve the QOP used for a connection to the - DataNode when reading or writing block data. If not specified, the full set - of values specified in dfs.data.transfer.protection is used while - determining the QOP used for the connection. If a class is specified, then - the QOP values returned by the class will be used while determining the QOP - used for the connection. + DataNode when reading or writing block data. If not specified, the value of + hadoop.security.saslproperties.resolver.class is used as the default value.