steveloughran commented on a change in pull request #1661: HADOOP-16484. S3A to
warn or fail if S3Guard is disabled
URL: https://github.com/apache/hadoop/pull/1661#discussion_r337621418
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/S3Guard.java
##########
@@ -816,4 +816,44 @@ public static boolean allowAuthoritative(Path p,
S3AFileSystem fs,
}
return false;
}
+
+ public static final String DISABLED_LOG_MSG =
+ "S3Guard is disabled on this bucket: {}";
+
+ public static final String UNKNOWN_WARN_LEVEL =
+ "Unknown S3Guard disabled warn level: ";
+
+ public enum DisabledWarnLevel {
+ SILENT,
+ INFORM,
+ WARN,
+ FAIL
+ }
+
+ public static void logS3GuardDisabled(Logger logger, String warnLevelStr,
+ String bucket)
+ throws UnsupportedOperationException, IllegalArgumentException {
+ final DisabledWarnLevel warnLevel;
+ try {
+ warnLevel = DisabledWarnLevel.valueOf(warnLevelStr);
Review comment:
.trim().toUpperCase(Locale.EN_US)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]