hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chandra Mohan, Ananda Vel Murugan" <Ananda.Muru...@honeywell.com>
Subject Running map reduce job from a web application
Date Fri, 24 Aug 2012 04:01:46 GMT
Hi,

I am developing a web application in Java which would be hosted in a machine outside of my
Hadoop cluster. User account configuration would be different between the machines.

I am using the following code in my servlet to run the map-reduce job.


final Configuration config = new Configuration();
            config.set("mapred.job.tracker", "<jobtracker.hostname>:9001");
            config.set("fs.default.name", "hdfs://<namenode>:9000");
            config.set("hadoop.tmp.dir", "/var/lib/hadoop/data-store/hadoop-hadoop");
            config.set("hadoop.job.ugi", "hadoop,hadoop");
            UserGroupInformation ugi1 = UserGroupInformation.createRemoteUser("hadoop");
            Job job = new Job(config);
            job.setJarByClass(ImportTsv.class);
            job.setJobName("ImportTsv");
            job.getConfiguration().set("user", "hadoop");
            job.waitForCompletion(true);
            job.submit();
            Iterator iter = config.iterator();
            while(iter.hasNext())
            {
                  Object obj = iter.next();
                  System.out.println(obj);
            }

It is not working and failing with following authentication error

Exception in thread "main" org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException:
Permission denied: user=E317376, access=WRITE, inode="staging":hadoop:supergroup:rwxr-xr-x

Appreciate your inputs for fixing this.

Regards,
Anand.C



Mime
View raw message