You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "James Xu (JIRA)" <ji...@apache.org> on 2013/12/14 09:03:06 UTC

[jira] [Created] (STORM-85) IsolationScheduler fails due to NoSuchElementException

James Xu created STORM-85:
-----------------------------

             Summary: IsolationScheduler fails due to NoSuchElementException
                 Key: STORM-85
                 URL: https://issues.apache.org/jira/browse/STORM-85
             Project: Apache Storm (Incubating)
          Issue Type: Bug
            Reporter: James Xu


https://github.com/nathanmarz/storm/issues/738

Repro step:
1. update Nimbus config, add following lines, and re-start Nimbus

storm.scheduler: backtype.storm.scheduler.IsolationScheduler

isolation.scheduler.machines: 
    "WordCountIso": 5
Nimbus failed to re-start and "NullPointerException" found in log files:
2013-10-28 00:46:32 TNonblockingServer [ERROR] Unexpected exception while invoking!
java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at backtype.storm.scheduler.IsolationScheduler$remove_elem_from_set_BANG_.invoke(IsolationScheduler.clj:140)
at backtype.storm.scheduler.IsolationScheduler$schedule.invoke(IsolationScheduler.clj:190)
at backtype.storm.scheduler.IsolationScheduler.schedule(Unknown Source)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
at backtype.storm.daemon.nimbus$computenew_topology__GT_executor__GT_node_PLUS_port.invoke(nimbus.clj:587)
at backtype.storm.daemon.nimbus$mk_assignments.doInvoke(nimbus.clj:674)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at backtype.storm.daemon.nimbus$fn__3812$exec_fn__1239__auto__$reify__3827.submitTopologyWithOpts(nimbus.clj:965)
at backtype.storm.daemon.nimbus$fn__3812$exec_fn__1239__auto__$reify__3827.submitTopology(nimbus.clj:973)
at backtype.storm.generated.Nimbus$Processor$submitTopology.getResult(Nimbus.java:1223)
at backtype.storm.generated.Nimbus$Processor$submitTopology.getResult(Nimbus.java:1211)
at org.apache.thrift7.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift7.TBaseProcessor.process(TBaseProcessor.java:34)
at org.apache.thrift7.server.TNonblockingServer$FrameBuffer.invoke(TNonblockingServer.java:632)
at org.apache.thrift7.server.THsHaServer$Invocation.run(THsHaServer.java:201)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Possible root cause:
missing null checking in IsolationScheduler.remove-elem-from-set!() and IsolationScheduler.-schedule()

fixing:
/src/clj/backtype/storm/scheduler/IsolationScheduler.clj

line 140-142:

   (if (-> aset .iterator .hasNext)                         // add hasNext() checking here
    (let [elem (-> aset .iterator .next)]
      (.remove aset elem)
      elem
      )))

line 191:

          (if (not-nil? executors-set)                // add null checking here. if missing this line, there will be NullPointerException when call cluster.assign()
            (.assign cluster slot top-id executors-set)))



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)