public class GridJobProcessor extends GridProcessorAdapter
Modifier and Type | Class and Description |
---|---|
class |
GridJobProcessor.PartitionsReservation |
GridComponent.DiscoveryDataExchangeType
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE
Active jobs metric name.
|
static String |
CANCELED
Canceled jobs metric name.
|
static int |
DFLT_JOBS_HISTORY_SIZE |
static String |
EXECUTION_TIME
Total jobs execution time metric name.
|
static String |
FINISHED
Finished jobs metric name.
|
static String |
JOBS_METRICS
Metrics prefix.
|
static String |
JOBS_VIEW |
static String |
JOBS_VIEW_DESC |
static String |
REJECTED
Rejected jobs metric name.
|
static String |
STARTED
Started jobs metric name.
|
static String |
WAITING
Waiting jobs metric name.
|
static String |
WAITING_TIME
Total jobs waiting time metric name.
|
ctx, diagnosticLog, log
Constructor and Description |
---|
GridJobProcessor(GridKernalContext ctx) |
Modifier and Type | Method and Description |
---|---|
@Nullable GridJobWorker |
activeJob(IgniteUuid jobId)
Gets active job.
|
void |
cancelJob(@Nullable IgniteUuid sesId,
@Nullable IgniteUuid jobId,
boolean sys) |
GridDeployment |
currentDeployment()
Returns current deployment.
|
String |
currentTaskName()
Gets name task executed by current thread.
|
int |
currentTaskNameHash()
Gets hash of task name executed by current thread.
|
void |
currentTaskSession(GridJobSessionImpl ses)
Callback from job worker to set current task session for execution.
|
boolean |
internal() |
void |
masterLeaveLocal(IgniteUuid sesId)
Notify processor that master leave aware handler must be invoked on all jobs with the given session ID.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
processJobExecuteRequest(ClusterNode node,
GridJobExecuteRequest req) |
Collection<ComputeJobSibling> |
requestJobSiblings(ComputeTaskSession ses) |
void |
setAttributes(GridJobSessionImpl ses,
Map<?,?> attrs) |
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onReconnected, toString, validateNode, validateNode
public static final String JOBS_VIEW
public static final String JOBS_VIEW_DESC
public static final int DFLT_JOBS_HISTORY_SIZE
public static final String JOBS_METRICS
public static final String STARTED
public static final String ACTIVE
public static final String WAITING
public static final String CANCELED
public static final String REJECTED
public static final String FINISHED
public static final String EXECUTION_TIME
public static final String WAITING_TIME
public GridJobProcessor(GridKernalContext ctx)
ctx
- Kernal context.public void start() throws IgniteCheckedException
start
in interface GridComponent
start
in class GridProcessorAdapter
IgniteCheckedException
- Throws in case of any errors.public void stop(boolean cancel)
stop
in interface GridComponent
stop
in class GridProcessorAdapter
cancel
- If true
, then all ongoing tasks or jobs for relevant
components need to be cancelled.public void onKernalStop(boolean cancel)
onKernalStop
in interface GridComponent
onKernalStop
in class GridProcessorAdapter
cancel
- Flag indicating whether jobs should be canceled.@Nullable public @Nullable GridJobWorker activeJob(IgniteUuid jobId)
jobId
- Job ID.public boolean internal()
True
if running internal task.public void setAttributes(GridJobSessionImpl ses, Map<?,?> attrs) throws IgniteCheckedException
ses
- Session.attrs
- Attributes.IgniteCheckedException
- If failed.public Collection<ComputeJobSibling> requestJobSiblings(ComputeTaskSession ses) throws IgniteCheckedException
ses
- Session.IgniteCheckedException
- If failed.public void masterLeaveLocal(IgniteUuid sesId)
sesId
- Session ID.public void cancelJob(@Nullable @Nullable IgniteUuid sesId, @Nullable @Nullable IgniteUuid jobId, boolean sys)
sesId
- Session ID.jobId
- Job ID.sys
- System flag.public void processJobExecuteRequest(ClusterNode node, GridJobExecuteRequest req)
node
- Node.req
- Request.public void currentTaskSession(GridJobSessionImpl ses)
ses
- Session.public int currentTaskNameHash()
0
if security is disabled.public String currentTaskName()
null
if security is disabled.public GridDeployment currentDeployment()
public void printMemoryStats()
printMemoryStats
in interface GridComponent
printMemoryStats
in class GridProcessorAdapter
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021