File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Panagiotis Kalogeropoulos
Rancher
Posts: 99
Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 2358
31
Linux Oracle Postgres Database Python Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Panagiotis Kalogeropoulos
Rancher
Posts: 99
Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic