hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-19709) Guard against a ThreadPool size of 0 in CleanerChore
Date Thu, 04 Jan 2018 22:40:00 GMT
Josh Elser created HBASE-19709:

             Summary: Guard against a ThreadPool size of 0 in CleanerChore
                 Key: HBASE-19709
                 URL: https://issues.apache.org/jira/browse/HBASE-19709
             Project: HBase
          Issue Type: Bug
            Reporter: Siddharth Wagle
            Assignee: Josh Elser
            Priority: Critical
             Fix For: 3.0.0, 2.0.0-beta-2

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.

        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.

This message was sent by Atlassian JIRA

View raw message