HADOOP-16484. S3A to warn or fail if S3Guard is disabled - addendum: silent for S3GuardTool (#1714). Contributed by Gabor Bota.

Change-Id: I63b928ef5da425ef982dd4100a426fc23f64bac1
This commit is contained in:
Gabor Bota 2019-11-18 13:56:37 +01:00 committed by GitHub
parent 12617fad2e
commit cad540819f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,6 +138,11 @@ public abstract class S3GuardTool extends Configured implements Tool {
protected S3GuardTool(Configuration conf, String...opts) { protected S3GuardTool(Configuration conf, String...opts) {
super(conf); super(conf);
// Set s3guard is off warn level to silent, as the fs is often instantiated
// without s3guard on purpose.
conf.set(S3GUARD_DISABLED_WARN_LEVEL,
S3Guard.DisabledWarnLevel.SILENT.toString());
commandFormat = new CommandFormat(0, Integer.MAX_VALUE, opts); commandFormat = new CommandFormat(0, Integer.MAX_VALUE, opts);
// For metadata store URI // For metadata store URI
commandFormat.addOptionWithValue(META_FLAG); commandFormat.addOptionWithValue(META_FLAG);