AnsweredAssumed Answered

select failed in Hive.     java.io.FileNotFoundException

Question asked by gautier on May 5, 2013
Latest reply on May 13, 2013 by gautier
Hey,

I work on MapR M3 in standalone mode. I'm training on hive (0.9.0) and have some issues with one query :

    > SELECT year FROM records;
    Automatically selecting local only mode for query
    Total MapReduce jobs = 1
    Launching Job 1 out of 1
    Num 'java.io.FileNotFoundException"ber of reduce tasks is set to 0 since there's no reduce operator
    Execution log at: /tmp/mapr/mapr_20130506044545_e2ba972e-84a5-4e68-a33b-580be4a8d866.log
    java.io.FileNotFoundException: /var/mapr/cluster/mapred/jobTracker/staging/mapr406767829/.staging ()
     at org.apache.hadoop.io.nativeio.NativeIO.chmod(Native Method)
     at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:518)
     at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:330)
     at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)
     at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:126)
     at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:875)
     at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:869)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAs(Subject.java:396)
     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1126)
     at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:869)
     at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:843)
     at org.apache.hadoop.hive.ql.exec.ExecDriver.execute(ExecDriver.java:435)
     at org.apache.hadoop.hive.ql.exec.ExecDriver.main(ExecDriver.java:693)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
    Job Submission failed with exception 'java.io.FileNotFoundException(/var/mapr/cluster/mapred/jobTracker/staging/mapr406767829/.staging ())'
    Execution failed with exit status: 2
    Obtaining error information
    
    Task failed!
    Task ID:
      Stage-1
    
    Logs:
    
    /tmp/mapr/hive.log
    FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

But when I tried :
<pre>
    > select * from records;
</pre>
It works fine.
I read that's because there is no reduce tasks in this query.

Outcomes