sundapeng commented on code in PR #8832:
URL: https://github.com/apache/paimon/pull/8832#discussion_r3655722153
##########
paimon-filesystems/paimon-jindo/src/main/java/org/apache/paimon/jindo/JindoFileIO.java:
##########
@@ -198,6 +211,39 @@ public TwoPhaseOutputStream newTwoPhaseOutputStream(Path
path, boolean overwrite
new JindoMultiPartUpload(fs, hadoopPath), hadoopPath, path);
}
+ @Override
+ public String createBlobPresignedUrl(
+ Path tableRoot, BlobDescriptor descriptor, Duration validity)
throws IOException {
+ return OSSBlobPresigner.create(blobClient(), tableRoot, descriptor,
validity);
+ }
+
+ private synchronized OSSClient blobClient() {
+ if (blobClient == null) {
+ blobClient = createBlobClient(hadoopOptions);
+ }
+ return blobClient;
+ }
+
+ static OSSClient createBlobClient(Options options) {
+ String endpoint = options.get(OSS_ENDPOINT);
+ if (!endpoint.contains("://")) {
+ endpoint = "https://" + endpoint;
+ }
+ String securityToken = options.get(OSS_SECURITY_TOKEN);
+ OSSClientBuilder builder = new OSSClientBuilder();
Review Comment:
better to add `region` config to OssClientBuilder, fs key is `fs.oss.region`
--
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]