[ 
https://issues.apache.org/jira/browse/HDFS-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427217#comment-13427217
 ] 

Yunseok Jang commented on HDFS-1333:
------------------------------------

I blocked the logic using FileStatus.getPath().getUri().getScheme().
if it is 's3' or 's3n' (case-insensitive), then skip the logic.
Eventually, I added a new boolean variable in FileStatus.Java; boolean iss3
and I added a new method which returns the iss3 value; boolean isS3()
and edit JobSubmissionFiles.java and JobTracker.java using isS3() method.

                
> S3 File Permissions
> -------------------
>
>                 Key: HDFS-1333
>                 URL: https://issues.apache.org/jira/browse/HDFS-1333
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>         Environment: Hadoop cluster using 3 small Amazon EC2 machines and the 
> S3FileSystem.
> Hadoop compiled from latest trunc: 0.22.0-SNAPSHOT
> core-site:
> fs.default.name=s3://my-s3-bucket
> fs.s3.awsAccessKeyId=[key id omitted]
> fs.s3.awsSecretAccessKey=[secret key omitted]
> hadoop.tmp.dir=/mnt/hadoop.tmp.dir
> hdfs-site: empty
> mapred-site:
> mapred.job.tracker=[domU-XX-XX-XX-XX-XX-XX.compute-1.internal:9001]
> mapred.map.tasks=6
> mapred.reduce.tasks=6
>            Reporter: Danny Leshem
>            Priority: Critical
>
> Till lately I've been using 0.20.2 and everything was ok. Now I'm using the 
> latest trunc 0.22.0-SNAPSHOT and getting the following thrown:
> Exception in thread "main" java.io.IOException: The ownership/permissions on 
> the staging directory 
> s3://my-s3-bucket/mnt/hadoop.tmp.dir/mapred/staging/root/.staging is not as 
> expected. It is owned by  and permissions are rwxrwxrwx. The directory must 
> be owned by the submitter root or by root and permissions must be rwx------
>     at
> org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:107)
>     at
> org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:312)
>     at org.apache.hadoop.mapreduce.Job.submit(Job.java:961)
>     at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:977)
>     at com.mycompany.MyJob.runJob(MyJob.java:153)
>     at com.mycompany.MyJob.run(MyJob.java:177)
>     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>     at com.mycompany.MyOtherJob.runJob(MyOtherJob.java:62)
>     at com.mycompany.MyOtherJob.run(MyOtherJob.java:112)
>     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>     at com.mycompany.MyOtherJob.main(MyOtherJob.java:117)
>     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:187)
> (The "it is owned by ... and permissions " is not a mistake, seems like the 
> empty string is printed there)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to