THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
POST: http://{jm_rest_address:port}/blocklist/taskmanagers
Request
Request body:
Code Block | ||
---|---|---|
| ||
{ [ { "id" : "node1/container1", "action" : "MARK_BLOCKED", "endTimestamp" : "1652317200000", "cause" : "Hot machine", "mergeOnConflict" : "true" }, { "id" : "node2/container2", "action" : "MARK_BLOCKED_AND_EVACUATE_TASKS", "timeout" : "3600000", "cause" : "No space left on device" }, ... ] } |
...
- If field mergeOnConflict is false, return error.
- If field mergeOnConflict is true. The newly added item and the existing item will be merged into one. Regarding the 3 fields, the merging algorithm:
- For action, merge(MARK_BLOCKED, MARK_BLOCKED_AND_EVACUATE_TASKS) = MARK_BLOCKED_AND_EVACUATE_TASKS
- For endTimestamp, merge(endTimestampA, endTimestampB) = max(endTimestampA, endTimestampB)
- For cause, we will combine all causes, merge("causeA", "causeB") = "causeA,causeB"
Response
- If no conflict, the response code is 201(CREATED), the response body is empty.
- If conflict occurs:
- If mergeOnConflict is false, the response code is 409(CONFLICT), and returns error.
- if mergeOnConflict is true, the response code is 202(ACCEPTED), the response body is the merged result.
Remove
DELETE: http://{jm_rest_address:port}/blocklist/node/<id>
...