Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21669#discussion_r223094488
  
    --- Diff: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
 ---
    @@ -39,6 +39,22 @@ private[spark] object KubernetesUtils {
         sparkConf.getAllWithPrefix(prefix).toMap
       }
     
    +  def requireBothOrNeitherDefined(
    +      opt1: Option[_],
    +      opt2: Option[_],
    +      errMessageWhenFirstIsMissing: String,
    +      errMessageWhenSecondIsMissing: String): Unit = {
    +    requireSecondIfFirstIsDefined(opt1, opt2, 
errMessageWhenSecondIsMissing)
    +    requireSecondIfFirstIsDefined(opt2, opt1, errMessageWhenFirstIsMissing)
    +  }
    +
    +  def requireSecondIfFirstIsDefined(
    +      opt1: Option[_], opt2: Option[_], errMessageWhenSecondIsMissing: 
String): Unit = {
    --- End diff --
    
    nit: one param per line


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to