MaxLinyun commented on code in PR #8228:
URL: https://github.com/apache/paimon/pull/8228#discussion_r3425322047
##########
paimon-filesystems/paimon-oss-impl/src/main/java/org/apache/paimon/oss/OSSFileIO.java:
##########
@@ -180,6 +184,34 @@ protected AliyunOSSFileSystem
createFileSystem(org.apache.hadoop.fs.Path path) {
}
}
+ @Override
+ public boolean tryToWriteAtomic(Path path, String content) throws
IOException {
+ URI uri = path.toUri();
+ String bucket = uri.getHost();
+ String objectKey = uri.getPath().substring(1);
+ byte[] bytes = content.getBytes(StandardCharsets.UTF_8);
+
+ ObjectMetadata metadata = new ObjectMetadata();
+ metadata.setContentLength(bytes.length);
+ metadata.setHeader("x-oss-forbid-overwrite", "true");
Review Comment:
@JingsongLi Thanks for taking the time to review this PR. I've made
modifications following your review suggestions, could you please take another
look when you have time?
--
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]