svn merge -c 1415742 FIXES: YARN-251. Proxy URI generation fails for blank tracking URIs. Contributed by Tom White
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1415745 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
232cc5d59c
commit
74122abb1f
|
@ -179,6 +179,9 @@ Release 0.23.6 - UNRELEASED
|
|||
YARN-204. test coverage for org.apache.hadoop.tools (Aleksey Gorshkov via
|
||||
bobby)
|
||||
|
||||
YARN-251. Proxy URI generation fails for blank tracking URIs (Tom White
|
||||
via jlowe)
|
||||
|
||||
Release 0.23.5 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
|||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -399,7 +400,7 @@ public class RMAppAttemptImpl implements RMAppAttempt {
|
|||
final String trackingUriWithoutScheme) {
|
||||
this.readLock.lock();
|
||||
try {
|
||||
URI trackingUri = trackingUriWithoutScheme == null ? null :
|
||||
URI trackingUri = StringUtils.isEmpty(trackingUriWithoutScheme) ? null :
|
||||
ProxyUriUtils.getUriFromAMUrl(trackingUriWithoutScheme);
|
||||
String proxy = YarnConfiguration.getProxyHostAndPort(conf);
|
||||
URI proxyUri = ProxyUriUtils.getUriFromAMUrl(proxy);
|
||||
|
|
|
@ -638,6 +638,14 @@ public class TestRMAppAttemptTransitions {
|
|||
"Killed by user");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testNoTrackingUrl() {
|
||||
Container amContainer = allocateApplicationAttempt();
|
||||
launchApplicationAttempt(amContainer);
|
||||
runApplicationAttempt(amContainer, "host", 8042, "");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnregisterToSuccessfulFinishing() {
|
||||
Container amContainer = allocateApplicationAttempt();
|
||||
|
|
Loading…
Reference in New Issue