davsclaus opened a new pull request, #30729:
URL: https://github.com/apache/camel/pull/30729

   _Claude Code on behalf of davsclaus_
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-27182
   
   With `fileName` set to a file that does not exist, every poll failed and 
logged a WARN with a `BlobStorageException` (404). The consumer turns a 404 
into an empty poll, but it caught only `DataLakeStorageException`. In the Azure 
SDK on the classpath (azure-storage-file-datalake 12.25.0), 
`DataLakeFileClient.openInputStream` reads with a `BlockBlobClient` and does 
not translate its exception, so a missing file throws `BlobStorageException`. 
The same gap made a listed file that was deleted before it was read count as a 
failure instead of being skipped.
   
   ## Changes
   - `DataLakeConsumer`: a small `isNotFound` helper treats a 404 of 
`DataLakeStorageException` or `BlobStorageException` as "file does not exist".
   - `poll` uses it, so a missing `fileName` gives an empty poll, as 
`BlobConsumer.poll` in camel-azure-storage-blob does.
   - `createBatchExchangesFromPath` uses it, so a listed file deleted before it 
is read is skipped with a DEBUG log.
   
   ## Tests
   - New `fileNameThatDoesNotExistGivesAnEmptyPoll` in 
`DataLakeConsumerFileThatCannotBeGotTest`: the read throws a 404 
`BlobStorageException`, the polls are empty and none fails.
   - `fileDeletedAfterTheListingIsSkipped` now mocks the exception the SDK 
really throws (`BlobStorageException`), not `DataLakeStorageException`.
   - Both tests fail without the fix and pass with it.
   - `mvn test` in the module: 38 tests run, 38 passed.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

Reply via email to