Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Post HBASE-18309, we choose the number of threads by the following logic:
+ /** + * If it is an integer and >= 1, it would be the size; + * if 0.0 < size <= 1.0, size would be available processors * size. + * Pay attention that 1.0 is different from 1, former indicates it will use 100% of cores, + * while latter will use only 1 thread for chore to scan dir. + */
swagle has found on his VM that despite having two virtual processors, Runtime.getRuntime().availableProcessors() returns 0, which results in 0 threads for the pool which throws an exception.
java.lang.IllegalArgumentException at java.util.concurrent.ForkJoinPool.checkParallelism(ForkJoinPool.java:2546) at java.util.concurrent.ForkJoinPool.<init>(ForkJoinPool.java:2536) at java.util.concurrent.ForkJoinPool.<init>(ForkJoinPool.java:2505) at org.apache.hadoop.hbase.master.cleaner.CleanerChore.<init>(CleanerChore.java:112) at org.apache.hadoop.hbase.master.cleaner.CleanerChore.<init>(CleanerChore.java:83) at org.apache.hadoop.hbase.master.cleaner.LogCleaner.<init>(LogCleaner.java:65) at org.apache.hadoop.hbase.master.HMaster.startServiceThreads(HMaster.java:1130) at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:813) at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:223) at org.apache.hadoop.hbase.master.HMaster$4.run(HMaster.java:2016) at java.lang.Thread.run(Thread.java:745)
We should make sure that we take the max of 1 and the computed number of threads.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-18309 Support multi threads in CleanerChore
- Resolved