From 13768fe6f0cede1b9388156dfd21eb03c6332af1 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Mon, 4 Jan 2021 20:54:44 -0800 Subject: [PATCH] HDFS-15719. [Hadoop 3] Both NameNodes can crash simultaneously due to the short JN socket timeout (#2533) (cherry picked from commit 2b4febcf576e2da29ab86e2920302b82b47e435d) (cherry picked from commit 94c126cc9e9aadaf9aa28ebd55a8712aca54e709) (cherry picked from commit 8af0fcf628b0a8ab1b9b44762eb4a9341f9d7b6a) --- .../org/apache/hadoop/fs/CommonConfigurationKeysPublic.java | 2 +- .../src/main/java/org/apache/hadoop/http/HttpServer2.java | 2 +- .../hadoop-common/src/main/resources/core-default.xml | 2 +- .../hadoop-kms/src/main/resources/kms-default.xml | 2 +- .../hadoop-hdfs-httpfs/src/main/resources/httpfs-default.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java index 50fe13de4e5..44f164d71cf 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java @@ -947,6 +947,6 @@ public class CommonConfigurationKeysPublic { */ public static final String HADOOP_HTTP_IDLE_TIMEOUT_MS_KEY = "hadoop.http.idle_timeout.ms"; - public static final int HADOOP_HTTP_IDLE_TIMEOUT_MS_DEFAULT = 1000; + public static final int HADOOP_HTTP_IDLE_TIMEOUT_MS_DEFAULT = 60000; } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java index 8d6bc18bdc6..f0cc74c7a4c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java @@ -140,7 +140,7 @@ public final class HttpServer2 implements FilterContainer { // idle timeout in milliseconds public static final String HTTP_IDLE_TIMEOUT_MS_KEY = "hadoop.http.idle_timeout.ms"; - public static final int HTTP_IDLE_TIMEOUT_MS_DEFAULT = 10000; + public static final int HTTP_IDLE_TIMEOUT_MS_DEFAULT = 60000; public static final String HTTP_TEMP_DIR_KEY = "hadoop.http.temp.dir"; public static final String FILTER_INITIALIZER_PROPERTY diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml index 82db132e979..20f9addba21 100644 --- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml +++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml @@ -50,7 +50,7 @@ hadoop.http.idle_timeout.ms - 1000 + 60000 NN/JN/DN Server connection timeout in milliseconds. diff --git a/hadoop-common-project/hadoop-kms/src/main/resources/kms-default.xml b/hadoop-common-project/hadoop-kms/src/main/resources/kms-default.xml index eda91ff4a12..538e13a4e2e 100644 --- a/hadoop-common-project/hadoop-kms/src/main/resources/kms-default.xml +++ b/hadoop-common-project/hadoop-kms/src/main/resources/kms-default.xml @@ -103,7 +103,7 @@ hadoop.http.idle_timeout.ms - 1000 + 60000 KMS Server connection timeout in milliseconds. diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/resources/httpfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/resources/httpfs-default.xml index 3e9064f4472..858f097cc42 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/resources/httpfs-default.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/resources/httpfs-default.xml @@ -56,7 +56,7 @@ hadoop.http.idle_timeout.ms - 1000 + 60000 Httpfs Server connection timeout in milliseconds.