Created
July 19, 2016 08:53
-
-
Save hn5092/eb31a64bdf40b5e7d6f2336b266f8bf9 to your computer and use it in GitHub Desktop.
user executorcompletionservice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CompletionService<HStore> completionService = | |
new ExecutorCompletionService<HStore>(storeOpenerThreadPool); | |
// initialize each store in parallel | |
for (final HColumnDescriptor family : htableDescriptor.getFamilies()) { | |
status.setStatus("Instantiating store for column family " + family); | |
completionService.submit(new Callable<HStore>() { | |
@Override | |
public HStore call() throws IOException { | |
return instantiateHStore(family); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment