HBASE-18615 hbase-rest tests fail in hbase-2.0.0-alpha2
This makes branch-2 same as master branch. Makes hbase-rest tests pass. Adds note on the jackson1 feature. Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
55ba5d0707
commit
0be04ab4a1
|
@ -235,7 +235,9 @@ public class RESTServer implements Constants {
|
|||
|
||||
parseCommandLine(args, servlet);
|
||||
|
||||
// set up the Jersey servlet container for Jetty
|
||||
// Set up the Jersey servlet container for Jetty
|
||||
// The Jackson1Feature is a signal to Jersey that it should use jackson doing json.
|
||||
// See here: https://stackoverflow.com/questions/39458230/how-register-jacksonfeature-on-clientconfig
|
||||
ResourceConfig application = new ResourceConfig().
|
||||
packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class);
|
||||
ServletHolder sh = new ServletHolder(new ServletContainer(application));
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.jetty.server.ServerConnector;
|
|||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
|
||||
import org.glassfish.jersey.jackson1.Jackson1Feature;
|
||||
import org.glassfish.jersey.server.ResourceConfig;
|
||||
import org.glassfish.jersey.servlet.ServletContainer;
|
||||
|
||||
|
@ -61,7 +62,8 @@ public class HBaseRESTTestingUtility {
|
|||
RESTServlet.getInstance(conf, UserProvider.instantiate(conf));
|
||||
|
||||
// set up the Jersey servlet container for Jetty
|
||||
ResourceConfig app = new ResourceConfig();
|
||||
ResourceConfig app = new ResourceConfig().
|
||||
packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class);
|
||||
ServletHolder sh = new ServletHolder(new ServletContainer(app));
|
||||
|
||||
// set up Jetty and run the embedded server
|
||||
|
|
Loading…
Reference in New Issue