HBASE-24215 [Flakey Tests] [ERROR] TestSecureRESTServer java.lang.NoClassDefFoundError: com/sun/jersey/core/spi/factory/AbstractRuntimeDelegate
Addendum: Add jersey-servlet to hadoop3 profile. Made the hadoop3 profile in top-level pom same as it is for hadoop2 when it comes to exclusions. Then backed out previous attempt mostly. Made the failing test medium-sized so it ran in its own jvm.
This commit is contained in:
parent
3781ac9dac
commit
9cff7a4ff4
|
@ -192,27 +192,11 @@
|
|||
<exclusions>
|
||||
<!--This dependency pulls in hadoop-minicluster
|
||||
which pulls in the below. It messes up
|
||||
this build at assembly time. See HBASE-22029-->
|
||||
this build at assembly time. See HBASE-22029 -->
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-server</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-json</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey.contribs</groupId>
|
||||
<artifactId>jersey-guice</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -443,24 +427,8 @@
|
|||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
</exclusion>
|
||||
<!--
|
||||
Can't exclude this one; dependency on com.sun.xml package
|
||||
included from here.
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-json</artifactId>
|
||||
</exclusion>
|
||||
-->
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey.contribs</groupId>
|
||||
<artifactId>jersey-guice</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-server</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
@ -476,6 +444,18 @@
|
|||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-auth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--Fixes complaint when running TestSecureRESTServer-->
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-servlet</artifactId>
|
||||
<version>1.19.4</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
|
|
|
@ -118,7 +118,7 @@ public class RESTServer implements Constants {
|
|||
HelpFormatter formatter = new HelpFormatter();
|
||||
formatter.printHelp("hbase rest start", "", options,
|
||||
"\nTo run the REST server as a daemon, execute " +
|
||||
"hbase-daemon.sh start|stop rest [--infoport <port>] [-p <port>] [-ro]\n", true);
|
||||
"hbase-daemon.sh start|stop rest [-i <port>] [-p <port>] [-ro]\n", true);
|
||||
System.exit(exitCode);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ public class RESTServer implements Constants {
|
|||
options.addOption("p", "port", true, "Port to bind to [default: " + DEFAULT_LISTEN_PORT + "]");
|
||||
options.addOption("ro", "readonly", false, "Respond only to GET HTTP " +
|
||||
"method requests [default: false]");
|
||||
options.addOption(null, "infoport", true, "Port for web UI");
|
||||
options.addOption("i", "infoport", true, "Port for WEB UI");
|
||||
|
||||
CommandLine commandLine = null;
|
||||
try {
|
||||
|
@ -218,7 +218,7 @@ public class RESTServer implements Constants {
|
|||
String val = commandLine.getOptionValue("infoport");
|
||||
conf.setInt("hbase.rest.info.port", Integer.parseInt(val));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Web UI port set to " + val);
|
||||
LOG.debug("WEB UI port set to " + val);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ import org.apache.hadoop.hbase.security.access.AccessControlConstants;
|
|||
import org.apache.hadoop.hbase.security.access.AccessController;
|
||||
import org.apache.hadoop.hbase.security.access.Permission.Action;
|
||||
import org.apache.hadoop.hbase.security.token.TokenProvider;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MiscTests;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.Pair;
|
||||
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
||||
|
@ -101,7 +101,7 @@ import org.slf4j.LoggerFactory;
|
|||
* Test class for SPNEGO authentication on the HttpServer. Uses Kerby's MiniKDC and Apache
|
||||
* HttpComponents to verify that a simple Servlet is reachable via SPNEGO and unreachable w/o.
|
||||
*/
|
||||
@Category({MiscTests.class, SmallTests.class})
|
||||
@Category({MiscTests.class, MediumTests.class})
|
||||
public class TestSecureRESTServer {
|
||||
|
||||
@ClassRule
|
||||
|
|
|
@ -668,6 +668,7 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
|||
// Frustrate yarn's and hdfs's attempts at writing /tmp.
|
||||
// Below is fragile. Make it so we just interpolate any 'tmp' reference.
|
||||
createDirAndSetProperty("yarn.node-labels.fs-store.root-dir");
|
||||
createDirAndSetProperty("yarn.node-attribute.fs-store.root-dir");
|
||||
createDirAndSetProperty("yarn.nodemanager.log-dirs");
|
||||
createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
|
||||
createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.active-dir");
|
||||
|
|
|
@ -42,7 +42,9 @@ public class TestBindExceptionHandling {
|
|||
createBoundServer(true, false);
|
||||
assertNotNull(thriftServer.tserver);
|
||||
} finally {
|
||||
thriftServer.stop();
|
||||
if (thriftServer != null) {
|
||||
thriftServer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +59,9 @@ public class TestBindExceptionHandling {
|
|||
createBoundServer(false, true);
|
||||
assertNotNull(thriftServer.tserver);
|
||||
} finally {
|
||||
thriftServer.stop();
|
||||
if (thriftServer != null) {
|
||||
thriftServer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
12
pom.xml
12
pom.xml
|
@ -2625,6 +2625,10 @@
|
|||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
|
@ -2656,6 +2660,10 @@
|
|||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -2673,6 +2681,10 @@
|
|||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue