HBASE-23834 HBase fails to run on Hadoop 3.3.0/3.2.2/3.1.4 due to jetty version mismatch (#2222)

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
Duo Zhang 2020-08-25 12:05:52 +08:00 committed by GitHub
parent 6ad73b9668
commit 57e49b3959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 284 additions and 268 deletions

View File

@ -163,40 +163,12 @@
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>jetty-server</artifactId> <artifactId>hbase-shaded-jetty</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>jetty-servlet</artifactId> <artifactId>hbase-shaded-jersey</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util-ajax</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
</dependency> </dependency>
<!-- General dependencies --> <!-- General dependencies -->
<dependency> <dependency>
@ -280,6 +252,18 @@
</dependency> </dependency>
</dependencies> </dependencies>
<profiles> <profiles>
<profile>
<id>build-with-jdk11</id>
<activation>
<jdk>[1.11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
</dependencies>
</profile>
<!-- Needs to make the profile in apache parent pom --> <!-- Needs to make the profile in apache parent pom -->
<profile> <profile>
<id>apache-release</id> <id>apache-release</id>

View File

@ -18,14 +18,13 @@
package org.apache.hadoop.hbase.http; package org.apache.hadoop.hbase.http;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability; import org.apache.yetus.audience.InterfaceStability;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.DefaultServlet;
/** /**
* General servlet which is admin-authorized. * General servlet which is admin-authorized.

View File

@ -18,10 +18,10 @@
package org.apache.hadoop.hbase.http; package org.apache.hadoop.hbase.http;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Slf4jRequestLog;
import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap; import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.RequestLog;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Slf4jRequestLog;
/** /**
* RequestLog object for use with Http * RequestLog object for use with Http

View File

@ -36,7 +36,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;
import javax.servlet.FilterConfig; import javax.servlet.FilterConfig;
@ -65,35 +64,35 @@ import org.apache.hadoop.security.authorize.ProxyUsers;
import org.apache.hadoop.util.Shell; import org.apache.hadoop.util.Shell;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability; import org.apache.yetus.audience.InterfaceStability;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.FilterMapping;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.MultiException;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.webapp.WebAppContext;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
import org.apache.hbase.thirdparty.com.google.common.collect.Lists; import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
import org.apache.hbase.thirdparty.org.eclipse.jetty.http.HttpVersion;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Handler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConfiguration;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.RequestLog;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SecureRequestCustomizer;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SslConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.HandlerCollection;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.RequestLogHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.DefaultServlet;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterMapping;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.MultiException;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ssl.SslContextFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.apache.hbase.thirdparty.org.eclipse.jetty.webapp.WebAppContext;
import org.apache.hbase.thirdparty.org.glassfish.jersey.server.ResourceConfig;
import org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer;
/** /**
* Create a Jetty embedded server to answer http requests. The primary goal * Create a Jetty embedded server to answer http requests. The primary goal

View File

@ -18,10 +18,11 @@
package org.apache.hadoop.hbase.http; package org.apache.hadoop.hbase.http;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.apache.hbase.thirdparty.org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.servlet.ServletContextHandler; import org.apache.hbase.thirdparty.org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.util.security.Constraint; import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.security.Constraint;
/** /**
* HttpServer utility. * HttpServer utility.

View File

@ -20,16 +20,15 @@ package org.apache.hadoop.hbase.http;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.DefaultServlet;
/** /**
* Servlet to serve files generated by {@link ProfileServlet} * Servlet to serve files generated by {@link ProfileServlet}
*/ */

View File

@ -46,7 +46,7 @@ public class HttpServerFunctionalTest extends Assert {
/** JVM property for the webapp test dir : {@value} */ /** JVM property for the webapp test dir : {@value} */
public static final String TEST_BUILD_WEBAPPS = "test.build.webapps"; public static final String TEST_BUILD_WEBAPPS = "test.build.webapps";
/** expected location of the test.build.webapps dir: {@value} */ /** expected location of the test.build.webapps dir: {@value} */
private static final String BUILD_WEBAPPS_DIR = "src/main/resources/hbase-webapps"; private static final String BUILD_WEBAPPS_DIR = "src/test/resources/webapps";
/** name of the test webapp: {@value} */ /** name of the test webapp: {@value} */
private static final String TEST = "test"; private static final String TEST = "test";

View File

@ -23,12 +23,13 @@ import static org.junit.Assert.assertNotNull;
import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.testclassification.MiscTests; import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Slf4jRequestLog;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.RequestLog;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Slf4jRequestLog;
@Category({ MiscTests.class, SmallTests.class }) @Category({ MiscTests.class, SmallTests.class })
public class TestHttpRequestLog { public class TestHttpRequestLog {

View File

@ -56,8 +56,6 @@ import org.apache.hadoop.security.Groups;
import org.apache.hadoop.security.ShellBasedUnixGroupsMapping; import org.apache.hadoop.security.ShellBasedUnixGroupsMapping;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.authorize.AccessControlList; import org.apache.hadoop.security.authorize.AccessControlList;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.util.ajax.JSON;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.Assert; import org.junit.Assert;
import org.junit.BeforeClass; import org.junit.BeforeClass;
@ -69,6 +67,9 @@ import org.mockito.Mockito;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ajax.JSON;
@Category({MiscTests.class, SmallTests.class}) @Category({MiscTests.class, SmallTests.class})
public class TestHttpServer extends HttpServerFunctionalTest { public class TestHttpServer extends HttpServerFunctionalTest {
@ClassRule @ClassRule

View File

@ -263,10 +263,11 @@ public class TestProxyUserSpnegoHttpServer extends HttpServerFunctionalTest {
assertNotNull(resp); assertNotNull(resp);
assertEquals(responseCode, resp.getStatusLine().getStatusCode()); assertEquals(responseCode, resp.getStatusLine().getStatusCode());
if(responseCode == HttpURLConnection.HTTP_OK) { if (responseCode == HttpURLConnection.HTTP_OK) {
assertTrue(EntityUtils.toString(resp.getEntity()).trim().contains("a:b")); assertTrue(EntityUtils.toString(resp.getEntity()).trim().contains("a:b"));
} else { } else {
assertTrue(resp.getStatusLine().toString().contains(statusLine)); assertTrue(resp.getStatusLine().toString().contains(statusLine) ||
EntityUtils.toString(resp.getEntity()).contains(statusLine));
} }
} }

View File

@ -29,7 +29,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.testclassification.MiscTests; import org.apache.hadoop.hbase.testclassification.MiscTests;
import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.eclipse.jetty.util.ajax.JSON;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
@ -39,6 +38,8 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ajax.JSON;
/** /**
* Basic test case that the ConfServlet can write configuration * Basic test case that the ConfServlet can write configuration
* to its output in XML and JSON format. * to its output in XML and JSON format.

View File

@ -20,7 +20,6 @@ package org.apache.hadoop.hbase.http.resource;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
import java.util.TreeMap; import java.util.TreeMap;
import javax.ws.rs.DefaultValue; import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -29,11 +28,11 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import org.eclipse.jetty.util.ajax.JSON;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ajax.JSON;
/** /**
* A simple Jersey resource class TestHttpServer. * A simple Jersey resource class TestHttpServer.
* The servlet simply puts the path and the op parameter in a map * The servlet simply puts the path and the op parameter in a map

View File

@ -50,6 +50,9 @@
<exclude>META-INF/LICENSE</exclude> <exclude>META-INF/LICENSE</exclude>
</excludes> </excludes>
</testResource> </testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources> </testResources>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@ -228,10 +231,6 @@
<groupId>org.apache.htrace</groupId> <groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId> <artifactId>htrace-core4</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<!-- Hadoop needs Netty 3.x at test scope for the minicluster --> <!-- Hadoop needs Netty 3.x at test scope for the minicluster -->
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
@ -264,16 +263,6 @@
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View File

@ -29,17 +29,18 @@ import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.Slf4jRequestLog;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.util.RegexSet;
import org.junit.rules.ExternalResource; import org.junit.rules.ExternalResource;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Request;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.RequestLog;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Slf4jRequestLog;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.handler.AbstractHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.RegexSet;
/** /**
* A {@link org.junit.Rule} that manages a simple http server. The caller registers request * A {@link org.junit.Rule} that manages a simple http server. The caller registers request
* handlers to URI path regexp. * handlers to URI path regexp.

View File

@ -22,6 +22,7 @@ import static org.apache.hadoop.hbase.HBaseClusterManager.DEFAULT_RETRY_ATTEMPTS
import static org.apache.hadoop.hbase.HBaseClusterManager.DEFAULT_RETRY_SLEEP_INTERVAL; import static org.apache.hadoop.hbase.HBaseClusterManager.DEFAULT_RETRY_SLEEP_INTERVAL;
import static org.apache.hadoop.hbase.HBaseClusterManager.RETRY_ATTEMPTS_KEY; import static org.apache.hadoop.hbase.HBaseClusterManager.RETRY_ATTEMPTS_KEY;
import static org.apache.hadoop.hbase.HBaseClusterManager.RETRY_SLEEP_INTERVAL_KEY; import static org.apache.hadoop.hbase.HBaseClusterManager.RETRY_SLEEP_INTERVAL_KEY;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.util.Collections; import java.util.Collections;
@ -47,12 +48,13 @@ import org.apache.hadoop.hbase.util.RetryCounter;
import org.apache.hadoop.hbase.util.RetryCounter.RetryConfig; import org.apache.hadoop.hbase.util.RetryCounter.RetryConfig;
import org.apache.hadoop.hbase.util.RetryCounterFactory; import org.apache.hadoop.hbase.util.RetryCounterFactory;
import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.ReflectionUtils;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.google.gson.JsonElement; import org.apache.hbase.thirdparty.com.google.gson.JsonElement;
import org.apache.hbase.thirdparty.com.google.gson.JsonObject; import org.apache.hbase.thirdparty.com.google.gson.JsonObject;
import org.apache.hbase.thirdparty.com.google.gson.JsonParser; import org.apache.hbase.thirdparty.com.google.gson.JsonParser;
import org.apache.hbase.thirdparty.org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
/** /**
* A ClusterManager implementation designed to control Cloudera Manager (http://www.cloudera.com) * A ClusterManager implementation designed to control Cloudera Manager (http://www.cloudera.com)

View File

@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
org.apache.hbase.thirdparty.org.glassfish.jersey.client.JerseyClientBuilder

View File

@ -2179,4 +2179,61 @@ Copyright (c) 2007-2017 The JRuby project
</licenses> </licenses>
</project> </project>
</supplement> </supplement>
<supplement>
<project>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<name>Jakarta Bean Validation API</name>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<name>Jakarta RESTful Web Services</name>
<licenses>
<license>
<name>Eclipse Public License 2.0</name>
<url>https://www.eclipse.org/legal/epl-v20.html</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
<name>Injection API (JSR 330) repackaged as OSGi bundle</name>
<licenses>
<license>
<name>Eclipse Public License 2.0</name>
<url>https://www.eclipse.org/legal/epl-v20.html</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
<supplement>
<project>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
<name>Java API for RESTful Web Services</name>
<licenses>
<license>
<name>Eclipse Public License 2.0</name>
<url>https://www.eclipse.org/legal/epl-v20.html</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
</supplement>
</supplementalDataModels> </supplementalDataModels>

View File

@ -260,30 +260,6 @@
<groupId>com.sun.activation</groupId> <groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId> <artifactId>javax.activation</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jmx</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId> <groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId> <artifactId>jackson-jaxrs-json-provider</artifactId>

View File

@ -45,29 +45,30 @@ import org.apache.hadoop.hbase.util.ReflectionUtils;
import org.apache.hadoop.hbase.util.Strings; import org.apache.hadoop.hbase.util.Strings;
import org.apache.hadoop.hbase.util.VersionInfo; import org.apache.hadoop.hbase.util.VersionInfo;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.jmx.MBeanContainer;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine; import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter; import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
import org.apache.hbase.thirdparty.org.apache.commons.cli.Options; import org.apache.hbase.thirdparty.org.apache.commons.cli.Options;
import org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException; import org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException;
import org.apache.hbase.thirdparty.org.apache.commons.cli.PosixParser; import org.apache.hbase.thirdparty.org.apache.commons.cli.PosixParser;
import org.apache.hbase.thirdparty.org.eclipse.jetty.http.HttpVersion;
import org.apache.hbase.thirdparty.org.eclipse.jetty.jmx.MBeanContainer;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConfiguration;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SecureRequestCustomizer;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SslConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.FilterHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ssl.SslContextFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.apache.hbase.thirdparty.org.glassfish.jersey.server.ResourceConfig;
import org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer;
/** /**
* Main class for launching REST gateway as a servlet hosted by Jetty. * Main class for launching REST gateway as a servlet hosted by Jetty.

View File

@ -19,18 +19,17 @@
package org.apache.hadoop.hbase.rest; package org.apache.hadoop.hbase.rest;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.authorize.AuthorizationException; import org.apache.hadoop.security.authorize.AuthorizationException;
import org.apache.hadoop.security.authorize.ProxyUsers; import org.apache.hadoop.security.authorize.ProxyUsers;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer; import org.apache.hbase.thirdparty.org.glassfish.jersey.server.ResourceConfig;
import org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer;
/** /**
* REST servlet container. It is used to get the remote request user * REST servlet container. It is used to get the remote request user

View File

@ -21,15 +21,14 @@ package org.apache.hadoop.hbase.rest.model;
import java.io.IOException; import java.io.IOException;
import java.io.Serializable; import java.io.Serializable;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hadoop.hbase.rest.ProtobufMessageHandler; import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
import org.apache.hadoop.hbase.rest.RESTServlet; import org.apache.hadoop.hbase.rest.RESTServlet;
import org.glassfish.jersey.servlet.ServletContainer; import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.rest.protobuf.generated.VersionMessage.Version; import org.apache.hadoop.hbase.shaded.rest.protobuf.generated.VersionMessage.Version;

View File

@ -352,18 +352,6 @@
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
</dependency>
<dependency> <dependency>
<!-- For JspC used in ant task, then needed at compile /runtime <!-- For JspC used in ant task, then needed at compile /runtime
because the source code made from the JSP refers to its runtime because the source code made from the JSP refers to its runtime

View File

@ -21,6 +21,7 @@ import static org.apache.hadoop.hbase.HConstants.DEFAULT_HBASE_SPLIT_COORDINATED
import static org.apache.hadoop.hbase.HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS; import static org.apache.hadoop.hbase.HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS;
import static org.apache.hadoop.hbase.HConstants.HBASE_SPLIT_WAL_COORDINATED_BY_ZK; import static org.apache.hadoop.hbase.HConstants.HBASE_SPLIT_WAL_COORDINATED_BY_ZK;
import static org.apache.hadoop.hbase.util.DNS.MASTER_HOSTNAME_KEY; import static org.apache.hadoop.hbase.util.DNS.MASTER_HOSTNAME_KEY;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException; import java.io.InterruptedIOException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@ -220,12 +221,9 @@ import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
import org.apache.hadoop.hbase.zookeeper.ZNodePaths; import org.apache.hadoop.hbase.zookeeper.ZNodePaths;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.webapp.WebAppContext;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
import org.apache.hbase.thirdparty.com.google.common.collect.Lists; import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
import org.apache.hbase.thirdparty.com.google.common.collect.Maps; import org.apache.hbase.thirdparty.com.google.common.collect.Maps;
@ -233,6 +231,11 @@ import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
import org.apache.hbase.thirdparty.com.google.protobuf.Descriptors; import org.apache.hbase.thirdparty.com.google.protobuf.Descriptors;
import org.apache.hbase.thirdparty.com.google.protobuf.Service; import org.apache.hbase.thirdparty.com.google.protobuf.Service;
import org.apache.hbase.thirdparty.org.apache.commons.collections4.CollectionUtils; import org.apache.hbase.thirdparty.org.apache.commons.collections4.CollectionUtils;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.webapp.WebAppContext;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter; import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState; import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState;

View File

@ -85,6 +85,9 @@ allowed_expr+="|^mozilla/public-suffix-list.txt$"
allowed_expr+="|^digesterRules.xml$" allowed_expr+="|^digesterRules.xml$"
allowed_expr+="|^properties.dtd$" allowed_expr+="|^properties.dtd$"
allowed_expr+="|^PropertyList-1.0.dtd$" allowed_expr+="|^PropertyList-1.0.dtd$"
# Shaded jetty resources
allowed_expr+="|^about.html$"
allowed_expr+="|^jetty-dir.css$"
if [ -n "${allow_hadoop}" ]; then if [ -n "${allow_hadoop}" ]; then

View File

@ -59,6 +59,10 @@
need not be included --> need not be included -->
<exclude>javax.annotation:javax.annotation-api</exclude> <exclude>javax.annotation:javax.annotation-api</exclude>
<exclude>javax.activation:javax.activation-api</exclude> <exclude>javax.activation:javax.activation-api</exclude>
<exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
<!-- <!--
Tell the shade plugin that in this case we want to include hadoop Tell the shade plugin that in this case we want to include hadoop
by leaving out the exclude. by leaving out the exclude.
@ -73,6 +77,7 @@
<exclude>org.apache.yetus:*</exclude> <exclude>org.apache.yetus:*</exclude>
<exclude>log4j:*</exclude> <exclude>log4j:*</exclude>
<exclude>commons-logging:*</exclude> <exclude>commons-logging:*</exclude>
<exclude>org.javassist:*</exclude>
</excludes> </excludes>
</artifactSet> </artifactSet>
</configuration> </configuration>
@ -85,7 +90,6 @@
<dependency> <dependency>
<groupId>org.apache.hbase</groupId> <groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId> <artifactId>hbase-client</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -203,6 +203,10 @@
need not be included --> need not be included -->
<exclude>javax.annotation:javax.annotation-api</exclude> <exclude>javax.annotation:javax.annotation-api</exclude>
<exclude>javax.activation:javax.activation-api</exclude> <exclude>javax.activation:javax.activation-api</exclude>
<exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
<!-- <!--
Tell the shade plugin that in this case we want to include hadoop Tell the shade plugin that in this case we want to include hadoop
by leaving out the exclude. by leaving out the exclude.
@ -217,6 +221,7 @@
<exclude>org.apache.yetus:*</exclude> <exclude>org.apache.yetus:*</exclude>
<exclude>log4j:*</exclude> <exclude>log4j:*</exclude>
<exclude>commons-logging:*</exclude> <exclude>commons-logging:*</exclude>
<exclude>org.javassist:*</exclude>
</excludes> </excludes>
</artifactSet> </artifactSet>
</configuration> </configuration>

View File

@ -85,6 +85,9 @@ allowed_expr+="|^mozilla/public-suffix-list.txt$"
allowed_expr+="|^digesterRules.xml$" allowed_expr+="|^digesterRules.xml$"
allowed_expr+="|^properties.dtd$" allowed_expr+="|^properties.dtd$"
allowed_expr+="|^PropertyList-1.0.dtd$" allowed_expr+="|^PropertyList-1.0.dtd$"
# Shaded jetty resources
allowed_expr+="|^about.html$"
allowed_expr+="|^jetty-dir.css$"
if [ -n "${allow_hadoop}" ]; then if [ -n "${allow_hadoop}" ]; then

View File

@ -119,6 +119,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions> <executions>
<execution> <execution>
<id>aggregate-into-a-jar-with-relocated-third-parties</id> <id>aggregate-into-a-jar-with-relocated-third-parties</id>
@ -138,6 +139,10 @@
need not be included --> need not be included -->
<exclude>javax.annotation:javax.annotation-api</exclude> <exclude>javax.annotation:javax.annotation-api</exclude>
<exclude>javax.activation:javax.activation-api</exclude> <exclude>javax.activation:javax.activation-api</exclude>
<exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
<!-- default to excluding Hadoop, have module that want <!-- default to excluding Hadoop, have module that want
to include it redefine the exclude list --> to include it redefine the exclude list -->
<exclude>org.apache.hadoop:*</exclude> <exclude>org.apache.hadoop:*</exclude>
@ -152,6 +157,7 @@
<exclude>org.apache.yetus:*</exclude> <exclude>org.apache.yetus:*</exclude>
<exclude>log4j:*</exclude> <exclude>log4j:*</exclude>
<exclude>commons-logging:*</exclude> <exclude>commons-logging:*</exclude>
<exclude>org.javassist:*</exclude>
</excludes> </excludes>
</artifactSet> </artifactSet>
<relocations> <relocations>

View File

@ -210,31 +210,15 @@
<groupId>org.apache.thrift</groupId> <groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId> <artifactId>libthrift</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.github.stephenc.findbugs</groupId> <groupId>com.github.stephenc.findbugs</groupId>
<artifactId>findbugs-annotations</artifactId> <artifactId>findbugs-annotations</artifactId>

View File

@ -89,7 +89,6 @@ import javax.security.auth.callback.Callback;
import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.sasl.AuthorizeCallback; import javax.security.sasl.AuthorizeCallback;
import javax.security.sasl.SaslServer; import javax.security.sasl.SaslServer;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured; import org.apache.hadoop.conf.Configured;
@ -129,17 +128,6 @@ import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TServerTransport;
import org.apache.thrift.transport.TTransportFactory; import org.apache.thrift.transport.TTransportFactory;
import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceAudience;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -152,6 +140,17 @@ import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLineParser;
import org.apache.hbase.thirdparty.org.apache.commons.cli.DefaultParser; import org.apache.hbase.thirdparty.org.apache.commons.cli.DefaultParser;
import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter; import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
import org.apache.hbase.thirdparty.org.apache.commons.cli.Options; import org.apache.hbase.thirdparty.org.apache.commons.cli.Options;
import org.apache.hbase.thirdparty.org.eclipse.jetty.http.HttpVersion;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConfiguration;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.HttpConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SecureRequestCustomizer;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.Server;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.ServerConnector;
import org.apache.hbase.thirdparty.org.eclipse.jetty.server.SslConnectionFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletContextHandler;
import org.apache.hbase.thirdparty.org.eclipse.jetty.servlet.ServletHolder;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.ssl.SslContextFactory;
import org.apache.hbase.thirdparty.org.eclipse.jetty.util.thread.QueuedThreadPool;
/** /**
* ThriftServer- this class starts up a Thrift server which implements the * ThriftServer- this class starts up a Thrift server which implements the

144
pom.xml
View File

@ -1148,6 +1148,45 @@
</rules> </rules>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>banned-jetty</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.eclipse.jetty:**</exclude>
</excludes>
<message>
Use shaded jetty instead
</message>
<searchTransitive>false</searchTransitive>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>banned-jersey</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>>org.glassfish.jersey.containers:**</exclude>
<exclude>>org.glassfish.jersey.core:**</exclude>
</excludes>
<message>
Use shaded jersey instead
</message>
<searchTransitive>false</searchTransitive>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution> <execution>
<id>check-aggregate-license</id> <id>check-aggregate-license</id>
<!-- must check after LICENSE is built at 'generate-resources' --> <!-- must check after LICENSE is built at 'generate-resources' -->
@ -1262,6 +1301,22 @@
<bannedImport>org.htrace.**</bannedImport> <bannedImport>org.htrace.**</bannedImport>
</bannedImports> </bannedImports>
</restrictImports> </restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
<includeTestCode>true</includeTestCode>
<commentLineBufferSize>512</commentLineBufferSize>
<reason>Use shaded jetty in hbase-thirdparty</reason>
<bannedImports>
<bannedImport>org.eclipse.jetty.**</bannedImport>
</bannedImports>
</restrictImports>
<restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
<includeTestCode>true</includeTestCode>
<commentLineBufferSize>512</commentLineBufferSize>
<reason>Use shaded jersey in hbase-thirdparty</reason>
<bannedImports>
<bannedImport>org.glassfish.jersey.**</bannedImport>
</bannedImports>
</restrictImports>
</rules> </rules>
</configuration> </configuration>
</execution> </execution>
@ -1545,12 +1600,9 @@
<metrics-core.version>3.2.6</metrics-core.version> <metrics-core.version>3.2.6</metrics-core.version>
<jackson.version>2.10.1</jackson.version> <jackson.version>2.10.1</jackson.version>
<jackson.databind.version>2.10.1</jackson.databind.version> <jackson.databind.version>2.10.1</jackson.databind.version>
<jaxb-api.version>2.2.12</jaxb-api.version> <jaxb-api.version>2.3.1</jaxb-api.version>
<jetty.version>9.3.28.v20191105</jetty.version>
<servlet.api.version>3.1.0</servlet.api.version> <servlet.api.version>3.1.0</servlet.api.version>
<wx.rs.api.version>2.0.1</wx.rs.api.version> <wx.rs.api.version>2.1.1</wx.rs.api.version>
<!-- Jersey 2.26 requires jetty 9.4 which breaks hadoop. Tread lightly. -->
<jersey.version>2.25.1</jersey.version>
<glassfish.jsp.version>2.3.2</glassfish.jsp.version> <glassfish.jsp.version>2.3.2</glassfish.jsp.version>
<glassfish.el.version>3.0.1-b08</glassfish.el.version> <glassfish.el.version>3.0.1-b08</glassfish.el.version>
<jruby.version>9.1.17.0</jruby.version> <jruby.version>9.1.17.0</jruby.version>
@ -1603,7 +1655,7 @@
<surefire.version>3.0.0-M4</surefire.version> <surefire.version>3.0.0-M4</surefire.version>
<wagon.ssh.version>2.12</wagon.ssh.version> <wagon.ssh.version>2.12</wagon.ssh.version>
<xml.maven.version>1.0.1</xml.maven.version> <xml.maven.version>1.0.1</xml.maven.version>
<hbase-thirdparty.version>3.3.0</hbase-thirdparty.version> <hbase-thirdparty.version>3.4.0</hbase-thirdparty.version>
<!-- Intraproject jar naming properties --> <!-- Intraproject jar naming properties -->
<!-- TODO this is pretty ugly, but works for the moment. <!-- TODO this is pretty ugly, but works for the moment.
Modules are pretty heavy-weight things, so doing this work isn't too bad. --> Modules are pretty heavy-weight things, so doing this work isn't too bad. -->
@ -1663,8 +1715,8 @@
<!-- Surefire argLine defaults to Linux, cygwin argLine is used in the os.windows profile --> <!-- Surefire argLine defaults to Linux, cygwin argLine is used in the os.windows profile -->
<argLine>${hbase-surefire.argLine}</argLine> <argLine>${hbase-surefire.argLine}</argLine>
<jacoco.version>0.7.5.201505241946</jacoco.version> <jacoco.version>0.7.5.201505241946</jacoco.version>
<extra.enforcer.version>1.0-beta-9</extra.enforcer.version> <extra.enforcer.version>1.3</extra.enforcer.version>
<enforcer.version>3.0.0-M2</enforcer.version> <enforcer.version>3.0.0-M3</enforcer.version>
<restrict-imports.enforcer.version>0.14.0</restrict-imports.enforcer.version> <restrict-imports.enforcer.version>0.14.0</restrict-imports.enforcer.version>
<!-- Location of test resources --> <!-- Location of test resources -->
<test.build.classes>${project.build.directory}/test-classes</test.build.classes> <test.build.classes>${project.build.directory}/test-classes</test.build.classes>
@ -2172,72 +2224,6 @@
<artifactId>javax.annotation-api</artifactId> <artifactId>javax.annotation-api</artifactId>
<version>1.2</version> <version>1.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jmx</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util-ajax</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency> <dependency>
<!--This lib has JspC in it. Needed precompiling jsps in hbase-rest, etc.--> <!--This lib has JspC in it. Needed precompiling jsps in hbase-rest, etc.-->
<groupId>org.glassfish.web</groupId> <groupId>org.glassfish.web</groupId>
@ -2403,6 +2389,16 @@
<artifactId>hbase-shaded-protobuf</artifactId> <artifactId>hbase-shaded-protobuf</artifactId>
<version>${hbase-thirdparty.version}</version> <version>${hbase-thirdparty.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-shaded-jetty</artifactId>
<version>${hbase-thirdparty.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-shaded-jersey</artifactId>
<version>${hbase-thirdparty.version}</version>
</dependency>
<dependency> <dependency>
<groupId>com.sun.xml.ws</groupId> <groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId> <artifactId>jaxws-ri</artifactId>