suvodeep-pyne opened a new pull request, #17016:
URL: https://github.com/apache/pinot/pull/17016

   ## Summary
   
   This PR refactors segment reload-related REST APIs from 
`PinotSegmentRestletResource` into a new dedicated `PinotTableReloadResource` 
class with enhanced documentation and improved Swagger annotations.
   
   ### Changes
   
   1. **New Resource Class**: Created `PinotTableReloadResource.java` to house 
all reload-related endpoints
   2. **Moved APIs**:
      - `POST /segments/{tableName}/{segmentName}/reload` - Reload a specific 
segment
      - `POST /segments/{tableName}/reload` - Reload all segments in a table
      - `GET /segments/segmentReloadStatus/{jobId}` - Get reload job status
      - `GET /segments/{tableNameWithType}/needReload` - Check if segments need 
reloading
   3. **Enhanced Documentation**:
      - Added comprehensive class-level Javadoc
      - Improved Swagger `@ApiOperation` annotations with clear descriptions
      - Added `@ApiResponses` annotations for all endpoints documenting HTTP 
status codes
      - Enhanced `@ApiParam` annotations with examples and better descriptions
      - Used `allowableValues` for enum parameters
   4. **Code Organization**:
      - Moved helper methods (`getExistingTable`, `reloadSegments`, 
`getServerToSegments`)
      - Removed unused imports from `PinotSegmentRestletResource`
      - Maintained all existing functionality and behavior
   
   ### Benefits
   
   - **Separation of Concerns**: Reload operations now have their own dedicated 
resource class
   - **Better API Discovery**: Enhanced Swagger documentation makes APIs easier 
to understand and use
   - **Improved Maintainability**: Related functionality is grouped together, 
making the codebase easier to navigate
   - **No Breaking Changes**: All endpoint paths and behaviors remain identical
   
   ### Test Plan
   
   - [ ] Existing unit tests pass
   - [ ] API endpoints remain accessible at same paths
   - [ ] Swagger UI displays enhanced documentation correctly
   - [ ] All reload operations function as before


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