-
Notifications
You must be signed in to change notification settings - Fork 0
Unify fallback dependent api #69
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
Changes from all commits
ce92ee4
f03da1e
efc7b69
e216b92
f0a0d8d
cd0b502
91d3b12
6db6bf3
d6cce65
6c8d08e
5ebd42c
768b75a
56c6914
8766c54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ | |
| import org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidConfigurationValueException; | ||
| import org.apache.hadoop.fs.azurebfs.services.BlobProperty; | ||
| import org.apache.hadoop.classification.VisibleForTesting; | ||
| import org.apache.hadoop.fs.azurebfs.services.OperativeEndpoint; | ||
| import org.apache.hadoop.fs.azurebfs.services.PathInformation; | ||
| import org.apache.hadoop.fs.azurebfs.services.PrefixMode; | ||
| import org.apache.hadoop.fs.azurebfs.services.RenameAtomicityUtils; | ||
|
|
@@ -1002,25 +1003,23 @@ private FileStatus getFileStatus(final Path path, | |
| statIncrement(CALL_GET_FILE_STATUS); | ||
| Path qualifiedPath = makeQualified(path); | ||
| FileStatus fileStatus; | ||
| PrefixMode prefixMode = getAbfsStore().getPrefixMode(); | ||
| AbfsConfiguration abfsConfiguration = getAbfsStore().getAbfsConfiguration(); | ||
|
|
||
| boolean useBlobEndpoint = !(OperativeEndpoint.isIngressEnabledOnDFS(prefixMode, abfsConfiguration) || | ||
| OperativeEndpoint.isMkdirEnabledOnDFS(prefixMode, abfsConfiguration) || | ||
| OperativeEndpoint.isReadEnabledOnDFS(prefixMode, abfsConfiguration)); | ||
| try { | ||
|
Comment on lines
+1009
to
1012
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why does redirect to dfs on mkdir/ingress/readEnabled matter here?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want the getFileStatus call to go to dfs in all cases where either of the configs is enabled, though this doesn't come as part of fallback but helps to maintain consistency in the logic |
||
| if (abfsStore.getPrefixMode() == PrefixMode.BLOB) { | ||
| /** | ||
| * Get File Status over Blob Endpoint will Have an additional call | ||
| * to check if directory is implicit. | ||
| */ | ||
| fileStatus = abfsStore.getFileStatusOverBlob(qualifiedPath, | ||
| tracingContext); | ||
| } | ||
| else { | ||
| fileStatus = abfsStore.getFileStatus(qualifiedPath, | ||
| tracingContext); | ||
| } | ||
| if (getAbfsStore().getAbfsConfiguration().getPrefixMode() | ||
| == PrefixMode.BLOB && fileStatus != null && fileStatus.isDirectory() | ||
| && | ||
| abfsStore.isAtomicRenameKey(fileStatus.getPath().toUri().getPath()) && | ||
| abfsStore.getRenamePendingFileStatusInDirectory(fileStatus, | ||
| tracingContext, useBlobEndpoint); | ||
| if (getAbfsStore().getPrefixMode() == PrefixMode.BLOB | ||
| && fileStatus != null && fileStatus.isDirectory() | ||
| && abfsStore.isAtomicRenameKey(fileStatus.getPath().toUri().getPath()) | ||
| && abfsStore.getRenamePendingFileStatusInDirectory(fileStatus, | ||
| tracingContext)) { | ||
| RenameAtomicityUtils renameAtomicityUtils = new RenameAtomicityUtils( | ||
| this, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, let operativeEndpoint by the single point with the unified logic.