org.apache.hama.bsp
Interface RunningJob


public interface RunningJob

RunningJob is the user-interface to query for details on a running BSP job.

Clients can get hold of RunningJob via the BSPJobClient and then query the running-job for details such as name, configuration, progress etc.

See Also:
BSPJobClient

Method Summary
 BSPJobID getID()
          Get the job identifier.
 java.lang.String getJobFile()
          Get the path of the submitted job configuration.
 java.lang.String getJobName()
          Get the name of the job.
 int getJobState()
          Returns the current state of the Job.
 long getSuperstepCount()
           
 boolean isComplete()
          Check if the job is finished or not.
 boolean isSuccessful()
          Check if the job completed successfully.
 void killJob()
          Kill the running job.
 void killTask(TaskAttemptID taskId, boolean shouldFail)
          Kill indicated task attempt.
 long progress()
          Get the progress of the job's tasks, as a float between 0.0 and 1.0.
 void waitForCompletion()
          Blocks until the job is complete.
 

Method Detail

getID

BSPJobID getID()
Get the job identifier.

Returns:
the job identifier.

getJobName

java.lang.String getJobName()
Get the name of the job.

Returns:
the name of the job.

getJobFile

java.lang.String getJobFile()
Get the path of the submitted job configuration.

Returns:
the path of the submitted job configuration.

progress

long progress()
              throws java.io.IOException
Get the progress of the job's tasks, as a float between 0.0 and 1.0. When all bsp tasks have completed, the function returns 1.0.

Returns:
the progress of the job's tasks.
Throws:
java.io.IOException

isComplete

boolean isComplete()
                   throws java.io.IOException
Check if the job is finished or not. This is a non-blocking call.

Returns:
true if the job is complete, else false.
Throws:
java.io.IOException

isSuccessful

boolean isSuccessful()
                     throws java.io.IOException
Check if the job completed successfully.

Returns:
true if the job succeeded, else false.
Throws:
java.io.IOException

waitForCompletion

void waitForCompletion()
                       throws java.io.IOException
Blocks until the job is complete.

Throws:
java.io.IOException

getJobState

int getJobState()
                throws java.io.IOException
Returns the current state of the Job. JobStatus

Throws:
java.io.IOException

killJob

void killJob()
             throws java.io.IOException
Kill the running job. Blocks until all job tasks have been killed as well. If the job is no longer running, it simply returns.

Throws:
java.io.IOException

killTask

void killTask(TaskAttemptID taskId,
              boolean shouldFail)
              throws java.io.IOException
Kill indicated task attempt.

Parameters:
taskId - the id of the task to be terminated.
shouldFail - if true the task is failed and added to failed tasks list, otherwise it is just killed, w/o affecting job failure status.
Throws:
java.io.IOException

getSuperstepCount

long getSuperstepCount()
                       throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.