You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-dotnet.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Azure Data Lake Storage Gen2 .NET SDK for files & ACLs (preview)
3
3
description: Use the Azure Storage client library to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 01/09/2020
6
+
ms.date: 03/18/2020
7
7
ms.author: normesta
8
8
ms.topic: article
9
9
ms.subservice: data-lake-storage-gen2
@@ -197,6 +197,32 @@ public async Task UploadFile(DataLakeFileSystemClient fileSystemClient)
197
197
}
198
198
```
199
199
200
+
> [!TIP]
201
+
> If your file size is large, your code will have to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync). Consider using the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet-preview#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method instead. That way, you can upload the entire file in a single call.
202
+
>
203
+
> See the next section for an example.
204
+
205
+
## Upload a large file to a directory
206
+
207
+
Use the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet-preview#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method to upload large files without having to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync) method.
Get the access control list (ACL) of a file by calling the [DataLakeFileClient.GetAccessControlAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.getaccesscontrolasync) method and set the ACL by calling the [DataLakeFileClient.SetAccessControlList](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.setaccesscontrollist) method.
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-java.md
+68-12Lines changed: 68 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Azure Data Lake Storage Gen2 Java SDK for files & ACLs (preview)
3
3
description: Use Azure Storage libraries for Java to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 11/24/2019
6
+
ms.date: 03/18/2020
7
7
ms.author: normesta
8
8
ms.topic: conceptual
9
9
ms.subservice: data-lake-storage-gen2
@@ -29,9 +29,12 @@ This article shows you how to use Java to create and manage directories, files,
29
29
30
30
To get started, open [this page](https://search.maven.org/artifact/com.azure/azure-storage-file-datalake) and find the latest version of the Java library. Then, open the *pom.xml* file in your text editor. Add a dependency element that references that version.
31
31
32
+
If you plan to authenticate your client application by using Azure Active Directory (AD), then add a dependency to the Azure Secret Client Library. See [Adding the Secret Client Library package to your project](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity#adding-the-package-to-your-project).
33
+
32
34
Next, add these imports statements to your code file.
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account. The easiest way to get one is to use an account key.
@@ -116,7 +127,8 @@ static public DataLakeDirectoryClient
@@ -212,6 +234,31 @@ static public void UploadFile(DataLakeFileSystemClient fileSystemClient)
212
234
}
213
235
```
214
236
237
+
> [!TIP]
238
+
> If your file size is large, your code will have to make multiple calls to the **DataLakeFileClient.append** method. Consider using the **DataLakeFileClient.uploadFromFile** method instead. That way, you can upload the entire file in a single call.
239
+
>
240
+
> See the next section for an example.
241
+
242
+
## Upload a large file to a directory
243
+
244
+
Use the **DataLakeFileClient.uploadFromFile** method to upload large files without having to make multiple calls to the **DataLakeFileClient.append** method.
245
+
246
+
```java
247
+
static public void UploadFileBulk(DataLakeFileSystemClient fileSystemClient)
This example gets and then sets the ACL of a file named `upload-file.txt`. This example gives the owning user read, write, and execute permissions, gives the owning group only read and execute permissions, and gives all others read access.
@@ -235,11 +282,20 @@ static public void ManageFileACLs(DataLakeFileSystemClient fileSystemClient){
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-javascript.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use JavaScript for files & ACLs in Azure Data Lake Storage Gen2 (preview)
3
3
description: Use Azure Storage Data Lake client library for JavaScript to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
> If your file size is large, your code will have to make multiple calls to the **DataLakeFileClient.append_data** method. Consider using the **DataLakeFileClient.upload_data** method instead. That way, you can upload the entire file in a single call.
197
+
198
+
## Upload a large file to a directory
199
+
200
+
Use the **DataLakeFileClient.upload_data** method to upload large files without having to make multiple calls to the **DataLakeFileClient.append_data** method.
Get the access control list (ACL) of a file by calling the **DataLakeFileClient.get_access_control** method and set the ACL by calling the **DataLakeFileClient.set_access_control** method.
0 commit comments