incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HAMA-473) Local files should be deleted when task is completed or killed
Date Thu, 10 Nov 2011 11:00:51 GMT
Local files should be deleted when task is completed or killed
--------------------------------------------------------------

                 Key: HAMA-473
                 URL: https://issues.apache.org/jira/browse/HAMA-473
             Project: Hama
          Issue Type: Bug
          Components: bsp
    Affects Versions: 0.3.0
            Reporter: Edward J. Yoon
            Assignee: Edward J. Yoon
             Fix For: 0.4.0


I think, below codes should be just moved into Child.done() method.

{code}
          if (taskStatus.getRunState() == TaskStatus.State.RUNNING) {

            if (!tip.runner.isAlive()) {
              if (taskStatus.getRunState() != TaskStatus.State.FAILED) {
                taskStatus.setRunState(TaskStatus.State.SUCCEEDED);
                LOG.info("Task '" + taskStatus.getTaskId().toString()
                    + "' has completed.");
              }
              taskStatus.setPhase(TaskStatus.Phase.CLEANUP);
            }
          }
{code}

and, local files should be deleted when task is completed, or killed.

{code}
            // TODO Use the cleanup thread
            // tasksToCleanup.put(action);

            KillTaskAction killAction = (KillTaskAction) action;
            if (tasks.containsKey(killAction.getTaskID())) {
              TaskInProgress tip = tasks.get(killAction.getTaskID());
              tip.taskStatus.setRunState(TaskStatus.State.FAILED);
              try {
                tip.killAndCleanup(true);
              } catch (IOException ioe) {
                throw new DirectiveException("Error when killing a "
                    + "TaskInProgress.", ioe);
              }
            }
{code}


--
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