MAPREDUCE-6733. MapReduce JerseyTest tests failing with java.net.BindException: Address already in use. Contributed by Vinod Kumar Vavilapalli.
This commit is contained in:
parent
a72cb3825a
commit
1d053836b1
@ -35,6 +35,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.app.MockAppContext;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -54,7 +55,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@
|
||||
* /ws/v1/mapreduce
|
||||
* /ws/v1/mapreduce/info
|
||||
*/
|
||||
public class TestAMWebServices extends JerseyTest {
|
||||
public class TestAMWebServices extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static MockAppContext appContext;
|
||||
|
@ -45,6 +45,7 @@
|
||||
import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONObject;
|
||||
import org.junit.Before;
|
||||
@ -60,7 +61,6 @@
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -69,7 +69,7 @@
|
||||
*
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/state
|
||||
*/
|
||||
public class TestAMWebServicesAttempt extends JerseyTest {
|
||||
public class TestAMWebServicesAttempt extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static AppContext appContext;
|
||||
|
@ -43,9 +43,9 @@
|
||||
import org.apache.hadoop.mapreduce.v2.app.job.Task;
|
||||
import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt;
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.util.ConverterUtils;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -60,11 +60,10 @@
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.servlet.ServletModule;
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
import com.sun.jersey.api.client.ClientResponse.Status;
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.api.client.ClientResponse.Status;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -75,7 +74,7 @@
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/counters
|
||||
*/
|
||||
public class TestAMWebServicesAttempts extends JerseyTest {
|
||||
public class TestAMWebServicesAttempts extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static AppContext appContext;
|
||||
|
@ -45,6 +45,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -62,7 +63,6 @@
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -71,7 +71,7 @@
|
||||
*
|
||||
* /ws/v1/mapreduce/job/{jobid}/conf
|
||||
*/
|
||||
public class TestAMWebServicesJobConf extends JerseyTest {
|
||||
public class TestAMWebServicesJobConf extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static AppContext appContext;
|
||||
|
@ -47,6 +47,7 @@
|
||||
import org.apache.hadoop.yarn.util.Times;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -65,7 +66,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/counters
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/jobattempts
|
||||
*/
|
||||
public class TestAMWebServicesJobs extends JerseyTest {
|
||||
public class TestAMWebServicesJobs extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static AppContext appContext;
|
||||
|
@ -43,6 +43,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -61,7 +62,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -72,7 +72,7 @@
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}
|
||||
* /ws/v1/mapreduce/jobs/{jobid}/tasks/{taskid}/counters
|
||||
*/
|
||||
public class TestAMWebServicesTasks extends JerseyTest {
|
||||
public class TestAMWebServicesTasks extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static AppContext appContext;
|
||||
|
@ -37,6 +37,7 @@
|
||||
import org.apache.hadoop.util.VersionInfo;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
@ -55,7 +56,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@
|
||||
* /ws/v1/history
|
||||
* /ws/v1/history/info
|
||||
*/
|
||||
public class TestHsWebServices extends JerseyTest {
|
||||
public class TestHsWebServices extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static HistoryContext appContext;
|
||||
|
@ -45,9 +45,9 @@
|
||||
import org.apache.hadoop.mapreduce.v2.hs.HistoryContext;
|
||||
import org.apache.hadoop.mapreduce.v2.hs.MockHistoryContext;
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.util.ConverterUtils;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
@ -67,7 +67,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -79,7 +78,7 @@
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/
|
||||
* counters
|
||||
*/
|
||||
public class TestHsWebServicesAttempts extends JerseyTest {
|
||||
public class TestHsWebServicesAttempts extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static HistoryContext appContext;
|
||||
|
@ -48,6 +48,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
@ -66,7 +67,6 @@
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@
|
||||
*
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/conf
|
||||
*/
|
||||
public class TestHsWebServicesJobConf extends JerseyTest {
|
||||
public class TestHsWebServicesJobConf extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static HistoryContext appContext;
|
||||
|
@ -43,9 +43,9 @@
|
||||
import org.apache.hadoop.mapreduce.v2.hs.HistoryContext;
|
||||
import org.apache.hadoop.mapreduce.v2.hs.MockHistoryContext;
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
@ -65,7 +65,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -76,7 +75,7 @@
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/counters
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/jobattempts
|
||||
*/
|
||||
public class TestHsWebServicesJobs extends JerseyTest {
|
||||
public class TestHsWebServicesJobs extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static MockHistoryContext appContext;
|
||||
|
@ -41,6 +41,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
@ -55,7 +56,6 @@
|
||||
import com.sun.jersey.api.client.ClientResponse.Status;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -64,7 +64,7 @@
|
||||
*
|
||||
* /ws/v1/history/mapreduce/jobs?{query=value}
|
||||
*/
|
||||
public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||
public class TestHsWebServicesJobsQuery extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static MockHistoryContext appContext;
|
||||
|
@ -46,6 +46,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.webapp.GenericExceptionHandler;
|
||||
import org.apache.hadoop.yarn.webapp.GuiceServletConfig;
|
||||
import org.apache.hadoop.yarn.webapp.JerseyTestBase;
|
||||
import org.apache.hadoop.yarn.webapp.WebApp;
|
||||
import org.apache.hadoop.yarn.webapp.WebServicesTestUtils;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
@ -65,7 +66,6 @@
|
||||
import com.sun.jersey.api.client.UniformInterfaceException;
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import com.sun.jersey.test.framework.JerseyTest;
|
||||
import com.sun.jersey.test.framework.WebAppDescriptor;
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}
|
||||
* /ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/counters
|
||||
*/
|
||||
public class TestHsWebServicesTasks extends JerseyTest {
|
||||
public class TestHsWebServicesTasks extends JerseyTestBase {
|
||||
|
||||
private static Configuration conf = new Configuration();
|
||||
private static MockHistoryContext appContext;
|
||||
|
Loading…
Reference in New Issue
Block a user