diff --git a/docs/content.zh/docs/deployment/filesystems/common.md b/docs/content.zh/docs/deployment/filesystems/common.md index a9d73a6cc0f5a..1df8975b4ca8b 100644 --- a/docs/content.zh/docs/deployment/filesystems/common.md +++ b/docs/content.zh/docs/deployment/filesystems/common.md @@ -50,9 +50,9 @@ fs.default-scheme: <default-fs> 要限制文件系统的连接数,可将下列配置添加至 Flink 配置中。设置限制的文件系统由其 scheme 指定: ```yaml -fs.<scheme>.limit.total: (数量,0/-1 表示无限制) -fs.<scheme>.limit.input: (数量,0/-1 表示无限制) -fs.<scheme>.limit.output: (数量,0/-1 表示无限制) +fs.<scheme>.limit.total: (数量,0/-1 表示无连接限制) +fs.<scheme>.limit.input: (数量,0/-1 表示无输入连接限制) +fs.<scheme>.limit.output: (数量,0/-1 表示无输出连接限制) fs.<scheme>.limit.timeout: (毫秒,0 表示无穷) fs.<scheme>.limit.stream-timeout: (毫秒,0 表示无穷) ``` @@ -63,4 +63,4 @@ fs.<scheme>.limit.stream-timeout: (毫秒,0 表示无穷) 连接数是按每个 TaskManager/文件系统来进行限制的。因为文件系统的创建是按照 scheme 和 authority 进行的,所以不同的 authority 具有独立的连接池,例如 `hdfs://myhdfs:50010/` 和 `hdfs://anotherhdfs:4399/` 会有单独的连接池。 -{{< top >}} \ No newline at end of file +{{< top >}} diff --git a/docs/content/docs/deployment/filesystems/common.md b/docs/content/docs/deployment/filesystems/common.md index 29a5e385c8e12..f9a50fb3cee84 100644 --- a/docs/content/docs/deployment/filesystems/common.md +++ b/docs/content/docs/deployment/filesystems/common.md @@ -52,9 +52,9 @@ To limit a specific file system's connections, add the following entries to the its scheme. ```yaml -fs.<scheme>.limit.total: (number, 0/-1 mean no limit) -fs.<scheme>.limit.input: (number, 0/-1 mean no limit) -fs.<scheme>.limit.output: (number, 0/-1 mean no limit) +fs.<scheme>.limit.total: (number, 0/-1 means there is no connection limit) +fs.<scheme>.limit.input: (number, 0/-1 means there is no input connection limit) +fs.<scheme>.limit.output: (number, 0/-1 means there is no output connection limit) fs.<scheme>.limit.timeout: (milliseconds, 0 means infinite) fs.<scheme>.limit.stream-timeout: (milliseconds, 0 means infinite) ``` @@ -69,4 +69,4 @@ Limit enforcement on a per TaskManager/file system basis. Because file systems creation occurs per scheme and authority, different authorities have independent connection pools. For example `hdfs://myhdfs:50010/` and `hdfs://anotherhdfs:4399/` will have separate pools. -{{< top >}} \ No newline at end of file +{{< top >}} diff --git a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java index 17f76935310b6..231d81e186506 100644 --- a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java +++ b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java @@ -527,7 +527,13 @@ public static String[] mergeListsToArray(List<String> base, List<String> append) * open. Unlimited be default. */ public static ConfigOption<Integer> fileSystemConnectionLimit(String scheme) { - return ConfigOptions.key("fs." + scheme + ".limit.total").intType().defaultValue(-1); + return ConfigOptions.key("fs." + scheme + ".limit.total") + .intType() + .defaultValue(-1) + .withDescription( + "The connection limit for the file system " + + scheme + + ". The valid value must >= -1. Values of -1 or 0 means there is no connection limit."); } /** @@ -535,7 +541,13 @@ public static ConfigOption<Integer> fileSystemConnectionLimit(String scheme) { * Unlimited be default. */ public static ConfigOption<Integer> fileSystemConnectionLimitIn(String scheme) { - return ConfigOptions.key("fs." + scheme + ".limit.input").intType().defaultValue(-1); + return ConfigOptions.key("fs." + scheme + ".limit.input") + .intType() + .defaultValue(-1) + .withDescription( + "Input connection limit for the file system " + + scheme + + ". The valid value must >= -1. Values of -1 or 0 means there is no input connection limit."); } /** @@ -543,7 +555,13 @@ public static ConfigOption<Integer> fileSystemConnectionLimitIn(String scheme) { * Unlimited be default. */ public static ConfigOption<Integer> fileSystemConnectionLimitOut(String scheme) { - return ConfigOptions.key("fs." + scheme + ".limit.output").intType().defaultValue(-1); + return ConfigOptions.key("fs." + scheme + ".limit.output") + .intType() + .defaultValue(-1) + .withDescription( + "Output connection limit for the file system " + + scheme + + ". The valid value must >= -1. Values of -1 or 0 means there is no output connection limit."); } /**