Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.92.1, 0.94.1
-
None
-
None
-
Reviewed
Description
This is w.r.t a mail sent in the dev mail list.
Empty region split should be handled gracefully. Either we should not allow the split to happen if we know that the region is empty or we should allow the split to happen by setting the no of threads to the thread pool executor as 1.
int nbFiles = hstoreFilesToSplit.size(); ThreadFactoryBuilder builder = new ThreadFactoryBuilder(); builder.setNameFormat("StoreFileSplitter-%1$d"); ThreadFactory factory = builder.build(); ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(nbFiles, factory); List<Future<Void>> futures = new ArrayList<Future<Void>>(nbFiles);
Here the nbFiles needs to be a non zero positive value.