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
        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

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.


View raw message