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


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/resourcehints/ResourceHints.java:
##########
@@ -207,8 +210,25 @@ 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. A number greater 
than 1G
+   *     (1_000_000_000L) is typical.
+   */
   public ResourceHints withMinRam(long ramBytes) {
+    if (ramBytes <= 0L) {
+      // TODO(yathu) ignore invalid value as of Beam v2.47.0. throw error in 
future version.
+      LOG.error(
+          "Encountered invalid non-positive minimum ram hint value {}.\n"

Review Comment:
   added hint in both LOG message



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