[ 
https://issues.apache.org/jira/browse/HADOOP-13040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15249990#comment-15249990
 ] 

Xiaoyu Yao commented on HADOOP-13040:
-------------------------------------

As we can see from the hadoop namenode log:
{{16/04/20 07:19:54 INFO namenode.NameNode: createNameNode []}}

the {{-Dhadoop.security.group.mapping.ldap.bind.password.file 
=BIND_PASSWORD_FILE_PATH}} is not passed into the code as argument to main. The 
Namenode#main() like many hadoop component relies on GenericOptionsParser class 
to handle the -D argument. 

I have not find hadoop document around this or  it is a known issue. Below is a 
few work around:

1. run {{hadoop namenode 
-Dhadoop.security.group.mapping.ldap.bind.password.file 
=BIND_PASSWORD_FILE_PATH}} directly without relying on HADOOP_NAMENODE_OPTS

2. use a intermediate environment variable in hadoop-env.sh and core-site.xml

hadoop-env.sh
export LDAP_OPTS="-Dldap.bind.password.file=BIND_PASSWORD_FILE_PATH"
export HADOOP_NAMENODE_OPTS="${HADOOP_NAMENODE_OPTS} ${LDAP_OPTS}"

core-site.xml
<property>
    <name>hadoop.security.group.mapping.ldap.bind.password.file</name>
    <value>${ldap.bind.password.file}</value>
  </property>

> HADOOP_NAMENODE_OPTS does not pass -DconfigKey=Value to namenode as parameter 
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-13040
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13040
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>
> We want to hide the ldap bind password file path from core-site.xml by 
> setting the following in hadoop-env.sh only.
> export HADOOP_NAMENODE_OPTS=$HADOOP_NAMENODE_OPTS 
> -Dhadoop.security.group.mapping.ldap.bind.password.file 
> =BIND_PASSWORD_FILE_PATH
> However, it does not work as expected and the BIND_PASSWORD_FILE_PATH is not 
> honored with existing hadoop_add_param call from 
> hadoop-config.sh/hadoop-function.sh.
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to