npawar opened a new pull request #6336:
URL: https://github.com/apache/incubator-pinot/pull/6336


   
   Adding a reset API. This API will disable and then enable the segment. This 
API will be useful in case of resetting consumers which are stuck as reported 
in https://github.com/apache/incubator-pinot/issues/6308.
   **Note: Adding test pending**
   
   1. If the segment is in ERROR state, invoking this API will send state 
transitions first to OFFLINE, and then back to ONLINE/CONSUMING.
   2. If segment is ONLINE/CONSUMING, invoking this API will send state 
transitions, first to OFFLINE and then back to ONLINE/CONSUMING.
   
   Reset one segment:
   ```
    curl -X POST 
"http://localhost:9000/segments/transcript_REALTIME/transcript__1__3__20201208T1956Z/reset";
 -H "accept: application/json"
   {"status":"Successfully invoked segment reset"}
   ``` 
   Reset all segments:
   ```
   curl -X POST "http://localhost:9000/segments/transcript_REALTIME/reset"; -H 
"accept: application/json" 
   {"status":"Successfully invoked segment reset"}
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to