mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "haosdent (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-2718) Future created by State.names() throws an Illegal ExecutionException
Date Fri, 03 Jul 2015 10:27:04 GMT

    [ https://issues.apache.org/jira/browse/MESOS-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14613107#comment-14613107
] 

haosdent commented on MESOS-2718:
---------------------------------

Yes, I got you idea. So you think we should create a exception class, and then use ExecutionException
to wrap it?

> Future created by State.names() throws an Illegal ExecutionException
> --------------------------------------------------------------------
>
>                 Key: MESOS-2718
>                 URL: https://issues.apache.org/jira/browse/MESOS-2718
>             Project: Mesos
>          Issue Type: Bug
>          Components: java api
>    Affects Versions: 0.22.1
>         Environment: OSX, Mesos 0.22.1
>            Reporter: Matthias Veit
>
> During application startup, we call call org.apache.mesos.state.State.names().
> This will return a java Future. 
> Everything is fine in the success case.
> In the error case, the future can throw either an InterruptedException, ExecutionException
or a RuntimeException.
> The ExecutionException indicates, that the future was not successful.
> This is the text from the javadoc: 
> Exception thrown when attempting to retrieve the result of a task that aborted by throwing
an exception. This exception can be inspected using the Throwable.getCause() method. See here:
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutionException.html
> The ExecutionException thrown by mesos in the above method does not hold a reference
to the root cause, but returns a reference to this as cause (ex == ex.getCause()). 
> ExecutionException really is a wrapper exception to indicate success or failure of the
java future and should always have a root cause. 
> With the current implementation we can't distinguish between a Future error or an application
error. Please provide always the exception cause.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message