snvijaya commented on a change in pull request #1790: changes for combined 
append+flush calls for blockblob(traditionan) an…
URL: https://github.com/apache/hadoop/pull/1790#discussion_r365174656
 
 

 ##########
 File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
 ##########
 @@ -344,40 +366,53 @@ public void deleteFilesystem() throws 
AzureBlobFileSystemException {
 
   public OutputStream createFile(final Path path, final boolean overwrite, 
final FsPermission permission,
                                  final FsPermission umask) throws 
AzureBlobFileSystemException {
-    boolean isNamespaceEnabled = getIsNamespaceEnabled();
-    LOG.debug("createFile filesystem: {} path: {} overwrite: {} permission: {} 
umask: {} isNamespaceEnabled: {}",
-            client.getFileSystem(),
-            path,
-            overwrite,
-            permission.toString(),
-            umask.toString(),
-            isNamespaceEnabled);
-
-    client.createPath(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), 
true, overwrite,
-        isNamespaceEnabled ? getOctalNotation(permission) : null,
-        isNamespaceEnabled ? getOctalNotation(umask) : null);
+    try (AbfsPerfInfo perfInfo = startTracking("createFile", "createPath")) {
+      boolean isNamespaceEnabled = getIsNamespaceEnabled();
+      LOG.debug("createFile filesystem: {} path: {} overwrite: {} permission: 
{} umask: {} isNamespaceEnabled: {}",
+              client.getFileSystem(),
+              path,
+              overwrite,
+              permission.toString(),
+              umask.toString(),
+              isNamespaceEnabled);
+
+        boolean appendBlob = false;
+        if (isAppendBlobKey(path.toString())) {
+          appendBlob = true;
+        }
 
-    return new AbfsOutputStream(
-        client,
-        AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path),
-        0,
-        abfsConfiguration.getWriteBufferSize(),
-        abfsConfiguration.isFlushEnabled());
+      client.createPath(AbfsHttpConstants.FORWARD_SLASH + 
getRelativePath(path), true, overwrite,
 
 Review comment:
   Is support for AppendBlob over queryparam "blobtype" also enabled with new 
Dec-2019 version ? If yes, add a config control for AppendBlob as well and have 
the config off, which can be turned on when the API version is upgraded in 
driver. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to