hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11668) start-dfs.sh and stop-dfs.sh no longer works in HA mode after --slaves shell option
Date Thu, 05 Mar 2015 08:00:58 GMT

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

Vinayakumar B commented on HADOOP-11668:

Thanks [~aw].
The problem was two fold:
We were not preserving quotes around parameters that contained $IFS due to lack of quoting
around the array deletion
The then deleted array elements were retained and show up as an empty argument.
I don't think the problem is having empty arguments, I have verified in my case, there were
no empty arguments.
In my case
1.  start-dfs.sh will call hadoop-daemons.sh as below
*hadoop-daemons.sh --config /home/vinay/install/conf --hostnames 'server3 server1' start namenode*
2. hadoop-daemons.sh passes these args to hdfscript as below
*hdfs --slaves --daemon start --config /home/vinay/install/conf --hostnames server3 server1

So the actual problem found is, in Original *HADOOP_USER_PARAMS* array, *'server3 server1'*
will be one element. But after this {code}argv=(${HADOOP_USER_PARAMS[@]/start}){code} it becomes
two separate elements in {{argv}}. Even when original HADOOP_USER_PARAMS printed as {code}${HADOOP_USER_PARAMS
[@]}{code} it shows without quotes, which means separate arguments to hdfsscript.

IMO, best way to solve this is by making hostnames delimited by (,)

Any thoughts?

> start-dfs.sh and stop-dfs.sh no longer works in HA mode after --slaves shell option
> -----------------------------------------------------------------------------------
>                 Key: HADOOP-11668
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11668
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Vinayakumar B
>            Assignee: Allen Wittenauer
>         Attachments: HADOOP-11668-01.patch, HADOOP-11668-02.patch
> After introduction of "--slaves" option for the scripts, start-dfs.sh and stop-dfs.sh
will no longer work in HA mode.
> This is due to multiple hostnames passed for '--hostnames' delimited with space.
> These hostnames are treated as commands and script fails.
> So, instead of delimiting with space, delimiting with comma(,) before passing to hadoop-daemons.sh
will solve the problem.

This message was sent by Atlassian JIRA

View raw message