public class DirectUploader extends java.lang.Thread implements IUploader, JobEndListener
Constructor and Description |
---|
DirectUploader() |
Modifier and Type | Method and Description |
---|---|
void |
close()
This is to for disposing or cleaning up any internal state accumulated by the uploader
|
boolean |
complete()
DirectUploader should run until the job completes
it should upload the job package in case of failures and job scaling up new workers
|
void |
initialize(Config cnfg,
java.lang.String jbID)
Initialize the uploader with the incoming context.
|
void |
jobEnded()
job has ended
stop the uploader
clear temp job package directory
|
void |
run()
watch job pods until they become Running and start an uploader for each pod afterward
|
void |
stopUploader() |
boolean |
undo()
Undo uploading.
|
java.net.URI |
uploadPackage(java.lang.String sourceLocation)
UploadPackage will upload the job package to the given location.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public void initialize(Config cnfg, java.lang.String jbID)
IUploader
initialize
in interface IUploader
public java.net.URI uploadPackage(java.lang.String sourceLocation) throws UploaderException
IUploader
uploadPackage
in interface IUploader
sourceLocation
- the source location with all the filesnull
if failed.UploaderException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean complete()
public void stopUploader()
public void jobEnded()
jobEnded
in interface JobEndListener
public boolean undo()
IUploader