wood burning stoves*
The moose likes Hadoop and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Hadoop
Bookmark ""C:/Program: No such file or directory" error when running jars in the hadoop folder" Watch ""C:/Program: No such file or directory" error when running jars in the hadoop folder" New topic
Author

"C:/Program: No such file or directory" error when running jars in the hadoop folder

Panagiotis Kalogeropoulos
Rancher

Joined: May 27, 2011
Posts: 99

I am trying to run hadoop (version 1.1.1) in Windows 7, but when I try to execute some of the jars (like the hadoop-examples-1.1.1.jar or hadoop-test-1.1.1.jar) I get the following error:
bin/hadoop: line 320: C:/Program: No such file or directory

The thing is that the jars are executing without any serious problem. For instance, this is what is shown when I execute the hadoop-examples-1.1.1.jar :

$ bin/hadoop jar hadoop-examples-1.1.1.jar
bin/hadoop: line 320: C:/Program: No such file or directory
An example program must be given as the first argument.
Valid program names are:
aggregatewordcount: An Aggregate based map/reduce program that counts the words in the input files.
aggregatewordhist: An Aggregate based map/reduce program that computes the histogram of the words in the input files.
dbcount: An example job that count the pageview counts from a database.
grep: A map/reduce program that counts the matches of a regex in the input.
join: A job that effects a join over sorted, equally partitioned datasets
multifilewc: A job that counts words from several files.
pentomino: A map/reduce tile laying program to find solutions to pentomino problems.
pi: A map/reduce program that estimates Pi using monte-carlo method.
randomtextwriter: A map/reduce program that writes 10GB of random textual data per node.
randomwriter: A map/reduce program that writes 10GB of random data per node.
secondarysort: An example defining a secondary sort to the reduce.
sleep: A job that sleeps at each map and reduce task.
sort: A map/reduce program that sorts the data written by the random writer.
sudoku: A sudoku solver.
teragen: Generate data for the terasort
terasort: Run the terasort
teravalidate: Checking results of terasort
wordcount: A map/reduce program that counts the words in the input files.


As you can see it shows correctly all available example programs. Has anyone seen something similar?
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1606
    
  13

I didn't know you could run Hadoop directly on Windows - I thought you needed to use Cygwin or a Linux VM etc. This looks like it might be a problem with the Windows file path. Check if there's a path like "C:/Program Files/..." in there somewhere that isn't being quoted properly, so Hadoop thinks it's supposed to look in "C:/Program/" instead?


No more Blub for me, thank you, Vicar.
Panagiotis Kalogeropoulos
Rancher

Joined: May 27, 2011
Posts: 99

Yes, I am using Cygwin so that I can run the Linux commands. I mentioned only Windows 7 just to tell you under which os I am trying to run hadoop. Indeed, there seems to be some problem with the Windows Classpath. As we can see, the line 320 in the bin/hadoop file is
JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`

The thing is that even after I quote the CLASSPATH and JAVA_HOME variables, I get the same message. And what surprises me even more is that the jars are executing correctly. Maybe there is something wrong with the version that I am working? I will try with version 0.22.0 and see how it goes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: "C:/Program: No such file or directory" error when running jars in the hadoop folder
 
Similar Threads
gettin error with TextReader
Exception while running the java program through run.bat file
Different versions of Java SDK - can they Co-exist on same machine?
running with command line
Upload servelet issues