Daniel Cranford
Jul 28, 2017 · 1 min read

Your second example BulkLoader that uses a fixed thread pool and callbacks does not limit the number of inserts in flight unlike the first example. The only thing that is limited in the second BulkLoader is the number of IngestCallbacks that can be running at the same time. The BulkLoader will send all the inserts to the cluster as fast as it can. When the inserts are complete they will queue up IngestCallbacks in the unbounded work queue of the fixedThreadPool() This doesn’t achieve the goal of limiting the amount of client resources used at any one time.

    Daniel Cranford

    Written by