Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Duplicate
-
None
-
None
-
None
Description
See https://issues.apache.org/jira/browse/IGNITE-11406 (same scenario)
On 5th iteration (on each iteration there is 50 round cluster nodes restart)
There is atomic long started in lifecyclebean:
LifecycleAtomicLongBean implements LifecycleBean { /** * Auto-inject ignite instance. */ @IgniteInstanceResource private Ignite ignite; /** * atomicLongName */ private String atomicLongName; /** * Event type */ private LifecycleEventType eventType; /** * Logger */ private static final Logger log = LogManager.getLogger(IgniteService.class); public LifecycleAtomicLongBean(String atomicLongName, LifecycleEventType eventType) { this.atomicLongName = atomicLongName; this.eventType = eventType; } /** {@inheritDoc} */ @Override public void onLifecycleEvent(LifecycleEventType evt) { System.out.println(); System.out.println(">>> Lifecycle event occurred: " + evt); System.out.println(">>> Ignite name: " + ignite.name()); if (evt == eventType) { IgniteAtomicLong atomicLong = ignite.atomicLong(atomicLongName, 0, true); log.info(">>> Ignite Atomic Long"); log.info("Atomic long initial value : " + atomicLong.getAndIncrement() + '.'); } } }
Configuration:
<property name="lifecycleBeans"> <list> <bean class="org.apache.ignite.piclient.bean.LifecycleAtomicLongBean"> <constructor-arg index="0" type="java.lang.String" value="nodeIdCounter"/> <constructor-arg index="1" type="org.apache.ignite.lifecycle.LifecycleEventType"> <value type="org.apache.ignite.lifecycle.LifecycleEventType">AFTER_NODE_START</value> </constructor-arg> </bean> </list> </property>
Error on start
ava.lang.AssertionError
at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.stopRoutine(GridContinuousProcessor.java:743)
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:705)
at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(CacheContinuousQueryManager.java:542)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(DataStructuresProcessor.java:213)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:541)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:457)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3468)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3457)
at org.apache.ignite.piclient.bean.LifecycleAtomicLongBean.onLifecycleEvent(LifecycleAtomicLongBean.java:48)
at org.apache.ignite.internal.IgniteKernal.notifyLifecycleBeans(IgniteKernal.java:655)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1064)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1973)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1716)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1144)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1062)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:948)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:847)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:717)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:686)
at org.apache.ignite.Ignition.start(Ignition.java:352)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)
Failed to start grid: null