Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
add java doc for task state
Browse files Browse the repository at this point in the history
  • Loading branch information
ylwu-amzn committed Dec 16, 2020
1 parent 813c509 commit 2cd58aa
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,40 @@

package com.amazon.opendistroforelasticsearch.ad.model;

/**
* AD task states.
* <ul>
* <li><code>CREATED</code>:
* When user start a historical detector, we will create one task to track the detector
* execution and set its state as CREATED
*
* <li><code>INIT</code>:
* After task created, coordinate node will gather all eligible node’s state and dispatch
* task to the worker node with lowest load. When the worker node receives the request,
* it will set the task state as INIT immediately, then start to run cold start to train
* RCF model. We will track the initialization progress in task.
* Init_Progress=ModelUpdates/MinSampleSize
*
* <li><code>RUNNING</code>:
* If RCF model gets enough data points and passed training, it will start to detect data
* normally and output positive anomaly scores. Once the RCF model starts to output positive
* anomaly score, we will set the task state as RUNNING and init progress as 100%. We will
* track task running progress in task: Task_Progress=DetectedPieces/AllPieces
*
* <li><code>FINISHED</code>:
* When all historical data detected, we set the task state as FINISHED and task progress
* as 100%.
*
* <li><code>STOPPED</code>:
* User can cancel a running task by stopping detector, for example, user want to tune
* feature and reran and don’t want current task run any more. When a historical detector
* stopped, we will mark the task flag cancelled as true, when run next piece, we will
* check this flag and stop the task. Then task stopped, will set its state as STOPPED
*
* <li><code>FAILED</code>:
* If any exception happen, we will set task state as FAILED
* </ul>
*/
public enum ADTaskState {
CREATED,
INIT,
Expand Down

0 comments on commit 2cd58aa

Please sign in to comment.