srowen commented on a change in pull request #24314: 
[SPARK-27404][CORE][SQL][STREAMING][YARN] Fix build warnings for 3.0: 
postfixOps edition
URL: https://github.com/apache/spark/pull/24314#discussion_r272847538
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/BarrierTaskContext.scala
 ##########
 @@ -122,7 +121,7 @@ class BarrierTaskContext private[spark] (
           barrierEpoch),
         // Set a fixed timeout for RPC here, so users shall get a 
SparkException thrown by
         // BarrierCoordinator on timeout, instead of RPCTimeoutException from 
the RPC framework.
-        timeout = new RpcTimeout(31536000 /* = 3600 * 24 * 365 */ seconds, 
"barrierTimeout"))
+        timeout = new RpcTimeout(365.days, "barrierTimeout"))
 
 Review comment:
   A good example of simplifying expressions while also removing postfixOps

----------------------------------------------------------------
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.
 
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]

Reply via email to