robertwb commented on code in PR #25763:
URL: https://github.com/apache/beam/pull/25763#discussion_r1129788604
##########
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:
I might even raise an exception. To be safe, we could require at least 1G
here to ensure it's a long. (Anything less than that is not meaningfully
actionable anyway.)
--
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]