You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Edward Yoon (JIRA)" <ji...@apache.org> on 2007/11/28 09:27:43 UTC
[jira] Created: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
[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
Fix For: 0.15.1
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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547416 ]
Edward Yoon commented on HADOOP-2297:
-------------------------------------
In other words, UnCaughtExceptionHandler seems not worked.
> [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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546208 ]
Hadoop QA commented on HADOOP-2297:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12370394/2297_v02.patch
against trunk revision r598780.
@author +1. The patch does not contain any @author tags.
javadoc +1. The javadoc tool did not generate any warning messages.
javac +1. The applied patch does not generate any new compiler warnings.
findbugs +1. The patch does not introduce any new Findbugs warnings.
core tests +1. The patch passed core unit tests.
contrib tests -1. The patch failed contrib unit tests.
Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1186/testReport/
Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1186/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1186/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1186/console
This message is automatically generated.
> [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
> Fix For: 0.15.1
>
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HADOOP-2297:
--------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed. Thanks for the patch Edward.
> [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
>
>
> 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.
[jira] Assigned: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Owen O'Malley reassigned HADOOP-2297:
-------------------------------------
Assignee: Edward Yoon
> [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
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Attachment: (was: 2297.patch)
> [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
> Fix For: 0.15.1
>
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Attachment: 2297.patch
Fixed it with some refactoring using SecurityManager.
- added classes { NoExitSecurityManager, ExitException }
- tableExsits method was used for speed-up in DropCommand
- some help string modified
> [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
> Fix For: 0.15.1
>
> Attachments: 2297.patch
>
>
> 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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547024 ]
Hadoop QA commented on HADOOP-2297:
-----------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12370488/2297_v03.patch
against trunk revision r599643.
@author +1. The patch does not contain any @author tags.
javadoc +1. The javadoc tool did not generate any warning messages.
javac +1. The applied patch does not generate any new compiler warnings.
findbugs +1. The patch does not introduce any new Findbugs warnings.
core tests +1. The patch passed core unit tests.
contrib tests +1. The patch passed contrib unit tests.
Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1213/testReport/
Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1213/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1213/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1213/console
This message is automatically generated.
> [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
>
>
> 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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548129 ]
Edward Yoon commented on HADOOP-2297:
-------------------------------------
I don't know what's wrong....
How else can i catch these exceptions?....
> [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, test_code.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Patch Available (was: Open)
submitting.
> [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
> Fix For: 0.15.1
>
> Attachments: 2297.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Patch Available (was: Open)
re-submitting. (edited some comments)
> [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
> Fix For: 0.15.1
>
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Fix Version/s: 0.16.0
Status: Open (was: Patch Available)
Canceling to change the Fix Version/s
> [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
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Attachment: test_code.patch
This is my test code by your example code.
But, exceptions are printed.
{code}
java.lang.SecurityException
at org.apache.hadoop.hbase.shell.ShellSecurityManager.checkExit(ShellSecurityManager.java:47)
....
{code}
here is a full Log info :
{code}
hql > jar ./build/hadoop-0.16.0-dev-examples.jar pi 10 10;
07/12/04 13:46:12 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
07/12/04 13:46:12 INFO mapred.FileInputFormat: Total input paths to process : 10
07/12/04 13:46:12 INFO mapred.JobClient: Running job: job_local_1
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0000' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0001' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0002' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0003' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0004' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0005' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0006' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0007' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0008' done.
07/12/04 13:46:12 INFO mapred.MapTask: numReduceTasks: 1
07/12/04 13:46:12 INFO mapred.LocalJobRunner: Generated 1 samples.
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'job_local_1_map_0009' done.
07/12/04 13:46:12 INFO mapred.LocalJobRunner: reduce > reduce
07/12/04 13:46:12 INFO mapred.TaskRunner: Task 'reduce_w6iaep' done.
07/12/04 13:46:12 INFO mapred.TaskRunner: Saved output of task 'reduce_w6iaep' to file:/root/workspace/hadoop/test-mini-mr/out
07/12/04 13:46:13 INFO mapred.JobClient: Job complete: job_local_1
07/12/04 13:46:13 INFO mapred.JobClient: Counters: 6
07/12/04 13:46:13 INFO mapred.JobClient: Map-Reduce Framework
07/12/04 13:46:13 INFO mapred.JobClient: Map input records=10
07/12/04 13:46:13 INFO mapred.JobClient: Map output records=20
07/12/04 13:46:13 INFO mapred.JobClient: Map input bytes=240
07/12/04 13:46:13 INFO mapred.JobClient: Map output bytes=320
07/12/04 13:46:13 INFO mapred.JobClient: Reduce input groups=2
07/12/04 13:46:13 INFO mapred.JobClient: Reduce input records=20
java.lang.SecurityException
at org.apache.hadoop.hbase.shell.ShellSecurityManager.checkExit(ShellSecurityManager.java:47)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:906)
at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.shell.JarCommand$Misbehaved.run(JarCommand.java:178)
{Thread[Thread-2,5,]=Number of Maps = 10 Samples per Map = 10
Wrote input for Map #0
Wrote input for Map #1
Wrote input for Map #2
Wrote input for Map #3
Wrote input for Map #4
Wrote input for Map #5
Wrote input for Map #6
Wrote input for Map #7
Wrote input for Map #8
Wrote input for Map #9
Starting Job
Job Finished in 1.199 seconds
Estimated value of PI is 3.0
}
hql >
{code}
> [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, test_code.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Open (was: Patch Available)
> [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
>
>
> 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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547423 ]
Edward Yoon commented on HADOOP-2297:
-------------------------------------
This is my test code :
{code}
static class InvokeLauncher extends Thread {
private String[] newArgs;
private Method main;
public InvokeLauncher(Method main, String[] newArgs) {
this.newArgs = newArgs;
this.main = main;
}
public void run() {
try {
try {
main.invoke(null, new Object[] { newArgs });
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
} catch (IllegalArgumentException e) {
}
}
public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() {
return new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
}
};
}
}
{code}
> [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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547415 ]
Edward Yoon commented on HADOOP-2297:
-------------------------------------
I tryed.
"System.err.println(switcher.toString());" was clearly worked.
But, .. how can i hide (or catch) a exception message as describe below?
{code}
java.lang.SecurityException
at org.apache.hadoop.hbase.shell.JarCommand$2.checkExit(JarCommand.java:
146)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:906)
at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(Progra
mDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.shell.JarCommand$InvokeLauncher.run(JarComman
d.java:189)
Number of Maps = 10 Samples per Map = 10
Wrote input for Map #0
Wrote input for Map #1
Wrote input for Map #2
Wrote input for Map #3
Wrote input for Map #4
Wrote input for Map #5
Wrote input for Map #6
Wrote input for Map #7
Wrote input for Map #8
Wrote input for Map #9
Starting Job
Job Finished in 2.45 seconds
Estimated value of PI is 3.08
hql > _
{code}
> [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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547369 ]
Edward Yoon commented on HADOOP-2297:
-------------------------------------
Oh, Thanks michael!
I'll try to do it.
> [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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Attachment: 2297_v03.patch
Updated to latest source modifications.
> [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
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated HADOOP-2297:
---------------------------------
Fix Version/s: (was: 0.15.1)
It's too late to get this in 0.15.1.
> [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
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Michael Bieniosek (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Patch Available (was: Open)
resubmitting
> [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
>
>
> 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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546582 ]
Hadoop QA commented on HADOOP-2297:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12370488/2297_v03.patch
against trunk revision r599223.
@author +1. The patch does not contain any @author tags.
javadoc +1. The javadoc tool did not generate any warning messages.
javac +1. The applied patch does not generate any new compiler warnings.
findbugs +1. The patch does not introduce any new Findbugs warnings.
core tests -1. The patch failed core unit tests.
contrib tests +1. The patch passed contrib unit tests.
Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1197/testReport/
Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1197/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1197/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1197/console
This message is automatically generated.
> [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
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Attachment: 2297_v02.patch
Re-upload.
> [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
> Fix For: 0.15.1
>
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Open (was: Patch Available)
> [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
> Fix For: 0.15.1
>
> Attachments: 2297_v02.patch
>
>
> 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.
[jira] Commented: (HADOOP-2297) [Hbase Shell] System.exit()
Handling in Jar command
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547107 ]
Hudson commented on HADOOP-2297:
--------------------------------
Integrated in Hadoop-Nightly #318 (See [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/318/])
> [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
>
>
> 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.
[jira] Updated: (HADOOP-2297) [Hbase Shell] System.exit() Handling
in Jar command
Posted by "Edward Yoon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Yoon updated HADOOP-2297:
--------------------------------
Status: Patch Available (was: Open)
submitting.
> [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
>
>
> 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.