hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Twensky <jim.twen...@gmail.com>
Subject Creating an RMI client inside a mapper
Date Thu, 29 Apr 2010 19:45:51 GMT
I'm trying to create an instance of an RMI client that queries a
remote RMI server inside my Mapper class. My application runs smoothly
without the RMI client. When I add:

if (System.getSecurityManager() == null) {
  System.setSecurityManager(new SecurityManager());
}

inside my Mapper's configure method, I start getting a security access
control exception that looks like:

java.security.AccessControlException: access denied
(java.io.FilePermission
/var/tmp/jim/cscluster/hadoop-0.20.1/bin/../logs/userlogs/attempt_201004291421_0001_m_000000_0/log.tmp
write)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
        at org.apache.hadoop.mapred.TaskLog.writeToIndexFile(TaskLog.java:169)
        at org.apache.hadoop.mapred.TaskLog.syncLogs(TaskLog.java:230)
        at org.apache.hadoop.mapred.Child.main(Child.java:172)

I'm guessing there is a conflict somewheredue to having multiple
security managers but I couldn't figure out how to solve it. For what
it's worth, I added these settings to my hadoop-env.sh file and
restarted the cluster:

export HADOOP_TASKTRACKER_OPTS="-Djava.rmi.server.codebase=file:///home/jim/workspace/RMI/src/libs/compute.jar
-Djava.security.policy=/home/jim/workspace/RMI/src/client.policy"

and these directories are on a network file system, visible to all of
the task trackers.

I'd be very glad if anyone has experience using RMI as an RPC
mechanism between the mappers, and is willing to share the
configurations needed.

Thanks,
Jim

Mime
View raw message