Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Upgrade an Application

Notes:

  • Before upgrading Upgrading real-time pipelines , they need to be stopped gracefully. A stop can be triggered on the pipelines either one after another or on multiple pipelines at the same time. While issuing the stop, the graceful query parameter with no timeout value (/stop?graceful) must be passed. Also, you must enable write-ahead logs (WALs) at the launch of the real-time pipeline. If WALs are enabled and you issue a graceful stop, data loss prevention is guaranteed. If WALs are not enabled and/or if a timeout value is passed to stop the pipeline, there is a possibility of data loss. For more information about the API usage, see Stop a program and Stop multiple programsto use the latest version of application artifacts is not supported.

  • Back up all applications before performing the upgrade.

  • To get the name of the application you want to upgrade, use the GET request listed in “List Applications”.

...

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application being called

version-id

Version of the application being called

program-type

One of mapreduceservicessparkworkers, or workflows

program-id

Name of the MapReducecustom serviceSparkworker, or workflow being stopped

Optional query parameters can also be specified with the request.

...

Query Parameter

...

Version Introduced

...

Description

...

graceful

...

6.7.0

...

Try to stop the program gracefully for up to this many seconds. Programs that take longer than this to stop will be killed forcefully. If no value is passed, the program will not be killed forcefully.

A program that is in A program that is in the STOPPED state cannot be stopped. If there are multiple runs of the program in the RUNNING state, this call will stop one of the runs, but not all of the runs.

...

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application being called

program-type

One of mapreduceservicessparkworkers, or workflows

program-id

Name of the MapReducecustom serviceSparkworker, or workflow being called

run-id

Run id of the run being called

Optional query parameters can also be specified with the request.

Query Parameter

Version Introduced

Description

graceful

6.7.0

Try to stop the program gracefully for up to this many seconds. Programs that take longer than this to stop will be killed forcefully. If no value is passed, the program will not be killed forcefully.

For example:

Code Block
POST /v3/namespaces/default/apps/PurchaseHistory/mapreduce/PurchaseHistoryBuilder/runs/631bc459-a9dd-4218-9ea0-d46fb1991f82/stop?graceful=300

will attempt to gracefully stop a specific run of the PurchaseHistoryBuilder MapReduce program in the PurchaseHistory application. If the run has not stopped after 300 seconds, it will be forcefully killed.

Stop Multiple Programs

You can stop multiple programs from different applications and program types by submitting an HTTP POST request:

...

Parameter

Description

appId

Name of the application being called

programType

One of mapreduceservicesparkworker, or workflow

programId

Name of the MapReducecustom serviceSparkworker, or workflow being stopped

Optional query parameters can also be specified with the request.

Query Parameter

Version Introduced

Description

graceful

6.7.0

Try to stop the program gracefully for up to this many seconds. Programs that take longer than this to stop will be killed forcefully. If no value is passed, the program will not be killed forcefully.

The response will be a JSON array containing a JSON object corresponding to each object in the input. Each JSON object will contain these parameters:

...