[
https://issues.apache.org/jira/browse/HADOOP-19445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17931912#comment-17931912
]
ASF GitHub Bot commented on HADOOP-19445:
-----------------------------------------
bhattmanish98 commented on code in PR #7386:
URL: https://github.com/apache/hadoop/pull/7386#discussion_r1977149452
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -444,15 +443,14 @@ public void createNonRecursivePreCheck(Path parentPath,
}
getPathStatus(parentPath.toUri().getPath(), false,
tracingContext, null);
+ incrementAbfsGetPathStatus();
} catch (AbfsRestOperationException ex) {
if (ex.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) {
throw new FileNotFoundException("Cannot create file "
+ parentPath.toUri().getPath()
+ " because parent folder does not exist.");
}
throw ex;
Review Comment:
Moved it to finally block
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/BlobDeleteHandler.java:
##########
@@ -90,6 +90,7 @@ int getMaxConsumptionParallelism() {
private boolean deleteInternal(final Path path)
throws AzureBlobFileSystemException {
getAbfsClient().deleteBlobPath(path, null, tracingContext);
+ getAbfsClient().incrementAbfsDeleteFile();
Review Comment:
Moved to finally block
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java:
##########
@@ -993,8 +993,6 @@ public Void call() throws Exception {
delete(fs.getPath(), fs.isDirectory());
if (fs.isDirectory()) {
statIncrement(DIRECTORIES_DELETED);
- } else {
Review Comment:
We are incrementing Delete Files in Client.
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -693,6 +697,34 @@ protected void incrementAbfsRenamePath() {
abfsCounters.incrementCounter(RENAME_PATH_ATTEMPTS, 1);
}
+ /**
+ * Increments AbfsCounters for get path status by 1.
+ */
+ protected void incrementAbfsGetPathStatus() {
Review Comment:
As discussed, this is just a placeholder so that we can use the same method
in both DFS and Blob client.
> ABFS: [FnsOverBlob][Tests] Add Tests For Negative Scenarios Identified for
> Rename Operation
> -------------------------------------------------------------------------------------------
>
> Key: HADOOP-19445
> URL: https://issues.apache.org/jira/browse/HADOOP-19445
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.4.1
> Reporter: Anuj Modi
> Assignee: Manish Bhatt
> Priority: Major
> Labels: pull-request-available
> Attachments: RenameFile_TestScenarios.pdf,
> RenameFolder_TestScenarios.pdf
>
>
> We have identified a few scenarios worth adding integration or mocked
> behavior tests for while implementing FNS Support over Blob Endpoint.
> Attached file shows the the scenarios identified for Rename File and Rename
> directory operations on blob Endpoint
> This Jira tracks implementing these tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]