Upgrade job snapshot APIedit

Upgrades a previously stored machine learning model snapshot to the current major version. It accepts an UpgradeJobModelSnapshotRequest object and responds with an UpgradeJobModelSnapshotResponse object.

Upgrade job snapshots requestedit

A UpgradeJobModelSnapshotRequest requires the following arguments:

UpgradeJobModelSnapshotRequest request = new UpgradeJobModelSnapshotRequest(
    jobId, 
    snapshotId, 
    TimeValue.timeValueMinutes(30), 
    true); 

The job that owns the snapshot

The snapshot id to upgrade

The time out of the request. When wait_for_completion is false the timeout value is applied to the time it takes for the task to be assigned to a node. When wait_for_completion is true this timeout applies for the whole upgrade process. The default value is 30m

When true, this causes the request to not return until the upgrade is complete. Otherwise, the response returns as soon as the task is assigned to a node. The default is false.

Upgrade job snapshot responseedit

A UpgradeJobModelSnapshotResponse contains information on if the request was completed and its assigned node.

boolean completed = response.isCompleted(); 
String node = response.getNode(); 

Was the upgrade completed

What is the assigned node if the task is not completed