bhattmanish98 commented on code in PR #7265:
URL: https://github.com/apache/hadoop/pull/7265#discussion_r1937122362


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsPermission.java:
##########
@@ -68,7 +69,8 @@ public boolean equals(Object obj) {
    * @return a permission object for the provided string representation
    */
   public static AbfsPermission valueOf(final String abfsSymbolicPermission) {
-    if (abfsSymbolicPermission == null) {
+    if (abfsSymbolicPermission == null

Review Comment:
   Taken



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemCreate.java:
##########
@@ -166,6 +169,147 @@ public void testCreateNonRecursive2() throws Exception {
     assertIsFile(fs, testFile);
   }
 
+  /**
+   * Test createNonRecursive when parent exist.
+   *
+   * @throws Exception in case of failure
+   */
+  @Test
+  public void testCreateNonRecursiveWhenParentExist() throws Exception {
+    AzureBlobFileSystem fs = getFileSystem();
+    assumeBlobServiceType();
+    fs.setWorkingDirectory(new Path(ROOT_PATH));
+    Path createDirectoryPath = new Path("hbase/A");
+    fs.mkdirs(createDirectoryPath);
+    fs.createNonRecursive(new Path(createDirectoryPath, "B"), FsPermission
+        .getDefault(), false, 1024,
+        (short) 1, 1024, null);
+    Assertions.assertThat(fs.exists(new Path(createDirectoryPath, "B")))
+        .describedAs("File should be created").isTrue();
+    fs.close();
+  }
+
+  /**
+   * Test createNonRecursive when parent does not exist.
+   *
+   * @throws Exception in case of failure
+   */
+  @Test
+  public void testCreateNonRecursiveWhenParentNotExist() throws Exception {
+    AzureBlobFileSystem fs = getFileSystem();
+    assumeBlobServiceType();
+    fs.setWorkingDirectory(new Path(ROOT_PATH));
+    Path createDirectoryPath = new Path("A/");

Review Comment:
   Both works.



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1694,16 +1976,24 @@ private boolean isNonEmptyListing(String path,
    * @return True if empty results without continuation token.
    */
   private boolean isEmptyListResults(AbfsHttpOperation result) {

Review Comment:
   Taken



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java:
##########
@@ -1144,9 +1158,9 @@ public void delete(final Path path, final boolean 
recursive,
     boolean shouldContinue = true;
 
     LOG.debug("delete filesystem: {} path: {} recursive: {}",
-            getClient().getFileSystem(),
-            path,
-            String.valueOf(recursive));
+        getClient().getFileSystem(),

Review Comment:
   Same as above, the formatting was not as per out XML, so I thought to 
correct it for delete flow.



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsPermission.java:
##########
@@ -100,7 +102,8 @@ public static AbfsPermission valueOf(final String 
abfsSymbolicPermission) {
    * extended ACL; otherwise false.
    */
   public static boolean isExtendedAcl(final String abfsSymbolicPermission) {
-    if (abfsSymbolicPermission == null) {
+    if (abfsSymbolicPermission == null

Review Comment:
   Taken



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java:
##########
@@ -1155,9 +1169,10 @@ public void delete(final Path path, final boolean 
recursive,
     do {
       try (AbfsPerfInfo perfInfo = startTracking("delete", "deletePath")) {
         AbfsRestOperation op = getClient().deletePath(relativePath, recursive,
-            continuation, tracingContext, 
getIsNamespaceEnabled(tracingContext));
+            continuation, tracingContext);
         perfInfo.registerResult(op.getResult());
-        continuation = 
op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_CONTINUATION);
+        continuation = op.getResult()

Review Comment:
   Corrected formatting only in rename and delete flow as earlier formatting 
was not as per what we follow.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to