robertwb commented on code in PR #25763:
URL: https://github.com/apache/beam/pull/25763#discussion_r1130276274


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/resourcehints/ResourceHints.java:
##########
@@ -207,8 +210,19 @@ public int hashCode() {
     }
   }
 
-  /** Sets desired minimal available RAM size to have in transform's execution 
environment. */
+  /**
+   * Sets desired minimal available RAM size to have in transform's execution 
environment.
+   *
+   * @param ramBytes specifies a positive RAM size in bytes.
+   */
   public ResourceHints withMinRam(long ramBytes) {
+    if (ramBytes <= 0L) {
+      LOG.error(

Review Comment:
   At the very least, let's log the error for anything <1G which is probably an 
unintentional overflow. (I have my doubts as to whether anyone will see this 
log, but let's at least drop a TODO to turn it into a hard error.)



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

Reply via email to