You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Likkey (via GitHub)" <gi...@apache.org> on 2023/05/12 12:19:16 UTC

[GitHub] [hadoop] Likkey commented on a diff in pull request #5568: HDFS-16653.Add error message for maxEvictableMmapedSize related Precondition check suite.

Likkey commented on code in PR #5568:
URL: https://github.com/apache/hadoop/pull/5568#discussion_r1192290936


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/shortcircuit/ShortCircuitCache.java:
##########
@@ -383,7 +384,9 @@ public ShortCircuitCache(int maxTotalSize, long maxNonMmappedEvictableLifespanMs
     this.maxTotalSize = maxTotalSize;
     Preconditions.checkArgument(maxNonMmappedEvictableLifespanMs >= 0);
     this.maxNonMmappedEvictableLifespanMs = maxNonMmappedEvictableLifespanMs;
-    Preconditions.checkArgument(maxEvictableMmapedSize >= 0);
+    Preconditions.checkArgument(maxEvictableMmapedSize >= 0,
+      "Invalid argument: " + HdfsClientConfigKeys.Mmap.CACHE_SIZE_KEY +
+      " must be greater than zero.");
     this.maxEvictableMmapedSize = maxEvictableMmapedSize;
     Preconditions.checkArgument(maxEvictableMmapedLifespanMs >= 0);

Review Comment:
   I've added the other PreConditions and added the relevant unit tests :)



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org