Claus Ibsen created CAMEL-27875:
-----------------------------------

             Summary: camel-azure-storage-datalake: recursive consumer with 
fileDir mixes up files of the same name, LeaseId and AccessTier headers are 
unused
                 Key: CAMEL-27875
                 URL: https://issues.apache.org/jira/browse/CAMEL-27875
             Project: Camel
          Issue Type: Bug
          Components: camel-azure
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-azure-storage-datalake 
for CAMEL-23832 (pull request https://github.com/apache/camel/pull/31149).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Files of the same name in different directories are mixed up
With fileDir and recursive=true, 
{{DataLakeConsumer.createBatchExchangesFromPath}} downloads every listed file 
before any exchange is routed, and {{DataLakeFileOperations.downloadToFile}} 
names the local file by fileClient.getFileName(), which is only the last path 
segment. So a/x.csv and b/x.csv go to the same local file, and the exchange of 
a/x.csv carries the content of b/x.csv.
Proposed change: resolve the local file by the full path within the file 
system, or download per exchange.

h4. 2. The CamelAzureStorageDataLakeLeaseId header is never read
DataLakeConfigurationOptionsProxy.getLeaseId has no caller; appendToFile takes 
the lease only from the RequestCondition header.
Proposed change: use it in appendToFile and as the lease of the request 
conditions, or deprecate it.

h4. 3. The CamelAzureStorageDataLakeAccessTier header is not used
It is read into FileCommonRequestOptions, but no SDK call uses it.
Proposed change: use it or deprecate it.

h4. 4. The CamelAzureStorageDataLakeFileClient header
It cannot replace fileName, because DataLakeProducer.determineFileName throws 
first; and createFile sets this header, so a later file operation in the same 
route acts on the created file whatever its fileName says.
Proposed change: decide the intended behavior.

h4. 5. Leftover INFO log
DataLakeConfigurationOptionsProxy.getPosition logs "Position: ..." at INFO on 
every flushToFile.
Proposed change: lower to DEBUG or remove.


_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to