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 "steveloughran (via GitHub)" <gi...@apache.org> on 2023/04/14 12:40:54 UTC

[GitHub] [hadoop] steveloughran commented on a diff in pull request #5548: HADOOP-18695. S3A: reject multipart copy requests when disabled

steveloughran commented on code in PR #5548:
URL: https://github.com/apache/hadoop/pull/5548#discussion_r1166788483


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java:
##########
@@ -2590,6 +2591,25 @@ protected DurationTrackerFactory getDurationTrackerFactory() {
         : null;
   }
 
+  /**
+   * Given a possibly null duration tracker factory, return a non-null
+   * one for use in tracking durations.
+   *
+   * @param factory factory.
+   * @return a non-null factory.
+   */
+  protected DurationTrackerFactory nonNullDurationTrackerFactory(
+      DurationTrackerFactory factory) {
+    DurationTrackerFactory f = factory;
+    if (f == null) {
+      f = getDurationTrackerFactory();
+      if (f == null) {
+        f = emptyStatisticsStore();
+      }
+    }
+    return f;
+  }

Review Comment:
   oh,because I'd missed that :) will fix.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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