Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

MapReduce - error

avatar
Expert Contributor

Hi All,

I'm running a mapReduce java program using the command shown below, the mapreduce program scans Hbase table and puts the data into hdfs.

mr.jar -> has the .class files

HADOOP_CLASSPATH=$(ls -1 /usr/hdp/current/hbase-client/lib/* | tr '\n', ':') yarn jar mr.jar hbase.labfiles.Exercise5.ProductAnalyzer -libjars $(ls -1 /usr/hdp/current/hbase-client/lib/* | tr '\n', ',')

This gives the following error ->

Exception in thread "main" java.io.FileNotFoundException: File /usr/hdp/current/hbase-client/lib/ojdbc6.jar does not exist. at org.apache.hadoop.util.GenericOptionsParser.validateFiles(GenericOptionsParser.java:405) at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:299) at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487) at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170) at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at hbase.labfiles.Exercise5.ProductAnalyzer.main(ProductAnalyzer.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

However, the file actually exists

[root@sandbox Exercise5]# ls -lrt /usr/hdp/current/hbase-client/lib/ojdbc6.jar lrwxrwxrwx 1 root root 26 2016-03-14 14:11 /usr/hdp/current/hbase-client/lib/ojdbc6.jar -> /usr/share/java/ojdbc6.jar

Any ideas what the issue is & how to fix this ?

1 ACCEPTED SOLUTION

avatar
Super Collaborator
@Karan Alang

Can you check if /usr/share/java/ojdbc6.jar file exist. "/usr/hdp/current/hbase-client/lib/ojdbc6.jar" is symlink to /usr/share/java/ojdbc6.jar.

View solution in original post

4 REPLIES 4

avatar
Super Collaborator
@Karan Alang

Can you check if /usr/share/java/ojdbc6.jar file exist. "/usr/hdp/current/hbase-client/lib/ojdbc6.jar" is symlink to /usr/share/java/ojdbc6.jar.

avatar
Expert Contributor

@rguruvannagari -

actually the file - /usr/share/java/ojdbc6.jar does not exist, though the symlink exists.

This is the default installation, so wondering how come the symlink exists but the file does not !

so, what needs to be done to fix this ? drop the symlink ?

avatar
Super Collaborator

@Karan AlangDownload ojdbc6.jar and copy to the location /usr/share/java/ You can download ojdbc6.jar from http://www.oracle.com/technetwork/apps-tech/jdbc-111060-084321.html

avatar
Expert Contributor

@rguruvannagari

thanks, that fixed the issue.