Azure Data Lake Store libraries for Java
Overview
Capture data of any size, type, and ingestion speed in a single place for analytics with Azure Data Lake Store.
To get started with Data Lake Store, see Get started with Azure Data Lake Store using Java.
Client library
Read and write files, set permissions and metadata, and manage files and directories in Data Lake Store with the client library.
Add a dependency to your Maven pom.xml
file to use the client library in your project.
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-data-lake-store-sdk</artifactId>
<version>2.1.5</version>
</dependency>
Example
Create a Data Lake client from a fully qualified domain name and OAuth2 access token, then create a file in Data Lake and write to it.
// AccessTokenProvider provider = new ClientCredsTokenProvider(authTokenEndpoint, clientId, clientKey);
ADLStoreClient client = ADLStoreClient.createClient(accountFQDN, provider);
// create directory
client.createDirectory("/a/b/w");
// create file and write some content
String filename = "/a/b/c.txt";
OutputStream stream = client.createFile(filename, IfExists.OVERWRITE );
PrintStream out = new PrintStream(stream);
for (int i = 1; i <= 10; i++) {
out.println("This is line #" + i);
out.format("This is the same line (%d), but using formatted output. %n", i);
}
out.close();
Management API
Use the management API to manage Data Lake Store accounts, firewall rules, and trusted identity providers.
Add a dependency to your Maven pom.xml
file to use the management API in your project.
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-datalake-store</artifactId>
<version>1.0.0-beta1.3</version>
</dependency>
Samples
Explore more sample Java code for Azure Data Lake Store you can use in your apps.
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應