Provides safe, limited access to a running job's state for use from JavaScript job functions. An instance is created for each call into a job's map, reduce or onMappedTasksComplete script so the script can check whether the job has been cancelled and can report live status information back to the framework, without exposing the full processable implementation.


Properties

PropertyReturnsDescription
cancelledbooleanWhether the underlying job has been cancelled. JS job functions should check this and stop doing work early when it is true.
statusInfoStatusInfoThe status info for the underlying job, which JS job functions can use to read progress details or inspect completion and cancellation dates.

Methods

isCancelled()

Returns: boolean

Whether the underlying job has been cancelled. JS job functions should check this and stop doing work early when it is true.

getStatusInfo()

Returns: StatusInfo

The status info for the underlying job, which JS job functions can use to read progress details or inspect completion and cancellation dates.

setStatus(String status)

Returns: void

Sets a user friendly status message describing the job's current progress, for JS job functions to report live status back to the framework.

ParameterDescription
statusthe status message to display
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.