HBASE-24215 [Flakey Tests] [ERROR] TestSecureRESTServer java.lang.NoClassDefFoundError: com/sun/jersey/core/spi/factory/AbstractRuntimeDelegate
Addendum #2: Add jersey-servlet to hadoop3 profile.
This commit is contained in:
parent
9e697d0ea6
commit
3b0812d3e1
|
@ -507,6 +507,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -731,6 +731,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,7 +42,9 @@ public class TestBindExceptionHandling {
|
||||||
createBoundServer(true, false);
|
createBoundServer(true, false);
|
||||||
assertNotNull(thriftServer.tserver);
|
assertNotNull(thriftServer.tserver);
|
||||||
} finally {
|
} finally {
|
||||||
thriftServer.stop();
|
if (thriftServer != null) {
|
||||||
|
thriftServer.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +59,9 @@ public class TestBindExceptionHandling {
|
||||||
createBoundServer(false, true);
|
createBoundServer(false, true);
|
||||||
assertNotNull(thriftServer.tserver);
|
assertNotNull(thriftServer.tserver);
|
||||||
} finally {
|
} finally {
|
||||||
thriftServer.stop();
|
if (thriftServer != null) {
|
||||||
|
thriftServer.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue