Skip to content

Commit 20ae751

Browse files
committed
Review changes
1 parent df4e3f6 commit 20ae751

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsDfsClient.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,11 +1560,9 @@ private AbfsClientRenameResult renameWithCTIdRecovery(String source,
15601560
try {
15611561
incrementAbfsRenamePath();
15621562
op.execute(tracingContext);
1563-
// AbfsClientResult contains the AbfsOperation, If recovery happened or
1564-
// not, and the incompleteMetaDataState is true or false.
1565-
// If we successfully rename a path and isMetadataIncompleteState was
1566-
// true, then rename was recovered, else it didn't, this is why
1567-
// isMetadataIncompleteState is used for renameRecovery(as the 2nd param).
1563+
// If we successfully rename a path and isMetadataIncompleteState is true,
1564+
// then the rename was recovered; otherwise, it wasn’t.
1565+
// This is why isMetadataIncompleteState is used for renameRecovery (as the second parameter).
15681566
return new AbfsClientRenameResult(op, isMetadataIncompleteState,
15691567
isMetadataIncompleteState);
15701568
} catch (AzureBlobFileSystemException e) {
@@ -1652,11 +1650,9 @@ private AbfsClientRenameResult renameWithETagRecovery(String source,
16521650
try {
16531651
incrementAbfsRenamePath();
16541652
op.execute(tracingContext);
1655-
// AbfsClientResult contains the AbfsOperation, If recovery happened or
1656-
// not, and the incompleteMetaDataState is true or false.
1657-
// If we successfully rename a path and isMetadataIncompleteState was
1658-
// true, then rename was recovered, else it didn't, this is why
1659-
// isMetadataIncompleteState is used for renameRecovery(as the 2nd param).
1653+
// If we successfully rename a path and isMetadataIncompleteState is true,
1654+
// then the rename was recovered; otherwise, it wasn’t.
1655+
// This is why isMetadataIncompleteState is used for renameRecovery (as the second parameter).
16601656
return new AbfsClientRenameResult(op, isMetadataIncompleteState,
16611657
isMetadataIncompleteState);
16621658
} catch (AzureBlobFileSystemException e) {
@@ -1741,7 +1737,7 @@ private boolean recoveryUsingCTId(String destination,
17411737
return clientTransactionId.equals(
17421738
abfsHttpOperation.getResponseHeader(X_MS_CLIENT_TRANSACTION_ID));
17431739
} catch (AzureBlobFileSystemException exception) {
1744-
throw new AbfsDriverException(ERR_RENAME_RECOVERY, exception);
1740+
throw new AbfsDriverException(ERR_RENAME_RECOVERY + destination, exception);
17451741
}
17461742
}
17471743

@@ -1781,7 +1777,7 @@ private boolean recoveryUsingEtag(String source, String destination,
17811777
* @param op The ABFS operation result for the rename attempt.
17821778
* @param isMetadataIncompleteState Flag indicating if metadata is incomplete.
17831779
* @throws IOException If an I/O error occurs during the rename operation.
1784-
* @throws FileAlreadyExistsException If the destination file already exists and overwrite is unauthorized.
1780+
* @throws FileAlreadyExistsException If the destination file already exists.
17851781
*/
17861782
private void handleRenameException(final String source,
17871783
final String destination, final String continuation,

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsErrors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public final class AbfsErrors {
7272
public static final String ERR_CREATE_RECOVERY =
7373
"Error while recovering from create failure.";
7474
public static final String ERR_RENAME_RECOVERY =
75-
"Error while recovering from rename failure.";
75+
"Error while recovering from rename failure for path: ";
7676
public static final String INCORRECT_INGRESS_TYPE = "Ingress Type Cannot be DFS for Blob endpoint configured filesystem.";
7777
private AbfsErrors() {}
7878
}

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsRenameRetryRecovery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public void testRenameRecoveryEtagMatchFsLevel() throws IOException {
286286
// +2 for getPathStatus calls
287287
int totalConnections = 4;
288288
if (!getConfiguration().getIsClientTransactionIdEnabled()) {
289-
// 1 additional call for transaction id
289+
// 1 additional getPathStatus call to get dest etag
290290
totalConnections++;
291291
}
292292
assertThatStatisticCounter(ioStats,

0 commit comments

Comments
 (0)