flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [3/5] flink git commit: [FLINK-6642] Return -1 in EnvInfo#getOpenFileHandlesLimit
Date Thu, 25 May 2017 18:49:44 GMT
[FLINK-6642] Return -1 in EnvInfo#getOpenFileHandlesLimit

This closes #3956.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/d4fba3b6
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d4fba3b6
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d4fba3b6

Branch: refs/heads/master
Commit: d4fba3b674fc67db198e4cf163de6ca44b5caf8e
Parents: 0bca76e
Author: zentol <chesnay@apache.org>
Authored: Fri May 19 17:22:26 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Thu May 25 15:56:43 2017 +0200

----------------------------------------------------------------------
 .../org/apache/flink/runtime/util/EnvironmentInformation.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d4fba3b6/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
index 39fa80e..7d44f74 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
@@ -25,6 +25,7 @@ import java.lang.reflect.Method;
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.flink.util.OperatingSystem;
 import org.apache.hadoop.util.VersionInfo;
 
 import org.slf4j.Logger;
@@ -232,6 +233,9 @@ public class EnvironmentInformation {
 	 * @return The limit of open file handles, or {@code -1}, if the limit could not be determined.
 	 */
 	public static long getOpenFileHandlesLimit() {
+		if (OperatingSystem.isWindows()) { // getMaxFileDescriptorCount method is not available
on Windows
+			return -1L;
+		}
 		Class<?> sunBeanClass;
 		try {
 			sunBeanClass = Class.forName("com.sun.management.UnixOperatingSystemMXBean");


Mime
View raw message