dongjoon-hyun commented on code in PR #45061:
URL: https://github.com/apache/spark/pull/45061#discussion_r1482191800


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala:
##########
@@ -105,4 +109,13 @@ private[spark] object KubernetesVolumeUtils {
       throw new NoSuchElementException(key + s" is required for $msg")
     }
   }
+
+  private def verifySize(size: Option[String]): Unit = {
+    size.foreach { v =>
+      if (v.forall(_.isDigit) && parseLong(v) < 1024) {
+        throw new IllegalArgumentException(
+          s"Volume size `$v` is smaller than 1KiB. Missing units?")
+      }
+    }

Review Comment:
   Spark don't know the default values. It's controlled by K8s system admin.
   > Hmm, if the goal is to limit the value to be larger than the default 
value, why don't we check against it but a value like 1KB? 
   
   Yes, if the user has a `unit` like KB, this PR will not block.
   > What will happen if user specify 10KB, for example? It will be used or 8GB 
(default value) will be used?
   
   And, as I mentioned in the above,
   https://github.com/apache/spark/pull/45061#discussion_r1482183784, if a user 
uses 10240, we will not complain because it's too big as a mistake.



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

Reply via email to