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
|
@ -197,22 +197,6 @@
|
||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.sun.jersey</groupId>
|
||||||
<artifactId>jersey-core</artifactId>
|
<artifactId>jersey-core</artifactId>
|
||||||
</exclusion>
|
</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>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -443,24 +427,8 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>com.sun.jersey</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>jersey-client</artifactId>
|
<artifactId>guava</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>
|
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -476,6 +444,18 @@
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>hadoop-auth</artifactId>
|
<artifactId>hadoop-auth</artifactId>
|
||||||
</dependency>
|
</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>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class RESTServer implements Constants {
|
||||||
HelpFormatter formatter = new HelpFormatter();
|
HelpFormatter formatter = new HelpFormatter();
|
||||||
formatter.printHelp("hbase rest start", "", options,
|
formatter.printHelp("hbase rest start", "", options,
|
||||||
"\nTo run the REST server as a daemon, execute " +
|
"\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);
|
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("p", "port", true, "Port to bind to [default: " + DEFAULT_LISTEN_PORT + "]");
|
||||||
options.addOption("ro", "readonly", false, "Respond only to GET HTTP " +
|
options.addOption("ro", "readonly", false, "Respond only to GET HTTP " +
|
||||||
"method requests [default: false]");
|
"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;
|
CommandLine commandLine = null;
|
||||||
try {
|
try {
|
||||||
|
@ -218,7 +218,7 @@ public class RESTServer implements Constants {
|
||||||
String val = commandLine.getOptionValue("infoport");
|
String val = commandLine.getOptionValue("infoport");
|
||||||
conf.setInt("hbase.rest.info.port", Integer.parseInt(val));
|
conf.setInt("hbase.rest.info.port", Integer.parseInt(val));
|
||||||
if (LOG.isDebugEnabled()) {
|
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.AccessController;
|
||||||
import org.apache.hadoop.hbase.security.access.Permission.Action;
|
import org.apache.hadoop.hbase.security.access.Permission.Action;
|
||||||
import org.apache.hadoop.hbase.security.token.TokenProvider;
|
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.MiscTests;
|
||||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.hbase.util.Pair;
|
import org.apache.hadoop.hbase.util.Pair;
|
||||||
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
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
|
* 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.
|
* 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 {
|
public class TestSecureRESTServer {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
|
|
@ -668,6 +668,7 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
||||||
// Frustrate yarn's and hdfs's attempts at writing /tmp.
|
// Frustrate yarn's and hdfs's attempts at writing /tmp.
|
||||||
// Below is fragile. Make it so we just interpolate any 'tmp' reference.
|
// Below is fragile. Make it so we just interpolate any 'tmp' reference.
|
||||||
createDirAndSetProperty("yarn.node-labels.fs-store.root-dir");
|
createDirAndSetProperty("yarn.node-labels.fs-store.root-dir");
|
||||||
|
createDirAndSetProperty("yarn.node-attribute.fs-store.root-dir");
|
||||||
createDirAndSetProperty("yarn.nodemanager.log-dirs");
|
createDirAndSetProperty("yarn.nodemanager.log-dirs");
|
||||||
createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
|
createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
|
||||||
createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.active-dir");
|
createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.active-dir");
|
||||||
|
|
|
@ -42,9 +42,11 @@ public class TestBindExceptionHandling {
|
||||||
createBoundServer(true, false);
|
createBoundServer(true, false);
|
||||||
assertNotNull(thriftServer.tserver);
|
assertNotNull(thriftServer.tserver);
|
||||||
} finally {
|
} finally {
|
||||||
|
if (thriftServer != null) {
|
||||||
thriftServer.stop();
|
thriftServer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See if random port choosing works around protocol port clashes
|
* See if random port choosing works around protocol port clashes
|
||||||
|
@ -57,7 +59,9 @@ public class TestBindExceptionHandling {
|
||||||
createBoundServer(false, true);
|
createBoundServer(false, true);
|
||||||
assertNotNull(thriftServer.tserver);
|
assertNotNull(thriftServer.tserver);
|
||||||
} finally {
|
} finally {
|
||||||
|
if (thriftServer != null) {
|
||||||
thriftServer.stop();
|
thriftServer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
12
pom.xml
12
pom.xml
|
@ -2624,6 +2624,10 @@
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty</artifactId>
|
<artifactId>netty</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>javax.inject</groupId>
|
<groupId>javax.inject</groupId>
|
||||||
|
@ -2656,6 +2660,10 @@
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty</artifactId>
|
<artifactId>netty</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -2673,6 +2681,10 @@
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty</artifactId>
|
<artifactId>netty</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
Loading…
Reference in New Issue