rsrkpatwari1234 opened a new issue, #16231:
URL: https://github.com/apache/pinot/issues/16231

   For an incorrect segment download path, the `/segments` API failed with 500 
http code - causing confusion as to whether the pinot controllers are broken. 
On debugging logs, this seems to be due to FileNotFound exception which got 
wrapped by AttemptsExceededException - delaying debugging process.
   
   Proposed Improvements - 
   
   - Controller API - `/segments` should return a 404 error in case of such 
failures 
   - Retry should not be performed in case of FileNotFound exception
   
   Error - 
   `Caused by: org.apache.pinot.common.exception.HttpErrorStatusException: Got 
error status code: 500 (Internal Server Error) with reason: "Exception while 
uploading segment: Operation failed after 3 attempts" while sending request: 
http://localhost:5436/segments to controller:`
   
   Stacktrace for the API - 
   `
   org.apache.pinot.spi.utils.retry.AttemptsExceededException: Operation failed 
after 3 attempts at 
org.apache.pinot.spi.utils.retry.BaseRetryPolicy.attempt(BaseRetryPolicy.java:65)
 at 
org.apache.pinot.common.utils.fetcher.BaseSegmentFetcher.fetchSegmentToLocal(BaseSegmentFetcher.java:74)
 at 
org.apache.pinot.common.utils.fetcher.SegmentFetcherFactory.fetchSegmentToLocal(SegmentFetcherFactory.java:124)
 at 
org.apache.pinot.common.utils.fetcher.SegmentFetcherFactory.fetchSegmentToLocal(SegmentFetcherFactory.java:132)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.downloadSegmentFileFromURI(PinotSegmentUploadDownloadRestletResource.java:461)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.uploadSegment(PinotSegmentUploadDownloadRestletResource.java:277)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.uploadSegmentAsJson(PinotSegmentUploadDownloadRestletResource.java:511)
 
   `
   
   Cause -
   `
   java.io.FileNotFoundException: /viewfs: at 
org.apache.hadoop.fs.viewfs.InodeTree.resolve(InodeTree.java:402) at 
org.apache.hadoop.fs.viewfs.ViewFileSystem.getFileStatus(ViewFileSystem.java:378)
 at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:340) at 
org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:292) at 
org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2067) at 
org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2036) at 
org.apache.hadoop.fs.FileSystem.copyToLocalFile(FileSystem.java:2012) at 
com.uber.uPinot.filesystem.HDFSFileSystem.copyToLocalFile(HDFSFileSystem.java:335)
 at 
org.apache.pinot.spi.filesystem.NoClosePinotFS.copyToLocalFile(NoClosePinotFS.java:98)
 at 
org.apache.pinot.common.utils.fetcher.PinotFSSegmentFetcher.fetchSegmentToLocalWithoutRetry(PinotFSSegmentFetcher.java:31)
 at 
org.apache.pinot.common.utils.fetcher.BaseSegmentFetcher.lambda$fetchSegmentToLocal$0(BaseSegmentFetcher.java:76)
 at org.apache.pinot.spi.utils.retry.BaseRetryPoli
 cy.attempt(BaseRetryPolicy.java:58) at 
org.apache.pinot.common.utils.fetcher.BaseSegmentFetcher.fetchSegmentToLocal(BaseSegmentFetcher.java:74)
 at 
org.apache.pinot.common.utils.fetcher.SegmentFetcherFactory.fetchSegmentToLocal(SegmentFetcherFactory.java:124)
 at 
org.apache.pinot.common.utils.fetcher.SegmentFetcherFactory.fetchSegmentToLocal(SegmentFetcherFactory.java:132)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.downloadSegmentFileFromURI(PinotSegmentUploadDownloadRestletResource.java:461)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.uploadSegment(PinotSegmentUploadDownloadRestletResource.java:277)
 at 
org.apache.pinot.controller.api.resources.PinotSegmentUploadDownloadRestletResource.uploadSegmentAsJson(PinotSegmentUploadDownloadRestletResource.java:511)
 
   `


-- 
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: commits-unsubscr...@pinot.apache.org.apache.org

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