Using the listJobsOperation of the Administration Web Service, you can make a job monitoring request for a list of jobs that are currently running or pending in the queue.
Depending on your environment, you can run a single server, or a cluster. If you are a running a cluster, it is important to remember that only the leader node runs updating commands, while all nodes in the cluster process query requests. Thus, in a cluster, the list of jobs returned by the Administrative Web Service depends on which data store (and node) you issue the listJobsOperation. For example, the leader node may return a list of jobs that include an update, while follower nodes will only return a list of query processing jobs.
To obtain a list of jobs that are running or pending in the queue in the data store:
Item | Description |
---|---|
jobId | An internal ID assigned by the Oracle Endeca Server. |
jobType | Indicates the type of job that is being monitored. It can be Admin, Query, or Update. |
queuedTime | Indicates the time at which the Dgraph process had scheduled to run the job. If the job is already running, this time is in the past. If the job is pending in the queue, this time is in the future. |
isRunning | Indicates whether the job is already running. The values are true or false. |
isCanceled | Indicates whether the job is canceled.
If the job is pending in the queue but has not yet started, you can cancel it. In other words, if the value of isCanceled is false, and the value of isRunning is also false, you can cancel the job. |
In this example of the Administration Web Service response, you can see that a query with the job ID 7 is currently running. You can see its job ID, the ID of the outer transaction within which this job is running, the job type (query), and queued time. You can also see that the job is running (which means you cannot cancel it).
<admin:response xmlns:admin="http://www.endeca.com/MDEX/admin/1/0"> <admin:jobs> <admin:job jobId="7"> <admin:jobType>Query</admin:jobType> <admin:OuterTransactionId>123</admin:OuterTransactionId> <admin:queuedTime>2012-01-15T01:36:40.694Z</admin:queuedTime> <admin:isRunning>true</admin:isRunning> <admin:isCanceled>false</admin:isCanceled> </admin:job> </admin:jobs> </admin:response>
You can use the Endeca Server list-jobs command as an alternative to the listJobsOperation of the Administration Web Service. For details on this command, see the topic list-jobs command.