public void setNumParallelThreadsForReads(int num) {
if (this.parallelReadsThreadPool == null) {
this.parallelReadsThreadPool = new ThreadPoolExecutor(1,
num, 60, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory("dfsclient-reader-thread-"),
new ThreadPoolExecutor.CallerRunsPolicy() {
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
// increment metrics
LOG.debug("Execution rejected, Executing in current thread");