Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-16729 out of band deletes #952

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
HADOOP-16279 address checkstyle
Change-Id: Ic0a0710d2092c2e60eabbb7bc140fac3a1545297
  • Loading branch information
steveloughran committed Jun 12, 2019
commit af11011a277909b6c7bb35beac17cdb1b2796193
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ private void createAndAwaitFs(S3AFileSystem fs, Path testFilePath,
assertNotNull("Newly created file status should not be null.", newStatus);
}

private void deleteGuardedTombstoned(S3AFileSystem guardedFs,
private void deleteGuardedTombstoned(S3AFileSystem guarded,
Path testFilePath, AtomicLong now) throws Exception {
guardedFs.delete(testFilePath, true);
guarded.delete(testFilePath, true);

final PathMetadata metadata =
guardedFs.getMetadataStore().get(testFilePath);
guarded.getMetadataStore().get(testFilePath);
assertNotNull("Created file metadata should not be null in ms",
metadata);
assertEquals("Created file metadata last_updated should equal with "
Expand All @@ -375,7 +375,7 @@ private void deleteGuardedTombstoned(S3AFileSystem guardedFs,
intercept(FileNotFoundException.class, testFilePath.toString(),
"This file should throw FNFE when reading through "
+ "the guarded fs, and the metadatastore tombstoned the file.",
() -> guardedFs.getFileStatus(testFilePath));
() -> guarded.getFileStatus(testFilePath));
}

/**
Expand Down Expand Up @@ -563,10 +563,9 @@ private void checkListingContainsPath(S3AFileSystem fs, Path filePath)
}

final FileStatus[] fileStatuses = fs.listStatus(filePath.getParent());
for (FileStatus fileStatus : fileStatuses) {
assertEquals("The file should be listed in fs.listStatus",
filePath, fileStatus.getPath());
}
for (FileStatus fileStatus : fileStatuses)
assertEquals("The file should be listed in fs.listStatus",
filePath, fileStatus.getPath());
}

/**
Expand Down Expand Up @@ -786,7 +785,8 @@ private void verifyFileStatusAsExpected(final String firstText,
}
// check etag. This relies on first and second text being different.
final S3AFileStatus rawS3AFileStatus = (S3AFileStatus) rawFileStatus;
final S3AFileStatus guardedS3AFileStatus = (S3AFileStatus) guardedFileStatus;
final S3AFileStatus guardedS3AFileStatus = (S3AFileStatus)
guardedFileStatus;
final S3AFileStatus origS3AFileStatus = (S3AFileStatus) origStatus;
assertNotEquals(
"raw status still no to date with changes" + stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,8 @@ public void tearDown() throws Exception {

@Override protected String getPathStringForPrune(String path)
throws Exception {
String bucket =
getTestBucketName(getContract().getFileSystem().getConf());
return "/" + bucket + "/dir2";
String b = getTestBucketName(getContract().getFileSystem().getConf());
return "/" + b + "/dir2";
}

/**
Expand Down