Skip to content

Commit

Permalink
HADOOP-19405. Revert Mapreduce、Yarn Commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
slfan1989 committed Feb 2, 2025
1 parent b0c6e5b commit 629debf
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
import java.util.Set;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.NotAcceptableException;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.ServiceUnavailableException;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Response;
import static javax.ws.rs.core.Response.Status.NOT_ACCEPTABLE;
import static javax.ws.rs.core.Response.Status.NOT_FOUND;
import static javax.ws.rs.core.Response.Status.SERVICE_UNAVAILABLE;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

Expand Down Expand Up @@ -231,15 +231,15 @@ public void testInvalidUri2() throws JSONException, Exception {

@Test
public void testInvalidAccept() throws JSONException, Exception {
WebTarget r = targetWithJsonObject();
WebTarget r = target();
String responseStr = "";
try {
responseStr = r.path("ws").path("v1").path("mapreduce")
.request(MediaType.TEXT_PLAIN).get(String.class);
fail("should have thrown exception on invalid uri");
} catch (NotAcceptableException sue) {
} catch (ServiceUnavailableException sue) {
Response response = sue.getResponse();
assertResponseStatusCode(NOT_ACCEPTABLE, response.getStatusInfo());
assertResponseStatusCode(SERVICE_UNAVAILABLE, response.getStatusInfo());
WebServicesTestUtils.checkStringMatch(
"error string exists and shouldn't", "", responseStr);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

import static org.apache.hadoop.yarn.webapp.WebServicesTestUtils.assertResponseStatusCode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;

import java.io.StringReader;

import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.NotAcceptableException;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.ServiceUnavailableException;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
Expand Down Expand Up @@ -233,12 +232,12 @@ public void testInvalidAccept() throws JSONException, Exception {
WebTarget r = target();
String responseStr = "";
try {
responseStr = r.path("ws").path("v1").path("history").
request(MediaType.TEXT_PLAIN).get(String.class);
fail("should have thrown exception on invalid uri");
} catch (NotAcceptableException ue) {
Response response =
r.path("ws").path("v1").path("history").request(MediaType.TEXT_PLAIN).get();
throw new ServiceUnavailableException(response);
} catch (ServiceUnavailableException ue) {
Response response = ue.getResponse();
assertResponseStatusCode(Response.Status.NOT_ACCEPTABLE,
assertResponseStatusCode(Response.Status.SERVICE_UNAVAILABLE,
response.getStatusInfo());
WebServicesTestUtils.checkStringMatch(
"error string exists and shouldn't", "", responseStr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ public ApplicationEntity(TimelineEntity entity) {
}

public String getQueue() {
if (getInfo() != null) {
if (getInfo().containsKey(QUEUE_INFO_KEY)) {
return getInfo().get(QUEUE_INFO_KEY).toString();
}
}
return "";
return getInfo().get(QUEUE_INFO_KEY).toString();
}

public void setQueue(String queue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,7 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

</project>
5 changes: 0 additions & 5 deletions hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Loading

0 comments on commit 629debf

Please sign in to comment.