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, yieldpublic void initialize(Config cnfg, java.lang.String jbID)
IUploaderinitialize in interface IUploaderpublic java.net.URI uploadPackage(java.lang.String sourceLocation)
throws UploaderException
IUploaderuploadPackage in interface IUploadersourceLocation - the source location with all the filesnull if failed.UploaderExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic boolean complete()
public void stopUploader()
public void jobEnded()
jobEnded in interface JobEndListenerpublic boolean undo()
IUploader