aljoscha closed pull request #6855: [FLINK-10563] Expose shaded Presto S3
filesystem under "s3p" scheme
URL: https://github.com/apache/flink/pull/6855
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/ops/deployment/aws.md b/docs/ops/deployment/aws.md
index e62e6a3b063..ae43c40812b 100644
--- a/docs/ops/deployment/aws.md
+++ b/docs/ops/deployment/aws.md
@@ -105,7 +105,10 @@ To use either `flink-s3-fs-hadoop` or
`flink-s3-fs-presto`, copy the respective
cp ./opt/flink-s3-fs-presto-{{ site.version }}.jar ./lib/
{% endhighlight %}
-Both `flink-s3-fs-hadoop` and `flink-s3-fs-presto` register default FileSystem
wrappers for URIs with the `s3://` scheme, `flink-s3-fs-hadoop` also registers
for `s3a://`.
+Both `flink-s3-fs-hadoop` and `flink-s3-fs-presto` register default FileSystem
+wrappers for URIs with the `s3://` scheme, `flink-s3-fs-hadoop` also registers
+for `s3a://` and `flink-s3-fs-presto` also registers for `s3p://`, so you can
+use this to use both at the same time.
#### Configure Access Credentials
diff --git
a/flink-filesystems/flink-s3-fs-presto/src/main/java/org/apache/flink/fs/s3presto/S3PFileSystemFactory.java
b/flink-filesystems/flink-s3-fs-presto/src/main/java/org/apache/flink/fs/s3presto/S3PFileSystemFactory.java
new file mode 100644
index 00000000000..febaf6611bd
--- /dev/null
+++
b/flink-filesystems/flink-s3-fs-presto/src/main/java/org/apache/flink/fs/s3presto/S3PFileSystemFactory.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.fs.s3presto;
+
+/**
+ * Simple factory for the S3 file system, registered for the <tt>s3p://</tt>
scheme.
+ */
+public class S3PFileSystemFactory extends S3FileSystemFactory {
+ @Override
+ public String getScheme() {
+ return "s3p";
+ }
+}
diff --git
a/flink-filesystems/flink-s3-fs-presto/src/main/resources/META-INF/services/org.apache.flink.core.fs.FileSystemFactory
b/flink-filesystems/flink-s3-fs-presto/src/main/resources/META-INF/services/org.apache.flink.core.fs.FileSystemFactory
index 49744eadf36..c08b4e7bbb6 100644
---
a/flink-filesystems/flink-s3-fs-presto/src/main/resources/META-INF/services/org.apache.flink.core.fs.FileSystemFactory
+++
b/flink-filesystems/flink-s3-fs-presto/src/main/resources/META-INF/services/org.apache.flink.core.fs.FileSystemFactory
@@ -13,4 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-org.apache.flink.fs.s3presto.S3FileSystemFactory
\ No newline at end of file
+org.apache.flink.fs.s3presto.S3FileSystemFactory
+org.apache.flink.fs.s3presto.S3PFileSystemFactory
\ No newline at end of file
diff --git a/tools/travis/shade.sh b/tools/travis/shade.sh
index 428a92b812f..f27dea53de9 100644
--- a/tools/travis/shade.sh
+++ b/tools/travis/shade.sh
@@ -155,6 +155,11 @@ check_shaded_artifacts_s3_fs() {
read -r -d '' EXPECTED_FS_SERVICE_FILE_CLASSES <<EOF
org.apache.flink.fs.s3${VARIANT}.S3FileSystemFactory
org.apache.flink.fs.s3${VARIANT}.S3AFileSystemFactory
+EOF
+ elif [ "${VARIANT}" == "presto" ]; then
+ read -r -d '' EXPECTED_FS_SERVICE_FILE_CLASSES <<EOF
+org.apache.flink.fs.s3${VARIANT}.S3FileSystemFactory
+org.apache.flink.fs.s3${VARIANT}.S3PFileSystemFactory
EOF
fi
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services