Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: The Cloudera Community will undergo maintenance on Saturday, August 17 at 12:00am PDT. See more info here.

FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2

FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2

New Contributor
Cloudera CDH version : CDH 5.2.1
 
We were trying to run the importtsv program using the following command. 
 
HADOOP_CLASSPATH=$(hbase mapredcp):/etc/hbase/conf:/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2.1.p0.12/lib/hbase/hbase-protocol-0.98.6-cdh5.2.1.jar:/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2.1.p0.12/jars/high-scale-lib-1.1.1.jar hadoop jar hbase-server-0.98.6-cdh5.2.1.jar importtsv -Dimporttsv.separator=, -Dimporttsv.bulk.output=output -Dimporttsv.columns=HBASE_ROW_KEY,f:count wordcount word_count.csv
 
 
We are not able to overcome the below error.  The local file system has the below required .jar file but it expects in the HDFS path and throwing below error. Please help.
 
14/12/26 22:50:59 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
14/12/26 22:50:59 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
14/12/26 22:51:01 INFO mapreduce.JobSubmitter: Cleaning up the staging area file:/tmp/hadoop-hdfs/mapred/staging/hdfs1525387891/.staging/job_local1525387891_0001
14/12/26 22:51:01 WARN security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:java.io.FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2.1.p0.12/jars/high-scale-lib-1.1.1.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
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.hbase.mapreduce.Driver.main(Driver.java:54)
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.main(RunJar.java:212)
Caused by: java.io.FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2.1.p0.12/jars/high-scale-lib-1.1.1.jar
at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1083)
at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1075)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1075)
5 REPLIES 5

Re: FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cd

Cloudera Employee
Are you able to try using the -libjars option to "hadoop jar"?

hadoop jar \
hbase-server-0.98.6-cdh5.2.1.jar \
importtsv \
-libjars /opt/cloudera/parcels/CDH-5.2.1-1.cdh5.2.1.p0.12/jars/high-scale-lib-1.1.1.jar \
-Dimporttsv.separator=, -Dimporttsv.bulk.output=output \
-Dimporttsv.columns=HBASE_ROW_KEY,f:count wordcount \
word_count.csv
Regards,
Gautam Gopalakrishnan

Re: FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cd

New Contributor

I have tried using -libjars with the local filesystem path where the jar is found but it asks for the hadoop file system path of the same name(created directory path using hadoop fs -mkdir and copied jar). I tried even that and still it fails. I have seen that there is no proper documentation about compiling java files properly and getting it working with hbase.

Re: FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cd

Cloudera Employee
You'll typically see this error when you have no MR (or YARN+MR2) gateway files under /etc/hadoop/conf/ on the host you are triggering the command on. Adding and deploying the MR2 gateway client configs on the host will let you bypass the error.

Re: FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cd

New Contributor

Even, I am facing the similar issue. Could you please point us to sample configuration that will help us resolve this issue.

 

Thanks.

Pradeep

Highlighted

Re: FileNotFoundException: File does not exist: hdfs://cdhm:8020/opt/cloudera/parcels/CDH-5.2.1-1.cd

New Contributor

Check if you have mapred-site.xml in your classpath and it must contain below propert, if you want to run MR job with yarn.

 

<property>

    <name>mapreduce.framework.name</name>

    <value>yarn</value>

  </property>

 

mapreduce.framework.namelocalThe runtime framework for executing MapReduce jobs. Can be one of local, classic or yarn.