Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-736

Inconsistent error message when the message should be about org.apache.hadoop.fs.permission.AccessControlException: Permission denied:

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3.0
    • 0.7.0
    • None
    • None

    Description

      Suppose I have Pig script which accesses a directory in HDFS for which I do not have permissions

      shell> hadoop fs -ls /mydata/group_permissions/

      drwxr-x--- - groupuser restrictedgroup 0 2009-03-24 10:58 /mydata/group_permissions/20090323

      %default dates_to_process '20090323'
      
      MYDATA = load '/mydata/group_permissions/{$dates_to_process}*' using
      PigStorage() as (col1,col2,col3) ;
      
      MYDATA_PROJECT = foreach MYDATA generate
              (chararray) col1#'acct' as acct,
              (int)col1#'country' as country,
              (int)col1#'product' as product
      
      dump MYDATA_PROJECT;
      
      

      The error message we get is:
      ===============================================================================================
      2009-03-26 00:00:05,753 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2099: Problem in constructing slices.
      Details at logfile: /home/viraj/pig_1238025596328.log
      ===============================================================================================
      This message is definitely hard to debug

      ===============================================================================================
      With the previous version 1.0.0 I get the following error message, which is more appropriate to this case.
      ===============================================================================================

      2009-03-26 00:01:41,787 [main] ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - java.io.IOException: org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=viraj, access=READ_EXECUTE, inode="20090323":groupuser:restrictedgroup:rwxr-x--- [org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=viraj, access=READ_EXECUTE, inode="20090323":groupuser:restrictedgroup:rwxr-x---]
      at org.apache.pig.backend.hadoop.datastorage.HDirectory.iterator(HDirectory.java:157)
      at org.apache.pig.backend.executionengine.PigSlicer.slice(PigSlicer.java:77)
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:206)
      at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:742)
      at org.apache.hadoop.mapred.jobcontrol.Job.submit(Job.java:370)
      at org.apache.hadoop.mapred.jobcontrol.JobControl.startReadyJobs(JobControl.java:247)
      at org.apache.hadoop.mapred.jobcontrol.JobControl.run(JobControl.java:279)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.RuntimeException: org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=viraj, access=READ_EXECUTE, inode="20090323":groupuser:restrictedgroup:rwxr-x---
      ... 8 more

      2009-03-26 00:01:41,798 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias MYDATA_PROJECT
      Details at logfile: /home/viraj/pig_1238025692361.log

      ===============================================================================================

      Attachments

        1. pig_latestversion_errmsg.log
          2 kB
          Viraj Bhat
        2. pig_oldversion_errmsg.log
          0.7 kB
          Viraj Bhat

        Issue Links

          Activity

            People

              Unassigned Unassigned
              viraj Viraj Bhat
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: