Skip to content

Commit ade768e

Browse files
steveloughranjiajunmao
authored andcommitted
HADOOP-18969. S3A: AbstractS3ACostTest to clear bucket fs.s3a.create.performance (apache#6264)
Add the option to the removeBaseAndBucketOverrides() list
1 parent ce004d2 commit ade768e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/performance/AbstractS3ACostTest.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public Configuration createConfiguration() {
107107

108108
removeBaseAndBucketOverrides(bucketName, conf,
109109
DIRECTORY_MARKER_POLICY,
110-
AUTHORITATIVE_PATH);
110+
AUTHORITATIVE_PATH,
111+
FS_S3A_CREATE_PERFORMANCE);
111112
// directory marker options
112113
conf.set(DIRECTORY_MARKER_POLICY,
113114
keepMarkers
@@ -235,6 +236,21 @@ protected Path file(Path path, final boolean overwrite)
235236
return path;
236237
}
237238

239+
/**
240+
* Create a file with a specific body, returning its path.
241+
* @param path path to file.
242+
* @param overwrite overwrite flag
243+
* @param body body of file
244+
* @return path of new file
245+
*/
246+
protected Path file(Path path, final boolean overwrite, byte[] body)
247+
throws IOException {
248+
ContractTestUtils.createFile(getFileSystem(), path, overwrite, body);
249+
return path;
250+
}
251+
252+
253+
238254
/**
239255
* Touch a file, overwriting.
240256
* @param path path

0 commit comments

Comments
 (0)