gengliangwang commented on code in PR #46193:
URL: https://github.com/apache/spark/pull/46193#discussion_r1580054051
##########
common/utils/src/test/scala/org/apache/spark/util/LogKeySuite.scala:
##########
@@ -57,20 +57,20 @@ class LogKeySuite
private val logKeyFilePath = getWorkspaceFilePath("common", "utils", "src",
"main", "scala",
"org", "apache", "spark", "internal", "LogKey.scala")
- // regenerate the file `LogKey.scala` with its enumeration fields sorted
alphabetically
+ // regenerate the file `LogKey.scala` with its members sorted alphabetically
private def regenerateLogKeyFile(
- originalKeys: Seq[LogKey], sortedKeys: Seq[LogKey]): Unit = {
+ originalKeys: Seq[String], sortedKeys: Seq[String]): Unit = {
if (originalKeys != sortedKeys) {
val logKeyFile = logKeyFilePath.toFile
- logInfo(s"Regenerating LogKey file $logKeyFile")
+ logInfo(s"Regenerating the file $logKeyFile")
val originalContents = FileUtils.readLines(logKeyFile,
StandardCharsets.UTF_8)
val sortedContents = new JList[String]()
var firstMatch = false
originalContents.asScala.foreach { line =>
- if (line.trim.startsWith("val ") && line.trim.endsWith(" = Value")) {
+ if (line.trim.startsWith("case object ") && line.trim.endsWith("
extends LogKey")) {
Review Comment:
Not directly related to this PR, but we need to think about what if there
are code comments around the LogKey.
--
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]