Skip to content

Commit 6e560a5

Browse files
committed
HADOOP-17244 checkstyles
Change-Id: I33dd5f1198d2182dd8e214f6f46e1c9c37679be8
1 parent eac66a6 commit 6e560a5

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/MultiObjectDeleteSupport.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public static IOException translateDeleteException(
8989
final MultiObjectDeleteException deleteException) {
9090
List<MultiObjectDeleteException.DeleteError> errors
9191
= deleteException.getErrors();
92-
LOG.warn(
93-
"Bulk delete operation failed to delete all objects; failure count = {}",
92+
LOG.warn("Bulk delete operation failed to delete all objects;"
93+
+ " failure count = {}",
9494
errors.size());
9595
final StringBuilder result = new StringBuilder(
9696
errors.size() * 256);
@@ -328,7 +328,8 @@ static List<KeyPath> removeUndeletedPaths(
328328
final Collection<KeyPath> pathsBeingDeleted,
329329
final Function<String, Path> qualifier) {
330330
// get the undeleted values
331-
List<KeyPath> undeleted = extractUndeletedKeyPaths(deleteException, qualifier);
331+
List<KeyPath> undeleted = extractUndeletedKeyPaths(deleteException,
332+
qualifier);
332333
// and remove them from the undeleted list, matching on key
333334
for (KeyPath undel : undeleted) {
334335
pathsBeingDeleted.removeIf(kp -> kp.getPath().equals(undel.getPath()));
@@ -357,9 +358,12 @@ public List<Path> processDeleteFailureGenericException(Exception ex,
357358
* </p>
358359
*/
359360
public static final class KeyPath {
360-
public final String key;
361-
public final Path path;
362-
public final boolean directoryMarker;
361+
/** Key in bucket. */
362+
private final String key;
363+
/** Full path. */
364+
private final Path path;
365+
/** Is this a directory marker? */
366+
private final boolean directoryMarker;
363367

364368
public KeyPath(final String key,
365369
final Path path,
@@ -395,8 +399,12 @@ public String toString() {
395399
*/
396400
@Override
397401
public boolean equals(final Object o) {
398-
if (this == o) { return true; }
399-
if (o == null || getClass() != o.getClass()) { return false; }
402+
if (this == o) {
403+
return true;
404+
}
405+
if (o == null || getClass() != o.getClass()) {
406+
return false;
407+
}
400408
KeyPath keyPath = (KeyPath) o;
401409
return key.equals(keyPath.key);
402410
}

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/impl/ITestPartialRenamesDeletes.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,15 +665,16 @@ public void testPartialDirDelete() throws Throwable {
665665
// this set can be deleted by the role FS
666666
MetricDiff rejectionCount = new MetricDiff(roleFS, FILES_DELETE_REJECTED);
667667
MetricDiff deleteVerbCount = new MetricDiff(roleFS, OBJECT_DELETE_REQUESTS);
668-
MetricDiff deleteObjectCount = new MetricDiff(roleFS, OBJECT_DELETE_OBJECTS);
668+
MetricDiff deleteObjectCount = new MetricDiff(roleFS,
669+
OBJECT_DELETE_OBJECTS);
669670

670671
describe("Trying to delete read only directory");
671672
AccessDeniedException ex = expectDeleteForbidden(readOnlyDir);
672673
if (multiDelete) {
673674
// multi-delete status checks
674675
extractCause(MultiObjectDeleteException.class, ex);
675676
deleteVerbCount.assertDiffEquals("Wrong delete request count", 1);
676-
deleteObjectCount.assertDiffEquals("Wrong count of objects in delete request",
677+
deleteObjectCount.assertDiffEquals("Number of keys in delete request",
677678
readOnlyFiles.size());
678679
rejectionCount.assertDiffEquals("Wrong rejection count",
679680
readOnlyFiles.size());

0 commit comments

Comments
 (0)