LuciferYang commented on code in PR #36917:
URL: https://github.com/apache/spark/pull/36917#discussion_r901260208
##########
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnAllocatorSuite.scala:
##########
@@ -794,7 +795,7 @@ class YarnAllocatorSuite extends SparkFunSuite with
Matchers with BeforeAndAfter
// host1 is now in DECOMMISSIONING state
val httpAddress1 = "host1:420"
- when(nodeReport.getNodeState).thenReturn(NodeState.DECOMMISSIONING)
+
when(nodeReport.getNodeState).thenReturn(NodeState.valueOf("DECOMMISSIONING"))
Review Comment:
without this change, the compile will failed as follows:
```
[INFO] Using incremental compilation using Mixed compile order
[INFO] Compiler bridge file:
/Users/yangjie01/.sbt/1.0/zinc/org.scala-sbt/org.scala-sbt-compiler-bridge_2.12-1.3.1-bin_2.12.16__52.0-1.3.1_20191012T045515.jar
[INFO] compiler plugin:
BasicArtifact(com.github.ghik,silencer-plugin_2.12.16,1.7.9,null)
[INFO] Compiling 22 Scala sources and 3 Java sources to
/Users/yangjie01/SourceCode/git/spark-mine-12/resource-managers/yarn/target/scala-2.12/test-classes
...
[ERROR] [Error]
/Users/yangjie01/SourceCode/git/spark-mine-12/resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnAllocatorSuite.scala:797:
value DECOMMISSIONING is not a member of object
org.apache.hadoop.yarn.api.records.NodeState
[ERROR] one error found
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 21.516 s
[INFO] Finished at: 2022-06-20T11:53:06+08:00
[INFO]
------------------------------------------------------------------------
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]