Skip to content

Instantly share code, notes, and snippets.

View asikaria's full-sized avatar

Atul Sikaria asikaria

View GitHub Profile
@asikaria
asikaria / azure-data-lake-concurrentappend.java
Created May 9, 2017 18:57
Doing ConcurrentAppend to Azure Data Lake Store using Java
public static void main( String[] args ) throws IOException {
ClientCredsTokenProvider tokenProvider = new ClientCredsTokenProvider("...", "...", "..."); // fill in placeholders
ADLStoreClient client = ADLStoreClient.createClient("AccountName.azureDatalakestore.net",
tokenProvider);
byte[] myBuffer = new byte[256];
// fill in myBuffer content here
RequestOptions opts = new RequestOptions();
// use ONE of the below two lines
opts.retryPolicy = new ExponentialBackoffPolicy(); // for at-least-once insertion
opts.retryPolicy = new NoRetryPolicy(); // for at-most-once insertion