[
https://issues.apache.org/jira/browse/YARN-9513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16826977#comment-16826977
]
Adam Antal commented on YARN-9513:
----------------------------------
I run it on my local and played around a little with the test case.
It looks like some GC related metrics can not be handled by the
{{MetricsInvariantChecker}}. The following entries are not recognised when
parsed from invariants.txt:
{noformat}
...
GcCountPS_Scavenge >= 0
GcTimeMillisPS_Scavenge >= 0
GcCountPS_MarkSweep >= 0
GcTimeMillisPS_MarkSweep >= 0
...
{noformat}
I analysed the output of {{ManagementFactory#getGarbageCollectorMXBeans()}}
which seems a bit different for the different JVMs.
Running in OpenJDK 11, it looks like this function returns
{{GarbageCollectorMXBean}}s with name "G1 Old Generation" and "G1 Young
Generation", while JDK8 zulu returns "PS_Scavenge" and "PS_MarkSweep" as names.
Modifying the invariants.txt does not seem to be a good idea, as it is not
going to pass on JDK8 (only on OpenJDK11). I suppose some condition will be
needed depending on the jvm. It is also an interesting question, that this
jvm/platform-specific thing should be tested at all.
Any thoughts on this?
> [JDK11] TestMetricsInvariantChecker#testManyRuns InvariantViolationException:
> ReferenceError: "GcCountPS_Scavenge" is not defined in <eval> at line number 1
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: YARN-9513
> URL: https://issues.apache.org/jira/browse/YARN-9513
> Project: Hadoop YARN
> Issue Type: Bug
> Components: test
> Reporter: Siyao Meng
> Assignee: Adam Antal
> Priority: Major
>
> Found in maven JDK 11 unit test run. Compiled on JDK 8:
> {code}
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.502
> s<<< FAILURE! - in
> org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.TestMetricsInvariantChecker
> [ERROR]
> testManyRuns(org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.TestMetricsInvariantChecker)
> Time elapsed: 0.206 s <<<
> ERROR!org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.InvariantViolationException:
> ReferenceError: "GcCountPS_Scavenge" is not defined in <eval> at line number
> 1
> at
> org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.InvariantsChecker.logOrThrow(InvariantsChecker.java:74)
> at
> org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.MetricsInvariantChecker.editSchedule(MetricsInvariantChecker.java:180)
> at
> org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.TestMetricsInvariantChecker.testManyRuns(TestMetricsInvariantChecker.java:69)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]