Skip to main content

Checking a job status

With the API

You can see the current job states of all datasources for the app myApp by calling the Jobs API:
If a job has never run, a Jobs API call returns the following:
The value datasource:myDatasource indicates a datasource, myDatasource, is present. The line "status": "ready" indicates the current state of the job, which has never run.
After a job successfully completes, the following is returned:
To see the complete job history, use the following Jobs API call:
The following is returned:
The section How does the Jobs API work? below gives additional details on how the Jobs API retrieves information from Lucidworks Search. See the Jobs API reference for more information.

Job history results field definitions

Job history counters vary between V1 (classic) connectors and V2 (plugin) connectors. V1 connectors use the counter.* prefix, while V2 connectors use different counter names without the prefix. To determine if a datasource uses a V1 or V2 connector, check the connectorType field in the job history response. V1 connectors use types like lucid.anda or lucid.fs. V2 connectors use types like lucidworks.*, such as lucidworks.file-upload or lucidworks.jdbc. V1 Connector Counters V2 Connector Counters V2 connectors (Java SDK-based) use a different counter format with more granular metrics. In addition, V2 connectors may include additional connector-specific counters depending on the connector type and implementation.
Pro connectors use the same framework as V2 connectors. For more information, see What are Pro connectors?.
The following fields apply to V2 connectors and Pro connectors.
The specific counters available in job history depend on the connector type, version, and configuration. Some connectors may provide additional metrics. Use the Connector Jobs API to inspect the actual counters for your datasource.

With the UI

In the Lucidworks Search UI, navigate to Indexing > Datasources. Click a datasource to open the datasource panel. Datasource panel Note that the Last run start and Last run stop values are equivalent to the lastStartTime and lastEndTime values from the Jobs API call. (These values are only present if a job has been run at least once.) In the job history panel, there is an icon on each datasource indicating its latest run history. The possible statuses are: Job history panel
The image above shows all possible job statuses.

How does the Jobs API work?

In Checking a job status with the API above, two Jobs API endpoints were used to call the datasource myDatasource:
  • myApp/jobs?type=datasource - Retrieves the current datasource job states for all datasources of a specified app. In this case, the app is specified as myApp.
    You can also use type=spark to retrieve all Spark jobs and type=task for task jobs.
  • /jobs/datasource:myDatasource/history - Retrieves a specific object’s job history. In this case, the object type is a datasource, as selected with datasource:.
    Datasources are not the only object type for jobs. There are also Spark jobs (spark:) and task jobs (task:).
Both of the API calls above send a request to Lucidworks Search’s API application, which serves the Jobs API. The API application contains two main components related to job history data, JobController and SolrJobHistoryStore.

The Job Controller

The Job Controller is responsible for getting any active job’s run status, if an active job is running. In the case of V1 connectors classic datasource jobs, it will reach out to Lucidworks Search’s connectors-classic application’s connectors API. When the API application calls the connectors-classic Jobs API, it will first use Zookeeper to identify the IP address of the connector-classic node that is assigned to this datasource, if one exists. When the connectors-classic node IP assigned to the job is identified, the API application will call out to the connectors-classic node via http://<connectors-node-ip>:8984/connectors/v1/connectors/jobs/myDatasource. The call reaches the component ConnectorsManagerController to query the job status of currently running jobs with the ID myDatasource.