From 9bae50f83c6c300d8952527bece28c3d2c13e179 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Wed, 22 Jun 2022 22:38:12 +0800 Subject: [PATCH] HBASE-27141 Upgrade hbase-thirdparty dependency to 4.1.1 (#4552) Signed-off-by: Andrew Purtell Signed-off-by: Pankaj Kumar --- .../main/java/org/apache/hadoop/hbase/http/HttpServer.java | 5 ++++- .../main/java/org/apache/hadoop/hbase/util/JSONBean.java | 2 +- hbase-protocol-shaded/pom.xml | 2 +- .../main/java/org/apache/hadoop/hbase/thrift/Constants.java | 5 ++++- pom.xml | 6 +++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java index 8b452be89e7c..8c45d4f8aca2 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java @@ -108,7 +108,10 @@ public class HttpServer implements FilterContainer { private static final Logger LOG = LoggerFactory.getLogger(HttpServer.class); private static final String EMPTY_STRING = ""; - private static final int DEFAULT_MAX_HEADER_SIZE = 64 * 1024; // 64K + // Jetty's max header size is Character.MAX_VALUE - 1, See ArrayTernaryTrie for more details + // And in newer jetty version, they add a check when creating a server so we must follow this + // limitation otherwise the UTs will fail + private static final int DEFAULT_MAX_HEADER_SIZE = Character.MAX_VALUE - 1; static final String FILTER_INITIALIZERS_PROPERTY = "hbase.http.filter.initializers"; static final String HTTP_MAX_THREADS = "hbase.http.max.threads"; diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java index c28b3525a053..2360dcb32a29 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java @@ -57,7 +57,7 @@ public class JSONBean { private static final String COMMA = ","; private static final String ASTERICK = "*"; private static final Logger LOG = LoggerFactory.getLogger(JSONBean.class); - private static final Gson GSON = GsonUtil.createGson().create(); + private static final Gson GSON = GsonUtil.createGsonWithDisableHtmlEscaping().create(); /** * Use dumping out mbeans as JSON. diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml index cbdd83ae4845..be3b0a3f160e 100644 --- a/hbase-protocol-shaded/pom.xml +++ b/hbase-protocol-shaded/pom.xml @@ -34,7 +34,7 @@ - 3.17.3 + 3.21.1