You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/02/02 18:17:07 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #2654: HADOOP-17497. refactoring the signature of S3ClientFactory breaks hboss compile.

steveloughran commented on a change in pull request #2654:
URL: https://github.com/apache/hadoop/pull/2654#discussion_r568826347



##########
File path: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3ClientFactory.java
##########
@@ -46,10 +49,32 @@
    * @return S3 client
    * @throws IOException IO problem
    */
-  AmazonS3 createS3Client(URI name,
+  default AmazonS3 createS3Client(URI name,
       String bucket,
       AWSCredentialsProvider credentialSet,
       String userAgentSuffix,
-      StatisticsFromAwsSdk statisticsFromAwsSdk) throws IOException;
+      StatisticsFromAwsSdk statisticsFromAwsSdk) throws IOException {
+    return createS3Client(name, bucket, credentialSet, userAgentSuffix);
+  }
+
+  /**
+   * Creates a new {@link AmazonS3} client.
+   * Obsolete and never directly called in the s3 code.
+   * It exists to keep HBoss builds compiling: they do implement it
+   * and want to build/run across Hadoop versions.
+   * @param name raw input S3A file system URI
+   * @param bucket Optional bucket to use to look up per-bucket proxy secrets
+   * @param credentialSet credentials to use
+   * @param userAgentSuffix optional suffix for the UA field.
+   * @return S3 client
+   * @throws IOException IO problem
+   * @deprecated this is only here to stop hboss builds breaking.
+   */
+  default AmazonS3 createS3Client(URI name,
+      String bucket,
+      AWSCredentialsProvider credentialSet,
+      String userAgentSuffix) throws IOException {
+    throw new UnsupportedOperationException("Not implemented");

Review comment:
       no, we do tricks with handoff. the HBoss code should get its own class invoked because it subclasses this one; it's the new method (with stats coming) in which isn't called.
   
   And for S3A itself, because our clients do implement the method -this one never gets invoked




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org