JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
feature_request_small.png
OPEN  Feature request JPPF-106  -  Provide error reporting at the task bundle level
Posted Dec 23, 2012 - updated Oct 09, 2017
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
lolo4j (lolocohen) has been working on this issue since May 06, 2013 (08:04)
Issue details
  • Type of issue
    Feature request
  • Status
     
    New
  • Assigned to
     lolo4j
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Core
  • Resolution
    Not determined
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF Vision
Issue description
From a JPPF user: it would be really useful to have task-batch level exceptions, for instance if a method of a NodeLifeCycleListener implementation throws an exception, it can be reported back to the client.

#1
Comment posted by
 lolo4j
Dec 23, 08:21
Some preliminary remarks on the implementation of this feature:
  • there is already a mechanism which handles specific exceptions occurring during node I/O. For instance when a NotSerializableException is thrown when serializing/serializing a job on the node side. This feature is something different and requires a separate mechanism.
  • the server will have to be able to keep track of multiple exceptions occurring on multiple task bundles dispatched to one or more nodes. This implies something similar to a data provider with read/write capability instead of read-only
  • this raises the question of whether we should generalize this mechanism so that it can be used for more than just error reporting.
  • this will also require a public API for JPPFJob to handle this.
  • we should also think of the possibilities this may open up. For instance, we could consider some server plugins/extensions point that could use the returned data and alter the handling of the job on the server side.
#4
Comment posted by
 lolo4j
Dec 28, 09:32
As the 4.0 release is already late, I am pushing back this feature to 4.1 milestone.

In the meantime, a possible approach to accomplishing with user-defined code:

1. define an interface ErrorHolder:
public interface ErrorHolder {
  void setErrorInfo(Object object);
}


2. have the tasks implement this interface so they can hold a reference to the error information

3. In the NodeLifeCycle implementation, capture any error that occurs in the implemented methods

4. In the jobEnded() method iterate over the completed tasks until one is found which implements ErrorHolder. If one is found, call setErrorInfo() and then clear the error from the NodeLifeCycle.