[
https://issues.apache.org/jira/browse/HDFS-8931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14733789#comment-14733789
]
Tsz Wo Nicholas Sze commented on HDFS-8931:
-------------------------------------------
UncaughtExceptionHandler may not help here. I think we should try-catch the
Future. Try the program below.
{code}
public static void main(String[] args) {
final ExecutorService executorService = Executors.newCachedThreadPool();
final CompletionService<Void> completionService = new
ExecutorCompletionService<>(executorService);
final Future<Void> f = completionService.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
throw new Exception("testing");
}
});
try {
f.get();
} catch(Exception e) {
e.printStackTrace(System.out);
}
}
{code}
> Erasure Coding: Notify exception to client side from ParityGenerator.
> ---------------------------------------------------------------------
>
> Key: HDFS-8931
> URL: https://issues.apache.org/jira/browse/HDFS-8931
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: HDFS
> Affects Versions: HDFS-7285
> Reporter: Kai Sasaki
> Assignee: Kai Sasaki
> Labels: EC
> Fix For: HDFS-7285
>
>
> Following HDFS-8287.
> Current client thread catch up the exception from {{ParityGenerator}}. In
> order to handle properly,
> 1. Put together handling logic into UncaughtExceptionHandler.
> 2. Notify exception to client side from UncaughtExceptionHandler.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)