running a jar example file with hadoop - java

Please go easy on me. I just started linux and hadoop at the same time. I have almost zero experience with linux and a complete beginner with hadoop.
I downloaded the file hadoop-1.1.1-bin.tar.gz from here:
http://www.motorlogy.com/apache/hadoop/common/hadoop-1.1.1/
I was able to unpack it.
I am following a tutorial that tells me to run:
bin/hadoop jar hadoop-*-examples.jar
I am getting this error:
agordon#Ubuntu32:/hadoop/hadoop-1.1.1$ bin/hadoop jar hadoop-*-examples-1.0.3.jar
Exception in thread "main" java.io.IOException: Error opening job jar: hadoop-*-examples-1.0.3.jar
at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
Caused by: java.io.FileNotFoundException: hadoop-*-examples-1.0.3.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:214)
at java.util.zip.ZipFile.<init>(ZipFile.java:144)
at java.util.jar.JarFile.<init>(JarFile.java:152)
at java.util.jar.JarFile.<init>(JarFile.java:89)
at org.apache.hadoop.util.RunJar.main(RunJar.java:88)
What am i doing wrong? thank you for your guidance.

Instead of hadoop-*-examples.jar use the full name of the jar file.

Related

when running gradlew in ubuntu , I'm having below error despite having gradle, zip & unzip installed

./gradlew
Downloading https://services.gradle.org/distributions/gradle-7.4.1-bin.zip
...........10%...........20%...........30%...........40%...........50%....
.....
Could not unzip /home/niranjan/.gradle/wrapper/dists/gradle-7.4.1-bin/58kw26xllvsiedyf3nujyarhn/gradle-7.4.1-bin.zip to /home/niranjan/.gradle/wrapper/dists/gradle-7.4.1-bin/58kw26xllvsiedyf3nujyarhn.
Reason: error in opening zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
appreciate your insights to overcome , this came while running a java projec

liblpsolve55.so: cannot open shared object file: No such file or directory

Good Morning,
I am working with lpsolve with eclispe and in Java.
I can import correctly the program but when running it I got the exception :
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/lp_solve/liblpsolve55j.so: liblpsolve55.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:844)
at java.lang.System.loadLibrary(System.java:1051)
at lpsolve.LpSolve.<clinit>(LpSolve.java:275)
at scheduler.Main.main(Main.java:353)
Or, I have edited the native library path which is : usr/lib/lp_solve.
Can anyone help me ?
Thank you !
Apparently Eclipse is finding liblpsolve55j.so in /usr/lib/lp_solve but is not looking in the same place for liblpsolve55.so.
The only workaround I found is to manually load the library with System.load("/usr/lib/lp_solve/liblpsolve55.so").

Word Topology deployment error

I am getting the following error when I try to deploy the Word Topology in windows.
I have followed the below link to deploy the word Topology in windows.
http://ptgoetz.github.io/blog/2013/12/18/running-apache-storm-on-windows/
When i deploy and see I am getting the floowing error.
java.lang.RuntimeException: Error when launching multilang subprocess
at backtype.storm.task.ShellBolt.prepare(ShellBolt.java:105)
at backtype.storm.daemon.executor$fn__3493$fn__3505.invoke(executor.clj:689)
at backtype.storm.util$async_loop$fn__457.invoke(util.clj:431)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Cannot run program "python" (in directory "storm- local\supervisor\stormdist\WordCount-1-1407303402\resources"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at backtype.storm.utils.ShellProcess.launch(ShellProcess.java:50)
at backtype.storm.task.ShellBolt.prepare(ShellBolt.java:102)
... 4 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:189)
at java.lang.ProcessImpl.start(ProcessImpl.java:133)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
Can anyone help me.
I had the same error.
Look at the compiled source. In the target folder you need all the scripts of the mutlilang available to execute all of them.
Look at target/classes/resources/ if there are any files. If not and if even you do not have the folder in target/classes copy the the resource folder from multilang/resources into the target path.

How to see Aparapi generated OpenCL code

I am having Aparapi translating Java code to OpenCL. However I wonder how I can see the generated OpenCL code. The website says "by using adding -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true to your command line when you start your JVM". Being new to this technology, I am not sure how exactly you can do this? Can anyone please help by elaborating the process?
Added part:
Thank you. But what should I do in case of hadoop? I am trying to generate the OpneCL code for a hadoop program that I am running this way:
hadoop jar .java
I have tried adding -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true before and after jar word, both did not work. Here is what I got.
Exception in thread "main" java.io.IOException: Error opening job jar: -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true
at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
Caused by: java.io.FileNotFoundException: -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:215)
at java.util.zip.ZipFile.(ZipFile.java:145)
at java.util.jar.JarFile.(JarFile.java:153)
at java.util.jar.JarFile.(JarFile.java:90)
at org.apache.hadoop.util.RunJar.main(RunJar.java:88)
Just add the property to the command line which you use to start java.
Specifically somewhere you have a command line like this
java -classpath yourpackage.YourApp
Just add the property like this
java -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true -classpath yourpackage.YourApp

java.io.FileNotFoundException: ~/play-2.1.1/framework/sbt/boot/update.log (No such file or directory)

I wrote a Puppet to install Play 2.1.1 on Virtual Machine running CentOS 6.2.
The Puppet executed the following two commands:
/usr/bin/wget http://downloads.typesafe.com/play/2.1.1/play-2.1.1.zip
/usr/bin/unzip play-2.1.1.zip
When I run play command inside the package, it shows the following error message:
java.io.FileNotFoundException: ~/play-2.1.1/framework/sbt/boot/update.log (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
at java.io.FileWriter.<init>(FileWriter.java:90)
at xsbt.boot.Update.<init>(Checks.java:51)
at xsbt.boot.Launch.update(Launch.scala:275)
at xsbt.boot.Launch$$anonfun$jnaLoader$1.apply(Launch.scala:120)
at scala.Option.getOrElse(Option.scala:108)
at xsbt.boot.Launch.jnaLoader$2f324eef(Launch.scala:115)
at xsbt.boot.Launch.<init>(Launch.scala:94)
at xsbt.boot.Launcher$.apply(Launch.scala:290)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.FileNotFoundException: ~/play-2.1.1/framework/sbt/boot/update.log (No such file or directory)
I didn't change a single line of code in the play-2.1.1 directory. I googled around for the error message, but did not find any useful answer. Could anyone point out what is the problem?
If the file does not exist and cannot be created,FileOutputStream will raise a FileNotFoundException (yes, this seems weird, but see the javadoc).
This error probably means that the user that started play does not have the proper permissions to create ~/play-2.1.1/framework/sbt/boot/update.log or its parent directories.

Categories

Resources