From aa1b583cf99d1a7cfe554d1769fc4af252374663 Mon Sep 17 00:00:00 2001 From: "Aaron T. Myers" Date: Mon, 20 Jun 2016 13:46:11 -0700 Subject: [PATCH] HDFS-10423. Increase default value of httpfs maxHttpHeaderSize. Contributed by Nicolae Popa. --- .../hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh | 4 ++++ .../hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh | 1 + .../hadoop-hdfs-httpfs/src/main/tomcat/server.xml | 1 + .../hadoop-hdfs-httpfs/src/main/tomcat/ssl-server.xml.conf | 1 + .../hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm | 4 ++++ 5 files changed, 11 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh index f01245372f..300d2acf98 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh @@ -38,6 +38,10 @@ # # export HTTPFS_HTTP_HOSTNAME=$(hostname -f) +# The maximum size of Tomcat HTTP header +# +# export HTTPFS_MAX_HTTP_HEADER_SIZE=65536 + # The location of the SSL keystore if using SSL # # export HTTPFS_SSL_KEYSTORE_FILE=${HOME}/.keystore diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh index ba4b4068df..176dd3284a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh @@ -42,6 +42,7 @@ function hadoop_subproject_init export HADOOP_CATALINA_HTTP_PORT="${HTTPFS_HTTP_PORT:-14000}" export HADOOP_CATALINA_ADMIN_PORT="${HTTPFS_ADMIN_PORT:-$((HADOOP_CATALINA_HTTP_PORT+1))}" export HADOOP_CATALINA_MAX_THREADS="${HTTPFS_MAX_THREADS:-150}" + export HADOOP_CATALINA_MAX_HTTP_HEADER_SIZE="${HTTPFS_MAX_HTTP_HEADER_SIZE:-65536}" export HTTPFS_SSL_ENABLED=${HTTPFS_SSL_ENABLED:-false} diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/tomcat/server.xml b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/tomcat/server.xml index a425bdd2b3..67f2159fcc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/tomcat/server.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/tomcat/server.xml @@ -71,6 +71,7 @@ --> diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm index 3c7f9d317d..6a03a4586c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm @@ -80,6 +80,8 @@ HttpFS preconfigures the HTTP and Admin ports in Tomcat's `server.xml` to 14000 Tomcat logs are also preconfigured to go to HttpFS's `logs/` directory. +HttpFS default value for the maxHttpHeaderSize parameter in Tomcat's `server.xml` is set to 65536 by default. + The following environment variables (which can be set in HttpFS's `etc/hadoop/httpfs-env.sh` script) can be used to alter those values: * HTTPFS\_HTTP\_PORT @@ -88,6 +90,8 @@ The following environment variables (which can be set in HttpFS's `etc/hadoop/ht * HADOOP\_LOG\_DIR +* HTTPFS\_MAX\_HTTP\_HEADER\_SIZE + HttpFS Configuration --------------------