Skip to content

Overlord throw exceptions on systems with 1 CPU #315

Closed

Description

@maxd

Hello All,

I can't run 'overlord' node on VirtualBox node with 1 CPU. It throw the exception:

013-11-28 11:40:22,507 ERROR [LeaderSelector-0] io.druid.indexing.overlord.TaskMaster - Failed to lead: {class=io.druid.indexing.overlord.TaskMaster, exceptionType=class java.lang.IllegalArgumentException, exceptionMessage=null}
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1310)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1198)
        at java.util.concurrent.Executors.newFixedThreadPool(Executors.java:89)
        at io.druid.indexing.overlord.ForkingTaskRunner.<init>(ForkingTaskRunner.java:101)
        at io.druid.indexing.overlord.ForkingTaskRunnerFactory.build(ForkingTaskRunnerFactory.java:63)
        at io.druid.indexing.overlord.TaskMaster$1.takeLeadership(TaskMaster.java:97)
        at org.apache.curator.framework.recipes.leader.LeaderSelector$3.run(LeaderSelector.java:328)
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293)
        at org.apache.curator.framework.recipes.leader.LeaderSelector.doWork(LeaderSelector.java:319)
        at org.apache.curator.framework.recipes.leader.LeaderSelector.doWorkLoop(LeaderSelector.java:376)
        at org.apache.curator.framework.recipes.leader.LeaderSelector.access$100(LeaderSelector.java:48)
        at org.apache.curator.framework.recipes.leader.LeaderSelector$2.call(LeaderSelector.java:197)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

As I understand the newFixedThreadPool method threw this exception because the nThreads argument was less than or equal 0.

I have increased number of CPU and this problem disappear. So, I think need to set nThreads argument to 1 as minimum in case when system has 1 CPU.

Thanks

Activity

  1. fjy commented on Dec 16, 2013

    @fjy
    Contributor

    This should be fixed in master now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions