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


##########
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:
   Thanks for the comments.
   
   > Will raising an exception ... break the users's current jobs?
   
   Though in practical setting a small value does not make sense, formally it 
is still a breaking change. So I chose to use an "error" level logging for now 
and switch to checkArgument it in later versions



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