-
public interface JobContext
Context available to job.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StorageManager
ensureJobStorageManager()
Returns a storage manager for storing temporary files.DistributedExecutorService
getDistributedExecutor()
Returns an executor service for performing work within the job.FileClient
getFileClient()
Returns the file client to be used within this contextvoid
releaseStorage(FileClient fileClient, StoragePlanner storagePlanner)
Releases all storage for this storage manager that was allocated by the given planner.
-
-
-
Method Detail
-
getDistributedExecutor
DistributedExecutorService getDistributedExecutor()
Returns an executor service for performing work within the job. Starts the first time it is used. Shuts down when the job is shutdown.- Returns:
- the executor service.
-
ensureJobStorageManager
StorageManager ensureJobStorageManager()
Returns a storage manager for storing temporary files. Allocated upon job start, auto-released on job shutdown Calling this method forces allocation of nodes in the cluster so this should not be invoked withinJobCallable.init(JobContext)
.- Returns:
- the storage manager
-
releaseStorage
void releaseStorage(FileClient fileClient, StoragePlanner storagePlanner)
Releases all storage for this storage manager that was allocated by the given planner. This call is ignored if a storage manager was never created- Parameters:
fileClient
- the file clientstoragePlanner
- the storage planner
-
getFileClient
FileClient getFileClient()
Returns the file client to be used within this context- Returns:
- the file client
-
-