Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h1>Quick summary:</h1> <ul> <li>The <code>hadoop</code> bash script under <code>(path)/bin/hadoop</code> actually has a bug in it. The script assumes that none of the files / paths that hadoop needs will have spaces in them. Well, for anything Windows, they will all have a space somewhere, since "Program Files" has a space in it.</li> </ul> <h1>Details</h1> <p>This is a tricky one... I ran into the same problem and it took me a while to fix.</p> <p>First, the problem: setting environment variables via scripts can get sketchy when spaces are involved in the file paths / names (which occurs fairly often in non-*nix systems these days).</p> <p>Next, there are likely <strong><em>two</em></strong> places where you need to fix the problem:</p> <ol> <li><p>In your <code>(path)/conf/hadoop-env.sh</code> script, you should be setting the <code>JAVA_HOME</code> script, and it SHOULD look something like:</p> <pre><code>export JAVA_HOME=/cygdrive/c/"Program Files"/Java/jdk1.7.0_06 </code></pre> <p>(Note that there are quotation marks around the "Program Files", so that it is recognized as a single element. You cannot use the <code>\</code> escape character because cygwin does some finagling of Windows to UNIX paths, so the <code>\</code> cannot act as escape.</p></li> <li><p>In your <code>(path)/bin/hadoop</code> script, line 320 is likely written something like the following:</p> <pre><code>JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"` </code></pre> <p>You will need to change it to instead say:</p> <pre><code>JAVA_PLATFORM=`CLASSPATH="${CLASSPATH}" "${JAVA}" -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"` </code></pre> <p>Note that I have added quotation marks around the environment variables <code>${CLASSPATH}</code> and <code>${JAVA}</code>. By putting the quotation marks around it, you are saying that "the entire set of characters specified by this variable should be considered one string object".</p></li> </ol> <hr> <p>OK, now if you care to understand why this is happening and what's going on, the problem is that your JDK is likely stored under "Program Files", or maybe under "Program Files (x86)", both of which have <strong><em>spaces</em></strong> within the path. All the other environment variables that Hadoop needs are not dependent upon anything within the "Program Files" pathway. So that's why you only see the one error being flagged. All the other environment variables which are missing the quotes simply don't have spaces within them.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload