ctrlaltdilj commented on code in PR #27026:
URL: https://github.com/apache/flink/pull/27026#discussion_r3214555897
##########
flink-filesystems/flink-s3-fs-base/pom.xml:
##########
@@ -32,6 +32,7 @@ under the License.
<properties>
<fs.s3.aws.version>1.12.779</fs.s3.aws.version>
+ <fs.s3.aws.sdk2.version>2.29.52</fs.s3.aws.sdk2.version>
Review Comment:
added comment and reference
##########
flink-filesystems/flink-s3-fs-presto/pom.xml:
##########
@@ -562,6 +562,12 @@ under the License.
<exclude>mime.types</exclude>
<exclude>mozilla/**</exclude>
<exclude>META-INF/LICENSE.txt</exclude>
+
<!-- Exclude GPL-licensed content from Hadoop transitive dependencies -->
+
<exclude>com/sun/jersey/**</exclude>
+
<exclude>com/sun/xml/bind/**</exclude>
+
<exclude>THIRD-PARTY-NOTICES</exclude>
+
<exclude>LICENSE</exclude>
+
<exclude>NOTICE</exclude>
Review Comment:
don't need to remove these, correcting
##########
flink-filesystems/flink-s3-fs-presto/pom.xml:
##########
@@ -562,6 +562,12 @@ under the License.
<exclude>mime.types</exclude>
<exclude>mozilla/**</exclude>
<exclude>META-INF/LICENSE.txt</exclude>
+
<!-- Exclude GPL-licensed content from Hadoop transitive dependencies -->
Review Comment:
yes we should exclude it, let me do that
##########
flink-filesystems/flink-s3-fs-hadoop/src/test/java/org/apache/flink/fs/s3hadoop/S3ValidationApp.java:
##########
@@ -0,0 +1,149 @@
+/*
+ * 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.s3hadoop;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FSDataInputStream;
+import org.apache.flink.core.fs.FSDataOutputStream;
+import org.apache.flink.core.fs.FileStatus;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.fs.FileSystem.WriteMode;
+import org.apache.flink.core.fs.Path;
+
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.UUID;
+
+/**
+ * A standalone application to validate S3 filesystem integration with AWS SDK
v2.
+ *
+ * <p>Usage: S3ValidationApp bucket accessKey secretKey
+ *
+ * <p>This application performs basic S3 operations (write, read, list,
delete) to verify the Hadoop
+ * S3 filesystem is working correctly.
+ */
+public class S3ValidationApp {
Review Comment:
removing this file, the existing IT tests cover these scenarios
##########
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/token/DynamicTemporaryAWSCredentialsProvider.java:
##########
@@ -37,9 +38,13 @@
* reference this class name from configuration property
fs.s3a.aws.credentials.provider. Therefore,
* changing the class name would be a backward-incompatible change. This
credential provider must
* not fail in creation because that will break a chain of credential
providers.
+ *
+ * <p>This class implements both AWS SDK V1 {@link AWSCredentialsProvider}
(for Presto) and AWS SDK
+ * V2 {@link AwsCredentialsProvider} (for Hadoop 3.4.0+) interfaces to support
both filesystems.
Review Comment:
The presto AWS SDK v2 upgrade is being tracked here
https://github.com/prestodb/presto/issues/25529
##########
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/token/DynamicTemporaryAWSCredentialsProvider.java:
##########
@@ -37,9 +38,13 @@
* reference this class name from configuration property
fs.s3a.aws.credentials.provider. Therefore,
* changing the class name would be a backward-incompatible change. This
credential provider must
* not fail in creation because that will break a chain of credential
providers.
+ *
+ * <p>This class implements both AWS SDK V1 {@link AWSCredentialsProvider}
(for Presto) and AWS SDK
+ * V2 {@link AwsCredentialsProvider} (for Hadoop 3.4.0+) interfaces to support
both filesystems.
Review Comment:
fortunately, AWS SDK V1 and AWS SDK V2 have different package names and can
coexist
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration-side-by-side.html
##########
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/token/DynamicTemporaryAWSCredentialsProvider.java:
##########
@@ -37,9 +38,13 @@
* reference this class name from configuration property
fs.s3a.aws.credentials.provider. Therefore,
* changing the class name would be a backward-incompatible change. This
credential provider must
* not fail in creation because that will break a chain of credential
providers.
+ *
+ * <p>This class implements both AWS SDK V1 {@link AWSCredentialsProvider}
(for Presto) and AWS SDK
+ * V2 {@link AwsCredentialsProvider} (for Hadoop 3.4.0+) interfaces to support
both filesystems.
Review Comment:
So presto is still dependent on AWS SDK v1 and the new hadoop version is on
AWS SDK V2, which is why both would be needed atm
--
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]