Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a0164df
Ingress changes with fallback
anmolanmol1234 Dec 31, 2024
8effcb0
spotbugs and checkstyle fixes
anmolanmol1234 Jan 6, 2025
03d51bf
spotbugs
anmolanmol1234 Jan 7, 2025
38c412f
revert param changes
anmolanmol1234 Jan 7, 2025
d487e74
revert SAS changes
anmolanmol1234 Jan 7, 2025
ffc22e6
javadoc fix
anmolanmol1234 Jan 7, 2025
2d60502
review comments
anmolanmol1234 Jan 10, 2025
3b3005d
changes for spotbugs and checkstyle
anmolanmol1234 Jan 10, 2025
e0a228a
inconsistent sync
anmolanmol1234 Jan 10, 2025
b9f2f7b
uncomment code
anmolanmol1234 Jan 13, 2025
0d2c693
Fixed SAS support for FNS Blob
anmolanmol1234 Jan 15, 2025
1df66bb
PR review comments
anmolanmol1234 Jan 16, 2025
51ebb13
Fix tests
anmolanmol1234 Jan 17, 2025
dabcb1e
unused code
anmolanmol1234 Jan 17, 2025
30cd74c
Checkstyle fix
anmolanmol1234 Jan 24, 2025
28003f7
Checkstyle fixes
anmolanmol1234 Jan 24, 2025
ff6ba64
remove unused imports
anmolanmol1234 Jan 24, 2025
c1d8338
remove unused import
anmolanmol1234 Jan 24, 2025
8f1b4b7
Review comments
anmolanmol1234 Jan 27, 2025
043cb31
uncomment
anmolanmol1234 Jan 27, 2025
0a3d699
Create flow optimization
anmolanmol1234 Jan 30, 2025
8b4ea3a
Create optimization
anmolanmol1234 Jan 30, 2025
f19a6bb
unused imports
anmolanmol1234 Jan 30, 2025
3d156da
unused imports
anmolanmol1234 Jan 30, 2025
0a544a3
checkstyle and spotbug fixes
anmolanmol1234 Jan 31, 2025
9aed0bd
fix failing test
anmolanmol1234 Jan 31, 2025
af58056
rebase with trunk
anmolanmol1234 Feb 4, 2025
5615f1e
changes
anmolanmol1234 Feb 4, 2025
59802b8
fixes
anmolanmol1234 Feb 4, 2025
0c8b4bd
rebase with trunk
anmolanmol1234 Feb 4, 2025
89bf41b
fix failing tests
anmolanmol1234 Feb 4, 2025
3d8f43b
fix tests
anmolanmol1234 Feb 4, 2025
8dfd79d
fix tests
anmolanmol1234 Feb 4, 2025
5d74b17
remove unused file
anmolanmol1234 Feb 4, 2025
a590c6a
Add condition for overwrite
anmolanmol1234 Feb 4, 2025
1ed2124
refactor
anmolanmol1234 Feb 4, 2025
5b32216
fix overwrite case
anmolanmol1234 Feb 4, 2025
fc06ec5
fix test
anmolanmol1234 Feb 4, 2025
36b7e10
fix test
anmolanmol1234 Feb 5, 2025
e558bba
Merge branch 'apache:trunk' into HADOOP-19232_create_optimization
anmolanmol1234 Feb 5, 2025
e3931d3
Merge branch 'HADOOP-19232_create_optimization' of https://github.com…
anmolanmol1234 Feb 5, 2025
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
99 changes: 0 additions & 99 deletions hadoop-tools/hadoop-azure/dev-support/findbugs-exclude.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import org.apache.hadoop.fs.azurebfs.constants.HttpHeaderConfigurations;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AzureBlobFileSystemException;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.ConcurrentWriteOperationDetectedException;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.FileSystemOperationUnhandledException;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidAbfsRestOperationException;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidFileSystemPropertyException;
Expand Down Expand Up @@ -762,53 +761,8 @@ private AbfsRestOperation conditionalCreateOverwriteFile(final String relativePa
final TracingContext tracingContext) throws IOException {
AbfsRestOperation op;
AbfsClient createClient = getClientHandler().getIngressClient();
try {
// Trigger a create with overwrite=false first so that eTag fetch can be
// avoided for cases when no pre-existing file is present (major portion
// of create file traffic falls into the case of no pre-existing file).
op = createClient.createPath(relativePath, true, false, permissions,
isAppendBlob, null, contextEncryptionAdapter, tracingContext);

} catch (AbfsRestOperationException e) {
if (e.getStatusCode() == HttpURLConnection.HTTP_CONFLICT) {
// File pre-exists, fetch eTag
try {
op = getClient().getPathStatus(relativePath, false, tracingContext, null);
} catch (AbfsRestOperationException ex) {
if (ex.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) {
// Is a parallel access case, as file which was found to be
// present went missing by this request.
throw new ConcurrentWriteOperationDetectedException(
"Parallel access to the create path detected. Failing request "
+ "to honor single writer semantics");
} else {
throw ex;
}
}

String eTag = extractEtagHeader(op.getResult());

try {
// overwrite only if eTag matches with the file properties fetched befpre
op = createClient.createPath(relativePath, true, true, permissions,
isAppendBlob, eTag, contextEncryptionAdapter, tracingContext);
} catch (AbfsRestOperationException ex) {
if (ex.getStatusCode() == HttpURLConnection.HTTP_PRECON_FAILED) {
// Is a parallel access case, as file with eTag was just queried
// and precondition failure can happen only when another file with
// different etag got created.
throw new ConcurrentWriteOperationDetectedException(
"Parallel access to the create path detected. Failing request "
+ "to honor single writer semantics");
} else {
throw ex;
}
}
} else {
throw e;
}
}

op = createClient.conditionalCreateOverwriteFile(relativePath, statistics,
permissions, isAppendBlob, contextEncryptionAdapter, tracingContext);
return op;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
public class ConcurrentWriteOperationDetectedException
extends AzureBlobFileSystemException {

public ConcurrentWriteOperationDetectedException(String message) {
super(message);
private static final String ERROR_MESSAGE = "Parallel access to the create path detected. Failing request "
+ "to honor single writer semantics";

public ConcurrentWriteOperationDetectedException() {
super(ERROR_MESSAGE);
}
}
Loading