Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SecurityException when running HadoopStoreJobRunner in an oozie java action #273

Merged
merged 1 commit into from
Jun 29, 2015

Conversation

bitti
Copy link
Contributor

@bitti bitti commented Jun 17, 2015

Oozie adds a security manager in the launcher to trap System.exit() calls. When it's called an exception is thrown, but trapped. If the exit code is 0 it's considered a successful run.

The main method of HadoopStoreJobRunner unnecessarily catches this exception and fails a successful job by calling System.exit(1). This PR fixes this issue.

For reference: This is what the exception looks like

java.lang.SecurityException: Intercepted System.exit(0)
        at org.apache.oozie.action.hadoop.LauncherSecurityManager.checkExit(LauncherMapper.java:808)
        at java.lang.Runtime.exit(Runtime.java:107)
        at java.lang.System.exit(System.java:962)
        at voldemort.store.readonly.mr.HadoopStoreJobRunner.main(HadoopStoreJobRunner.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:495)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:428)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:160)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:155)

Try '--help' for more information.Intercepting System.exit(1)
Failing Oozie Launcher, Main class [voldemort.store.readonly.mr.HadoopStoreJobRunner], exit code [1]

arunthirupathi added a commit that referenced this pull request Jun 29, 2015
@bitti  thanks for the fix, merged it in.

Fix SecurityException when running HadoopStoreJobRunner in an oozie java action
@arunthirupathi arunthirupathi merged commit 050ec92 into voldemort:master Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants