Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.6.4
-
Linux, Unix, Mac machines with spaces in file paths
-
script, quick, simple
Description
Upon a standard download, untaring, and execution of './hadoop-2.6.4/bin/hadoop version', I received: './hadoop-2.6.4/bin/hadoop: line 26: /Users/jeffrey/Projects/Hadoop: No such file or directory'
My project directory was called 'Hadoop Playground', with a space in it. Upon investigating, I found line 26 held:
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
Which means the variable $HADOOP_LIBEXEC_DIR will be handled as multiple arguments if there is a space. The solution is to quote the variable, like so:
. "$HADOOP_LIBEXEC_DIR/hadoop-config.sh"
Attachments
Issue Links
- Is contained by
-
HADOOP-9902 Shell script rewrite
- Resolved
- relates to
-
HADOOP-13365 Convert _OPTS to arrays to enable spaces in file paths
- Resolved