ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-7067) ConcurrentModificationException in Resource Comparator
Date Thu, 28 Aug 2014 22:59:08 GMT
Tom Beerbower created AMBARI-7067:
-------------------------------------

             Summary: ConcurrentModificationException in Resource Comparator
                 Key: AMBARI-7067
                 URL: https://issues.apache.org/jira/browse/AMBARI-7067
             Project: Ambari
          Issue Type: Bug
            Reporter: Tom Beerbower
            Assignee: Tom Beerbower
             Fix For: 1.7.0


It looks like that when the JMX property provider times out, we just log the message and bail
out of the provider. The query continues but so do the threads trying to acquire the JMX metrics.
So the Comparator used at the end of the query gets a ConcurrentModificationException because
another thread is still adding properties to the resource.

{code}
java.util.ConcurrentModificationException
	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1100)
	at java.util.TreeMap$EntryIterator.next(TreeMap.java:1136)
	at java.util.TreeMap$EntryIterator.next(TreeMap.java:1131)
	at java.util.AbstractMap.toString(AbstractMap.java:485)
	at java.lang.String.valueOf(String.java:2826)
	at java.lang.StringBuilder.append(StringBuilder.java:115)
	at java.util.AbstractMap.toString(AbstractMap.java:490)
	at java.lang.String.valueOf(String.java:2826)
	at java.lang.StringBuilder.append(StringBuilder.java:115)
	at org.apache.ambari.server.controller.internal.ResourceImpl.toString(ResourceImpl.java:143)
	at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceComparator.compare(ClusterControllerImpl.java:828)
	at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ResourceComparator.compare(ClusterControllerImpl.java:773)
	at org.apache.ambari.server.controller.internal.ClusterControllerImplTest.testComparatorConcurrentModification(ClusterControllerImplTest.java:857)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message