[
https://issues.apache.org/jira/browse/HDFS-16571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533005#comment-17533005
]
Bryan Chen commented on HDFS-16571:
-----------------------------------
Some more findings: the `fs.create(...)` triggers one BlobCreated event, and
writing the content with the stream writer triggers another one, perhaps they
are 2 separate Restful requests and both of them are treated the same in Azure
backend? If yes, I think my question would be
* is there other file API to create a file with content with one Restful
request?
* is there parameters/headers/etc. in the restful request to make it not
treated as a BlobCreated when we are writing content into an existing file?
> ABFS: Two BlobCreated get triggered for writing one ABFS file
> -------------------------------------------------------------
>
> Key: HDFS-16571
> URL: https://issues.apache.org/jira/browse/HDFS-16571
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: fs/azure
> Affects Versions: 3.1.1
> Reporter: Bryan Chen
> Priority: Minor
>
> Using the new ABFS driver to write a file on ADLS gen storage account
> triggers 2 BlobCreated events in the Azure backend while we are expecting one.
> Here is an example code snippet for creating a file (in scala):
> {code:java}
> import java.io._
> import org.apache.hadoop.conf.Configuration
> import org.apache.hadoop.fs.{FileSystem, Path, RemoteIterator}
> val conf = new Configuration()
> val path = new
> Path("abfss://[email protected]/test.txt")
> val fs = path.getFileSystem(conf)
> val bs = new BufferedOutputStream(fs.create(path, true))
> bs.write("test".getBytes("UTF-8"))
> bs.close() {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]