[
https://issues.apache.org/jira/browse/HIVE-11819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436617#comment-17436617
]
xiepengjie commented on HIVE-11819:
-----------------------------------
The report method in FutureTask wrapped all EXCEPTIONAL(value is 3) state as
ExecutionException.
{code:java}
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED)
throw new CancellationException();
throw new ExecutionException((Throwable)x);
}
{code}
So, such as the below code in the methed
org.jeff.juc.ThreadPoolExecutorWithOomHook#afterExecute
{code:java}
if (t instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
this shouldn't happen.
We can fix it like this,
{code:java}
if (t instanceof OutOfMemoryError || t.getCause() instanceof OutOfMemoryError) {
oomHook.run();
}
{code}
otherwise this fix will be invalided.
[~sershe] [~vgumashta] ,can you take a look?
> HiveServer2 catches OOMs on request threads
> -------------------------------------------
>
> Key: HIVE-11819
> URL: https://issues.apache.org/jira/browse/HIVE-11819
> Project: Hive
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: HIVE-11819.01.patch, HIVE-11819.02.patch,
> HIVE-11819.patch
>
>
> ThriftCLIService methods such as ExecuteStatement are apparently capable of
> catching OOMs because they get wrapped in RTE by HiveSessionProxy.
> This shouldn't happen.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)