maheshrajus commented on code in PR #407:
URL: https://github.com/apache/tez/pull/407#discussion_r2075559741


##########
tez-ext-service-tests/src/test/java/org/apache/tez/tests/ExternalTezServiceTestHelper.java:
##########
@@ -78,10 +78,17 @@ public ExternalTezServiceTestHelper(String testRootDir) 
throws
     for (Map.Entry<String, String> entry : tezCluster.getConfig()) {
       clusterConf.set(entry.getKey(), entry.getValue());
     }
+
     long jvmMax = Runtime.getRuntime().maxMemory();
+    long availableMemory;
+    if ((jvmMax * 0.5d) >= Integer.MAX_VALUE) {

Review Comment:
   with JDK17 the available memory is coming big number from 
(Runtime.getRuntime().maxMemory();)
   So in our code we are converting the long value to integer and we are facing 
numberFormat exceptions with jdk17. So i added check, >>long availableMemory = 
(long) Math.min(jvmMax * 0.5d, Integer.MAX_VALUE);
   Anyway this value we are using in creating MiniTezTestServiceCluster.



-- 
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: issues-unsubscr...@tez.apache.org

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

Reply via email to