[ https://issues.apache.org/jira/browse/FLINK-17364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091726#comment-17091726 ]
Lu Niu commented on FLINK-17364: -------------------------------- Hi, [~kkl0u] . Thanks for replying! PrestoS3FileSystem expose a package access only `getS3Client` method. Therefore, I need to create a package `com.facebook.presto.hive.s3` under flink-s3-fs-presto. Here is the sample class expose public getS3Client. Let me know if any concerns. thanks! {code:java} diff --git a/flink-filesystems/flink-s3-fs-presto/src/main/java/com/facebook/presto/hive/s3/ClientAwarePrestoS3FileSystem.java b/flink-filesystems/flink-s3-fs-presto/src/main/java/com/facebook/presto/hive/s3/ClientAwarePrestoS3FileSystem.java new file mode 100644 index 0000000000..be595dd02c --- /dev/null +++ b/flink-filesystems/flink-s3-fs-presto/src/main/java/com/facebook/presto/hive/s3/ClientAwarePrestoS3FileSystem.java @@ -0,0 +1,29 @@ +package com.facebook.presto.hive.s3; + +import com.amazonaws.services.s3.AmazonS3; +import org.apache.hadoop.conf.Configuration; + +import java.io.IOException; +import java.net.URI; + +import static org.apache.flink.util.Preconditions.checkState; + + +/** + * ClientAwarePrestoS3FileSystem has access to underlying s3 client. + */ +public class ClientAwarePrestoS3FileSystem extends PrestoS3FileSystem { + + private boolean initialized; + + @Override + public void initialize(URI uri, Configuration conf) throws IOException { + super.initialize(uri, conf); + initialized = true; + } + + public AmazonS3 getClient() { + checkState(initialized); + return getS3Client(); + } +}{code} > Support StreamingFileSink in PrestoS3FileSystem > ----------------------------------------------- > > Key: FLINK-17364 > URL: https://issues.apache.org/jira/browse/FLINK-17364 > Project: Flink > Issue Type: Improvement > Components: Connectors / FileSystem > Affects Versions: 1.10.0 > Reporter: Lu Niu > Priority: Major > > For S3, currently the StreamingFileSink supports only the Hadoop-based > FileSystem implementation, not the implementation based on Presto At the same > time, presto is the recommended file system for checkpointing. implementing > StreamingFileSink in PrestoS3FileSystem helps filling the gap, enables user > to use PrestoS3FileSystem in all access to S3. -- This message was sent by Atlassian Jira (v8.3.4#803005)