Versions Compared

Key

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

...

  1. id: A string value that represents the identifier of the blocked task manager or node.
  2. action: An enum value(MARK_BLOCKED or MARK_BLOCKED_AND_EVACUATE_TASKS) that represents the block action when a task manager/node is marked as blocked.
  3. startTimestamp: A long value that represents the unix timestamp(milliseconds) of creating this item. 
  4. endTimestamp:  A long value that represents the unix timestamp(milliseconds) at which the item should be removed. If the blocked item is permanent, this value will be Long.MAX_VALUE(9223372036854775807).
  5. cause: A string value that represents the cause for blocking this task manager or node.

Add

POSTPUT: http://{jm_rest_address:port}/blocklist/nodes/<id>

POSTPUT: http://{jm_rest_address:port}/blocklist/taskmanagers/<id>

Request

Request body:

Code Block
titleRequest Example
[
    {
        "id":"node1/container1",
        "action":"MARK_BLOCKED",
        "endTimestamp":"1652317200000",
        "cause":"Hot machine",
        "allowMerge":"true"
    },
    {
        "id":"node2/container2",
        "action":"MARK_BLOCKED_AND_EVACUATE_TASKS",
        "timeout":"36000001652317200000",
        "cause":"No space left on device"Hot machine",
    }
]"allowMerge":"true"
}

Field meanings in requests:

  1. id: A string value that specifies the identifier of the blocked task manager or node.
  2. action: An enum value(MARK_BLOCKED or MARK_BLOCKED_AND_EVACUATE_TASKS) that specifies the block action when a task manager/node is marked as blocked.
  3. timeout(optional): A long value that specifies the timeout (milliseconds).
  4. endTimestamp(optional): A long value that specifies the unix timestamp(milliseconds) at which the item should be removed. Note that only one of timeout and endTimestamp can be specified. If neither is not specified, it means that the blocked item is permanent and will not be removed. If both are specified, will return error. 
  5. cause: A string value that specifies the cause for blocking this task manager or node.
  6. allowMerge(optional): A boolean value that specifies whether to merge when a conflict occurs. The default value is false.

...