Hadoop加密shuffle功能介绍

x33g5p2x  于2020-09-30 发布在 Hadoop  
字(2.1k)|赞(0)|评价(0)|浏览(1235)

1. 简介

加密shuffle功能允许使用HTTPS和可选的客户端身份验证(也称为双向HTTPS或带有客户端证书的HTTPS)。对MapReduce shuffle过程加密,它包括:

  • Hadoop配置,用于在HTTP和HTTPS之间切换
  • Hadoop配置,用于指定shuffle和reducers任务获取shuffle数据所使用的密钥库和信任库属性(位置,类型,密码)
  • 一种在群集上重新加载信任库的方法(添加或删除节点时)

2. 配置

2.1 core-site.xml 选项

要启用加密shuffle,请在集群中所有节点的core-site.xml中设置以下属性:

PropertyDefault ValueExplanation
hadoop.ssl.require.client.certfalse是否需要客户端证书
hadoop.ssl.hostname.verifierDEFAULT提供HttpsURLConnections的主机名验证程序。 有效值为DEFAULT, STRICT, STRICT_IE6, DEFAULT_AND_LOCALHOSTALLOW_ALL
hadoop.ssl.keystores.factory.classorg.apache.hadoop.security.ssl.FileBasedKeyStoresFactoryThe KeyStoresFactory implementation to use
hadoop.ssl.server.confssl-server.xmlResource file from which ssl server keystore information will be extracted. This file is looked up in the classpath, typically it should be in Hadoop conf/ directory
hadoop.ssl.client.confssl-client.xmlResource file from which ssl server keystore information will be extracted. This file is looked up in the classpath, typically it should be in Hadoop conf/ directory
hadoop.ssl.enabled.protocolsTLSv1,SSLv2Hello,TLSv1.1,TLSv1.2The supported SSL protocols

重要说明:所有这些属性应在群集配置文件中标记为final。

示例:

	<property>
    <name>hadoop.ssl.require.client.cert</name>
    <value>false</value>
    <final>true</final>
  </property>

  <property>
    <name>hadoop.ssl.hostname.verifier</name>
    <value>DEFAULT</value>
    <final>true</final>
  </property>

  <property>
    <name>hadoop.ssl.keystores.factory.class</name>
    <value>org.apache.hadoop.security.ssl.FileBasedKeyStoresFactory</value>
    <final>true</final>
  </property>

  <property>
    <name>hadoop.ssl.server.conf</name>
    <value>ssl-server.xml</value>
    <final>true</final>
  </property>

  <property>
    <name>hadoop.ssl.client.conf</name>
    <value>ssl-client.xml</value>
    <final>true</final>
  </property>

2.2 mapred-site.xml属性

PropertyDefault ValueExplanation
mapreduce.shuffle.ssl.enabledfalse

重要说明:所有这些属性应在群集配置文件中标记为final。

示例:

 <property>
    <name>mapreduce.shuffle.ssl.enabled</name>
    <value>true</value>
    <final>true</final>
  </property>

相关文章

最新文章

更多