HADOOP-18679. Followup: change method name case (#6854)
WrappedIO.bulkDelete_PageSize() => bulkDelete_pageSize() Makes it consistent with the HADOOP-19131 naming scheme. The name needs to be fixed before invoking it through reflection, as once that is attempted the binding won't work at run time, though compilation will be happy. Contributed by Steve Loughran
This commit is contained in:
parent
d107931fc7
commit
d00b3acd5e
@ -54,7 +54,7 @@ private WrappedIO() {
|
|||||||
* @throws IllegalArgumentException path not valid.
|
* @throws IllegalArgumentException path not valid.
|
||||||
* @throws IOException problems resolving paths
|
* @throws IOException problems resolving paths
|
||||||
*/
|
*/
|
||||||
public static int bulkDelete_PageSize(FileSystem fs, Path path) throws IOException {
|
public static int bulkDelete_pageSize(FileSystem fs, Path path) throws IOException {
|
||||||
try (BulkDelete bulk = fs.createBulkDelete(path)) {
|
try (BulkDelete bulk = fs.createBulkDelete(path)) {
|
||||||
return bulk.pageSize();
|
return bulk.pageSize();
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public abstract class AbstractContractBulkDeleteTest extends AbstractFSContractT
|
|||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
fs = getFileSystem();
|
fs = getFileSystem();
|
||||||
basePath = path(getClass().getName());
|
basePath = path(getClass().getName());
|
||||||
pageSize = WrappedIO.bulkDelete_PageSize(getFileSystem(), basePath);
|
pageSize = WrappedIO.bulkDelete_pageSize(getFileSystem(), basePath);
|
||||||
fs.mkdirs(basePath);
|
fs.mkdirs(basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,7 +735,7 @@ private void executeBulkDeleteOnReadOnlyFiles(Configuration assumedRoleConfig) t
|
|||||||
|
|
||||||
bindReadOnlyRolePolicy(assumedRoleConfig, readOnlyDir);
|
bindReadOnlyRolePolicy(assumedRoleConfig, readOnlyDir);
|
||||||
roleFS = (S3AFileSystem) destDir.getFileSystem(assumedRoleConfig);
|
roleFS = (S3AFileSystem) destDir.getFileSystem(assumedRoleConfig);
|
||||||
int bulkDeletePageSize = WrappedIO.bulkDelete_PageSize(roleFS, destDir);
|
int bulkDeletePageSize = WrappedIO.bulkDelete_pageSize(roleFS, destDir);
|
||||||
int range = bulkDeletePageSize == 1 ? bulkDeletePageSize : 10;
|
int range = bulkDeletePageSize == 1 ? bulkDeletePageSize : 10;
|
||||||
touchFiles(fs, readOnlyDir, range);
|
touchFiles(fs, readOnlyDir, range);
|
||||||
touchFiles(roleFS, destDir, range);
|
touchFiles(roleFS, destDir, range);
|
||||||
@ -769,7 +769,7 @@ private void executeBulkDeleteOnSomeReadOnlyFiles(Configuration assumedRoleConfi
|
|||||||
bindReadOnlyRolePolicy(assumedRoleConfig, readOnlyDir);
|
bindReadOnlyRolePolicy(assumedRoleConfig, readOnlyDir);
|
||||||
roleFS = (S3AFileSystem) destDir.getFileSystem(assumedRoleConfig);
|
roleFS = (S3AFileSystem) destDir.getFileSystem(assumedRoleConfig);
|
||||||
S3AFileSystem fs = getFileSystem();
|
S3AFileSystem fs = getFileSystem();
|
||||||
if (WrappedIO.bulkDelete_PageSize(fs, destDir) == 1) {
|
if (WrappedIO.bulkDelete_pageSize(fs, destDir) == 1) {
|
||||||
String msg = "Skipping as this test requires more than one path to be deleted in bulk";
|
String msg = "Skipping as this test requires more than one path to be deleted in bulk";
|
||||||
LOG.debug(msg);
|
LOG.debug(msg);
|
||||||
skip(msg);
|
skip(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user