You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/08/01 10:15:53 UTC
[flink] 01/02: FLINK-13044 - Fix for wrong shading of AWS SDK in
flink-s3-fs-hadoop
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch s3_test
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 8e2624662bc7d0d4585035339dd0dd92bc9718aa
Author: Sebastian Just <Se...@comcast.com>
AuthorDate: Mon Jul 1 09:07:27 2019 -0400
FLINK-13044 - Fix for wrong shading of AWS SDK in flink-s3-fs-hadoop
Due to the bug MSHADE-156 in Maven's shading plugin [1] the merging
of the AWS SDK also causes string literals to be changed in Flink
classes.
This commit follows the workaround shown in [1] to workaround the
shading issue.
Also fixing the wrong package name in the Flink code for the
shaded AWS SDK classes.
[1] https://issues.apache.org/jira/browse/MSHADE-156
---
flink-filesystems/flink-s3-fs-hadoop/pom.xml | 4 ++++
.../main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/flink-filesystems/flink-s3-fs-hadoop/pom.xml b/flink-filesystems/flink-s3-fs-hadoop/pom.xml
index b828858..5c558d0 100644
--- a/flink-filesystems/flink-s3-fs-hadoop/pom.xml
+++ b/flink-filesystems/flink-s3-fs-hadoop/pom.xml
@@ -111,6 +111,10 @@ under the License.
<pattern>org.apache.flink.runtime.util</pattern>
<shadedPattern>org.apache.flink.fs.s3hadoop.common</shadedPattern>
</relocation>
+ <relocation>
+ <pattern>com.UNSHADE.amazon</pattern>
+ <shadedPattern>com.amazon</shadedPattern>
+ </relocation>
</relocations>
<filters>
<filter>
diff --git a/flink-filesystems/flink-s3-fs-hadoop/src/main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java b/flink-filesystems/flink-s3-fs-hadoop/src/main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java
index 6cad051..c3e8219 100644
--- a/flink-filesystems/flink-s3-fs-hadoop/src/main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java
+++ b/flink-filesystems/flink-s3-fs-hadoop/src/main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java
@@ -41,11 +41,11 @@ public class S3FileSystemFactory extends AbstractS3FileSystemFactory {
private static final Logger LOG = LoggerFactory.getLogger(S3FileSystemFactory.class);
- private static final Set<String> PACKAGE_PREFIXES_TO_SHADE = Collections.singleton("com.amazonaws.");
+ private static final Set<String> PACKAGE_PREFIXES_TO_SHADE = Collections.singleton("com.UNSHADE.amazonaws.");
private static final Set<String> CONFIG_KEYS_TO_SHADE = Collections.singleton("fs.s3a.aws.credentials.provider");
- private static final String FLINK_SHADING_PREFIX = "org.apache.flink.fs.s3hadoop.shaded.";
+ private static final String FLINK_SHADING_PREFIX = "org.apache.flink.fs.s3base.shaded.";
private static final String[] FLINK_CONFIG_PREFIXES = { "s3.", "s3a.", "fs.s3a." };