sajjad-moradi opened a new pull request #7812: URL: https://github.com/apache/pinot/pull/7812
## Description `FileUploadDownloadClient` uses `ErrorInfo` POJO created in `WebApplicationExceptionMapper` on Controller resources. Currently the json representing the POJO is created using a string. This is not ideal because any refactoring on the POJO doesn't automatically get checked - it's a string and it's not typed-checked at compile time. In fact this happened two times recently and each time the json string got updated as a fix PR (https://github.com/apache/pinot/pull/7428 and https://github.com/apache/pinot/pull/7757). In this PR, the string manipulation for creating the json is replaced with the actual object and the class representing the object is pulled to a common place, so that `FileUploadDownloadClient` can use the same class for deserialization in a type-checked way. ## Testing Done Locally added a small storage quota to generate a quota error in `OfflineClusterIntegrationTest`. Error message before the fix: ``` Got error status code: 403 (Forbidden) with reason: "Failed to get reason" while sending request: http://localhost:18998/v2/segments?tableName=mytable to controller: smoradi-mn1.linkedin.biz, version: Unknown ``` Error message after the fix: ``` Got error status code: 403 (Forbidden) with reason: "Quota check failed for segment: mytable_16282_16312_10 % of table: mytable_OFFLINE, reason: Storage quota exceeded for Table mytable_OFFLINE. New estimated size: 1.57M > total allowed storage size: 1K, where new estimated size = existing estimated uncompressed size of all replicas: 0B - existing segment sizes of all replicas: 0B + (incoming uncompressed segment size: 1.57M * number replicas: 1), total allowed storage size = configured quota: 1K * number replicas: 1" while sending request: http://localhost:18998/v2/segments?tableName=mytable to controller: smoradi-mn1.linkedin.biz, version: Unknown ``` -- 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]
