From c653c58637b12819e1536cbeb27746b164bfb3dd Mon Sep 17 00:00:00 2001 From: ahmarsuhail Date: Wed, 27 Jul 2022 17:19:57 +0100 Subject: [PATCH] HADOOP-18372. ILoadTestS3ABulkDeleteThrottling failing. (#4642) Contributed by Ahmar Suhail --- .../ILoadTestS3ABulkDeleteThrottling.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java index f4af12b6eb..2738dd9284 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java @@ -45,6 +45,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.contract.ContractTestUtils; +import org.apache.hadoop.fs.store.audit.AuditSpan; import org.apache.hadoop.fs.s3a.S3AFileSystem; import org.apache.hadoop.fs.s3a.S3ATestUtils; import org.apache.hadoop.fs.s3a.auth.delegation.Csvout; @@ -144,6 +145,18 @@ public ILoadTestS3ABulkDeleteThrottling( @Override protected Configuration createScaleConfiguration() { Configuration conf = super.createScaleConfiguration(); + + S3ATestUtils.removeBaseAndBucketOverrides(conf, + EXPERIMENTAL_AWS_INTERNAL_THROTTLING, + BULK_DELETE_PAGE_SIZE, + USER_AGENT_PREFIX, + ENABLE_MULTI_DELETE); + conf.setBoolean(EXPERIMENTAL_AWS_INTERNAL_THROTTLING, throttle); + conf.setInt(BULK_DELETE_PAGE_SIZE, pageSize); + conf.set(USER_AGENT_PREFIX, + String.format("ILoadTestS3ABulkDeleteThrottling-%s-%04d", + throttle, pageSize)); + S3ATestUtils.disableFilesystemCaching(conf); return conf; } @@ -151,19 +164,6 @@ protected Configuration createScaleConfiguration() { @Override public void setup() throws Exception { final Configuration conf = getConf(); - S3ATestUtils.removeBaseAndBucketOverrides(conf, - EXPERIMENTAL_AWS_INTERNAL_THROTTLING, - BULK_DELETE_PAGE_SIZE, - USER_AGENT_PREFIX); - conf.setBoolean(EXPERIMENTAL_AWS_INTERNAL_THROTTLING, throttle); - Assertions.assertThat(pageSize) - .describedAs("page size") - .isGreaterThan(0); - conf.setInt(BULK_DELETE_PAGE_SIZE, pageSize); - conf.set(USER_AGENT_PREFIX, - String.format("ILoadTestS3ABulkDeleteThrottling-%s-%04d", - throttle, pageSize)); - super.setup(); Assume.assumeTrue("multipart delete disabled", conf.getBoolean(ENABLE_MULTI_DELETE, true)); @@ -246,7 +246,7 @@ private File deleteFiles(final int requestCount, final ContractTestUtils.NanoTimer timer = new ContractTestUtils.NanoTimer(); Exception ex = null; - try { + try (AuditSpan span = span()) { fs.removeKeys(fileList, false); } catch (IOException e) { ex = e;