Package org.apache.heron.spi.uploader
Interface IUploader
-
- All Superinterfaces:
AutoCloseable
public interface IUploader extends AutoCloseable
Uploads topology package to a shared location. This location must be accessible by runtime environment of topology. The uploader will upload- topology jar, - topology jar dependencies, - topology definition, and - heron core packages and libraries, if required
Uploader outputs another context containing the necessary information that will be used by next stages of topology submission.
Implementation of IUploader is required to have a no argument constructor that will be called to create an instance of IUploader.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
This is to for disposing or cleaning up any internal state accumulated by the uploadervoid
initialize(Config config)
Initialize the uploader with the incoming context.boolean
undo()
If subsequent stages fail, undo will be called to free resources used by uploading package.URI
uploadPackage()
UploadPackage will upload the topology package to the given location.
-
-
-
Method Detail
-
initialize
void initialize(Config config)
Initialize the uploader with the incoming context.- Parameters:
config
- The config object.
-
uploadPackage
URI uploadPackage() throws UploaderException
UploadPackage will upload the topology package to the given location.- Returns:
- destination URI of where the topology package has
been uploaded if successful, or
null
if failed. - Throws:
UploaderException
-
undo
boolean undo()
If subsequent stages fail, undo will be called to free resources used by uploading package. Ideally, this should try to remove the uploaded package.- Returns:
- True if successful.
-
close
void close()
This is to for disposing or cleaning up any internal state accumulated by the uploaderCloses this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
- Specified by:
close
in interfaceAutoCloseable
-
-