|
@@ -381,7 +381,7 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
|
this.readLock = lock.readLock();
|
|
this.readLock = lock.readLock();
|
|
this.writeLock = lock.writeLock();
|
|
this.writeLock = lock.writeLock();
|
|
|
|
|
|
- this.proxiedTrackingUrl = generateProxyUriWithoutScheme();
|
|
|
|
|
|
+ this.proxiedTrackingUrl = generateProxyUriWithScheme(null);
|
|
|
|
|
|
this.stateMachine = stateMachineFactory.make(this);
|
|
this.stateMachine = stateMachineFactory.make(this);
|
|
this.user = user;
|
|
this.user = user;
|
|
@@ -470,11 +470,7 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private String generateProxyUriWithoutScheme() {
|
|
|
|
- return generateProxyUriWithoutScheme(null);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private String generateProxyUriWithoutScheme(
|
|
|
|
|
|
+ private String generateProxyUriWithScheme(
|
|
final String trackingUriWithoutScheme) {
|
|
final String trackingUriWithoutScheme) {
|
|
this.readLock.lock();
|
|
this.readLock.lock();
|
|
try {
|
|
try {
|
|
@@ -484,8 +480,7 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
|
URI proxyUri = ProxyUriUtils.getUriFromAMUrl(proxy);
|
|
URI proxyUri = ProxyUriUtils.getUriFromAMUrl(proxy);
|
|
URI result = ProxyUriUtils.getProxyUri(trackingUri, proxyUri,
|
|
URI result = ProxyUriUtils.getProxyUri(trackingUri, proxyUri,
|
|
applicationAttemptId.getApplicationId());
|
|
applicationAttemptId.getApplicationId());
|
|
- //We need to strip off the scheme to have it match what was there before
|
|
|
|
- return result.toASCIIString().substring(HttpConfig.getSchemePrefix().length());
|
|
|
|
|
|
+ return result.toASCIIString();
|
|
} catch (URISyntaxException e) {
|
|
} catch (URISyntaxException e) {
|
|
LOG.warn("Could not proxify "+trackingUriWithoutScheme,e);
|
|
LOG.warn("Could not proxify "+trackingUriWithoutScheme,e);
|
|
return trackingUriWithoutScheme;
|
|
return trackingUriWithoutScheme;
|
|
@@ -1006,7 +1001,7 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
|
appAttempt.origTrackingUrl =
|
|
appAttempt.origTrackingUrl =
|
|
sanitizeTrackingUrl(registrationEvent.getTrackingurl());
|
|
sanitizeTrackingUrl(registrationEvent.getTrackingurl());
|
|
appAttempt.proxiedTrackingUrl =
|
|
appAttempt.proxiedTrackingUrl =
|
|
- appAttempt.generateProxyUriWithoutScheme(appAttempt.origTrackingUrl);
|
|
|
|
|
|
+ appAttempt.generateProxyUriWithScheme(appAttempt.origTrackingUrl);
|
|
|
|
|
|
// Let the app know
|
|
// Let the app know
|
|
appAttempt.eventHandler.handle(new RMAppEvent(appAttempt
|
|
appAttempt.eventHandler.handle(new RMAppEvent(appAttempt
|
|
@@ -1142,7 +1137,7 @@ public class RMAppAttemptImpl implements RMAppAttempt, Recoverable {
|
|
appAttempt.origTrackingUrl =
|
|
appAttempt.origTrackingUrl =
|
|
sanitizeTrackingUrl(unregisterEvent.getTrackingUrl());
|
|
sanitizeTrackingUrl(unregisterEvent.getTrackingUrl());
|
|
appAttempt.proxiedTrackingUrl =
|
|
appAttempt.proxiedTrackingUrl =
|
|
- appAttempt.generateProxyUriWithoutScheme(appAttempt.origTrackingUrl);
|
|
|
|
|
|
+ appAttempt.generateProxyUriWithScheme(appAttempt.origTrackingUrl);
|
|
appAttempt.finalStatus = unregisterEvent.getFinalApplicationStatus();
|
|
appAttempt.finalStatus = unregisterEvent.getFinalApplicationStatus();
|
|
|
|
|
|
// Tell the app
|
|
// Tell the app
|