in src/main/java/com/microsoft/azure/datalake/store/ContentSummaryProcessor.java [34:60]
public ContentSummary getContentSummary(ADLStoreClient client, String dirname) throws IOException {
this.client = client;
DirectoryEntry de = client.getDirectoryEntry(dirname);
if (de.type == DirectoryEntryType.FILE) {
processFile(de);
} else {
queue.add(de);
processDirectory(de);
// Start threads in the processing thread-pool
Thread[] threads = new Thread[NUM_THREADS];
for (int i = 0; i < NUM_THREADS; i++) {
threads[i] = new Thread(new ThreadProcessor());
threads[i].start();
}
// wait for all threads to get done
for (Thread t : threads) {
try {
t.join();
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
}
}
return new ContentSummary(totalBytes.get(), directoryCount.get(), fileCount.get(), totalBytes.get());
}