incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HAMA-469) The statusUpdate() method should be called finally.
Date Tue, 06 Dec 2011 05:51:39 GMT

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

Hudson commented on HAMA-469:
-----------------------------

Integrated in Hama-Nightly #378 (See [https://builds.apache.org/job/Hama-Nightly/378/])
    [HAMA-469] Add SyncException and catch all exceptions thrown by task runner.

edwardyoon : 
Files : 
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPJobClient.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeer.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPTask.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/GroomServer.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/JobInProgress.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/Task.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/SyncClient.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/SyncException.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/sync/ZooKeeperSyncClientImpl.java
* /incubator/hama/trunk/core/src/main/java/org/apache/hama/ipc/BSPPeerProtocol.java
* /incubator/hama/trunk/core/src/test/java/org/apache/hama/bsp/IOSerializePrinting.java
* /incubator/hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPartitioning.java
* /incubator/hama/trunk/core/src/test/java/org/apache/hama/examples/ClassSerializePrinting.java
* /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/CombineExample.java
* /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java
* /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PiEstimator.java
* /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/RandBench.java
* /incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPaths.java
* /incubator/hama/trunk/yarn/src/main/java/org/apache/hama/bsp/BSPApplicationMaster.java
* /incubator/hama/trunk/yarn/src/main/java/org/apache/hama/bsp/YarnSerializePrinting.java

                
> The statusUpdate() method should be called finally.
> ---------------------------------------------------
>
>                 Key: HAMA-469
>                 URL: https://issues.apache.org/jira/browse/HAMA-469
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp
>    Affects Versions: 0.3.0
>            Reporter: Edward J. Yoon
>            Assignee: Edward J. Yoon
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.4.0
>
>         Attachments: HAMA-469_v01.patch, HAMA-469_v02.patch
>
>
> {code}
>   public void sync() throws InterruptedException {
>     try {
>       enterBarrier();
>       Iterator<Entry<InetSocketAddress, LinkedList<BSPMessage>>> it
= messenger
>           .getMessageIterator();
>       while (it.hasNext()) {
>         Entry<InetSocketAddress, LinkedList<BSPMessage>> entry = it.next();
>         final InetSocketAddress addr = entry.getKey();
>         final Iterable<BSPMessage> messages = entry.getValue();
>         final BSPMessageBundle bundle = combineMessages(messages);
>         if (conf.getBoolean("bsp.checkpoint.enabled", false)) {
>           checkpoint(checkpointedPath(), bundle);
>         }
>         // remove this message during runtime to save a bit of memory
>         it.remove();
>         messenger.transfer(addr, bundle);
>       }
>       leaveBarrier();
>       currentTaskStatus.incrementSuperstepCount();
>       umbilical.statusUpdate(taskId, currentTaskStatus);
>       // Clear outgoing queues.
>       messenger.clearOutgoingQueues();
>     } catch (Exception e) {
>       LOG.fatal(
>           "Caught exception during superstep "
>               + currentTaskStatus.getSuperstepCount() + "!", e);
>     }
>   }
> {code}
> I think, the task status should be set to "Failed" when exception occurs in the sync()
method. And the statusUpdate() method should be called finally.
> So instead of logging a fatal exception, we should mutate the currentTaskStatus object
and set the task status to FAILED. 
> We should update the umbilical via 
> bq. umbilical.statusUpdate(taskId, currentTaskStatus);
> Now that the barrier is broken, we should make the task fail as well -> throw a RuntimeException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message