abhishekrb19 commented on code in PR #16276:
URL: https://github.com/apache/druid/pull/16276#discussion_r1575592377


##########
docs/api-reference/supervisor-api.md:
##########
@@ -3245,13 +3246,13 @@ Host: http://ROUTER_IP:ROUTER_PORT
 
 The supervisor must be running for this endpoint to be available.
 
-Resets the specified supervisor. This endpoint clears all stored offsets in 
Kafka or sequence numbers in Kinesis, prompting the supervisor to resume data 
reading. The supervisor restarts from the earliest or latest available 
position, depending on the platform: offsets in Kafka or sequence numbers in 
Kinesis.
-After clearing all stored offsets in Kafka or sequence numbers in Kinesis, the 
supervisor kills and recreates active tasks,
+Resets the specified supervisor. This endpoint clears supervisor metadata, 
prompting the supervisor to resume data reading. The supervisor restarts from 
the earliest or latest available position, depending on the `useEarliestOffset` 
setting.

Review Comment:
   ```suggestion
   Resets the specified supervisor. This endpoint clears supervisor metadata, 
prompting the supervisor to resume data reading. The supervisor restarts from 
the earliest or latest available position, depending on the value of 
`useEarliestOffset` property.
   ```



##########
docs/ingestion/supervisor.md:
##########
@@ -309,23 +311,23 @@ The following table lists `detailedState` values and 
their corresponding `state`
 
 On each iteration of the supervisor's run loop, the supervisor completes the 
following tasks in sequence:
 
-1. Fetch the list of units of parallelism, such as Kinesis shards or Kafka 
partitions, and determine the starting sequence number or offset for each unit 
(either based on the last processed sequence number or offset if continuing, or 
starting from the beginning or ending of the stream if this is a new stream).
+1. Fetch the list of partitions and determine the starting offset for each 
partition. Druid determines the offset based on the last processed offset if 
continuing, or it starts from the beginning or end of the stream if it's a new 
stream.

Review Comment:
   ...if it's a new stream depending on `useEarliestOffset`?



##########
docs/ingestion/supervisor.md:
##########
@@ -339,6 +341,54 @@ SELECT * FROM sys.supervisors WHERE healthy=0;
 
 For more information on the supervisors system table, see [SUPERVISORS 
table](../querying/sql-metadata-tables.md#supervisors-table).
 
+## Manage a supervisor
+
+You can manage a supervisor from the web console or with the [Supervisor 
API](../api-reference/supervisor-api.md).
+In the web console, navigate to the **Supervisors** view and click the 
ellipsis in the **Actions** column. Select the desired action from the menu 
that appears.
+
+![Actions menu](../assets/supervisor-actions.png)
+
+The supervisor must be running for some of these actions to be available.
+
+### Suspend
+
+**Suspend** pauses a running supervisor.
+The suspended supervisor continues to emit logs and metrics.
+Indexing tasks remain suspended until you resume the supervisor.
+For information on how to suspend a supervisor by API, see [Supervisors: 
Suspend a running 
supervisor](../api-reference/supervisor-api.md#suspend-a-running-supervisor).
+
+### Set offsets
+
+:::info
+Perform this action with caution as it may result in skipped messages and lead 
to data loss or duplicate data.
+:::
+
+**Set offsets** resets the offsets for supervisor partitions.
+This action clears the stored offsets and instructs the supervisor to resume 
reading data from the specified offsets. If there are no stored offsets, Druid 
saves the specified offsets in the metadata store.
+**Set offsets** terminates and recreates active tasks for the specified 
partitions to begin reading from the reset offsets.
+For partitions not specified in this operation, the supervisor resumes from 
the last stored offset.
+
+For information on how to reset offsets by API, see [Supervisors: Reset 
offsets for a 
supervisor](../api-reference/supervisor-api.md#reset-offsets-for-a-supervisor).
+
+### Hard reset
+
+:::info
+Perform this action with caution as it may result in skipped messages and lead 
to data loss or duplicate data.
+:::
+
+**Hard reset** clears supervisor metadata, causing the supervisor to resume 
data reading from either the earliest or latest available position, depending 
on the `useEarliestOffset` setting. **Hard reset** terminates and recreates 
active tasks, so that tasks begin reading from valid positions.
+
+Use this action to recover from a stopped state due to missing offsets.
+
+For information on how to reset a supervisor by API, see [Supervisors: Reset a 
supervisor](../api-reference/supervisor-api.md#reset-a-supervisor).
+
+### Terminate
+
+**Terminate** stops a supervisor and its indexing tasks, triggering the 
publishing of their segments. When you terminate a supervisor, a tombstone 
marker is placed in the database to prevent reloading on restart.

Review Comment:
   ```suggestion
   **Terminate** stops a supervisor and its indexing tasks, triggering the 
publishing of their segments. When you terminate a supervisor, a tombstone 
marker is placed in the metadata store to prevent reloading on restart.
   ```
   
   Also, some of this seems repeated info that one can find if they click on 
the link below.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to