[ 
https://issues.apache.org/jira/browse/HADOOP-16948?focusedWorklogId=536561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-536561
 ]

ASF GitHub Bot logged work on HADOOP-16948:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jan/21 17:35
            Start Date: 15/Jan/21 17:35
    Worklog Time Spent: 10m 
      Work Description: billierinaldi commented on a change in pull request 
#1925:
URL: https://github.com/apache/hadoop/pull/1925#discussion_r558459909



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -306,6 +322,83 @@ public AbfsRestOperation createPath(final String path, 
final boolean isFile, fin
     return op;
   }
 
+  public AbfsRestOperation acquireLease(final String path, int duration) 
throws AzureBlobFileSystemException {
+    final List<AbfsHttpHeader> requestHeaders = createDefaultHeaders();
+
+    requestHeaders.add(new AbfsHttpHeader(X_MS_LEASE_ACTION, 
ACQUIRE_LEASE_ACTION));
+    requestHeaders.add(new AbfsHttpHeader(X_MS_LEASE_DURATION, 
Integer.toString(duration)));
+    requestHeaders.add(new AbfsHttpHeader(X_MS_PROPOSED_LEASE_ID, 
UUID.randomUUID().toString()));
+
+    final AbfsUriQueryBuilder abfsUriQueryBuilder = 
createDefaultUriQueryBuilder();
+
+    final URL url = createRequestUrl(path, abfsUriQueryBuilder.toString());
+    final AbfsRestOperation op = new AbfsRestOperation(

Review comment:
       There is some good debug logging when the rest operation is executed, so 
I think we're okay here.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 536561)
    Time Spent: 1h 50m  (was: 1h 40m)

> ABFS: Support single writer dirs
> --------------------------------
>
>                 Key: HADOOP-16948
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16948
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Billie Rinaldi
>            Assignee: Billie Rinaldi
>            Priority: Minor
>              Labels: abfsactive, pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> This would allow some directories to be configured as single writer 
> directories. The ABFS driver would obtain a lease when creating or opening a 
> file for writing and would automatically renew the lease and release the 
> lease when closing the file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to