[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Bieniosek updated HADOOP-2297: -------------------------------------- Attachment: Capture.java Hey Edward, I think I figured out how to suppress System.exit and capture stdout/stderr. Here, System.exit throws a SecurityException, which can be caught above. In this case, I catch in Thread.UncaughtExceptionHandler since I am running misbehaved threads. I also wrote a class that captures stdout/stderr. Since java only lets me set one printStream to capture stdout per jvm, I have to check Thread.currentThread, and then decide where to write the captured output. I am hoping to incorporate some of this code into my custom jetty server that submits hadoop jobs. > [Hbase Shell] System.exit() Handling in Jar command > --------------------------------------------------- > > Key: HADOOP-2297 > URL: https://issues.apache.org/jira/browse/HADOOP-2297 > Project: Hadoop > Issue Type: Improvement > Components: contrib/hbase > Affects Versions: 0.15.0 > Reporter: Edward Yoon > Assignee: Edward Yoon > Fix For: 0.16.0 > > Attachments: 2297_v02.patch, 2297_v03.patch, Capture.java > > > I'd like to block the exitVM by System.exit(). > Shell should terminate by "quit" command. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.