srowen commented on a change in pull request #23884: [MINOR]Simplify boolean
expression
URL: https://github.com/apache/spark/pull/23884#discussion_r259760356
##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -772,7 +772,7 @@ private[deploy] object Worker extends Logging {
// more detail see SPARK-20989.
val externalShuffleServiceEnabled =
conf.get(config.SHUFFLE_SERVICE_ENABLED)
val sparkWorkerInstances =
scala.sys.env.getOrElse("SPARK_WORKER_INSTANCES", "1").toInt
- require(externalShuffleServiceEnabled == false || sparkWorkerInstances <=
1,
+ require(!externalShuffleServiceEnabled || sparkWorkerInstances <= 1,
Review comment:
I agree with removing `== true`. There is some minor argument against `!` vs
`== false` as the `!` can be easier to overlook. Although it comes first, I
suppose you could say. I'm neutral on those.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]