org.duracloud.services.amazonmapreduce
Class JobCompletionMonitor

java.lang.Object
  extended by org.duracloud.services.amazonmapreduce.JobCompletionMonitor
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
HadoopJobCompletionMonitor, SimpleJobCompletionMonitor

public abstract class JobCompletionMonitor
extends java.lang.Object
implements java.lang.Runnable

This class monitors an AmazonMapReduceJobWorker until the underlying hadoop framework reports that the job is complete. Then this class shutsdown the AmazonMapReduceJobWorker.

Author:
Andrew Woods Date: Sep 30, 2010

Constructor Summary
JobCompletionMonitor(AmazonMapReduceJobWorker worker)
           
JobCompletionMonitor(AmazonMapReduceJobWorker worker, long sleepMillis)
           
 
Method Summary
protected abstract  void postCompletionAction()
           
protected abstract  void preCompletionAction(AmazonMapReduceJobWorker worker)
           
 void run()
          This method spins until the job started by the AmazonMapReduceJobWorker is complete, at which point this method shutsdown the worker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobCompletionMonitor

public JobCompletionMonitor(AmazonMapReduceJobWorker worker)

JobCompletionMonitor

public JobCompletionMonitor(AmazonMapReduceJobWorker worker,
                            long sleepMillis)
Method Detail

run

public void run()
This method spins until the job started by the AmazonMapReduceJobWorker is complete, at which point this method shutsdown the worker.

Specified by:
run in interface java.lang.Runnable

preCompletionAction

protected abstract void preCompletionAction(AmazonMapReduceJobWorker worker)

postCompletionAction

protected abstract void postCompletionAction()


Copyright © 2009-2011 DuraSpace. All Rights Reserved.