YARN-5243. fix several rebase and other miscellaneous issues before merge. (Sangjin Lee via Varun Saxena)
This commit is contained in:
parent
32b033d57c
commit
1ff6833bba
@ -822,6 +822,7 @@ private List<Container> getResources() throws Exception {
|
|||||||
|
|
||||||
handleUpdatedNodes(response);
|
handleUpdatedNodes(response);
|
||||||
handleJobPriorityChange(response);
|
handleJobPriorityChange(response);
|
||||||
|
// handle receiving the timeline collector address for this app
|
||||||
String collectorAddr = response.getCollectorAddr();
|
String collectorAddr = response.getCollectorAddr();
|
||||||
MRAppMaster.RunningAppContext appContext =
|
MRAppMaster.RunningAppContext appContext =
|
||||||
(MRAppMaster.RunningAppContext)this.getContext();
|
(MRAppMaster.RunningAppContext)this.getContext();
|
||||||
|
@ -552,9 +552,4 @@
|
|||||||
<Package name="org.apache.hadoop.yarn.api.records.impl.pb" />
|
<Package name="org.apache.hadoop.yarn.api.records.impl.pb" />
|
||||||
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
|
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
|
||||||
</Match>
|
</Match>
|
||||||
<!-- Object cast is based on the event type -->
|
|
||||||
<Match>
|
|
||||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.metrics.AbstractTimelineServicePublisher" />
|
|
||||||
<Bug pattern="BC_UNCONFIRMED_CAST" />
|
|
||||||
</Match>
|
|
||||||
</FindBugsFilter>
|
</FindBugsFilter>
|
||||||
|
@ -631,7 +631,7 @@ public void run() throws YarnException, IOException, InterruptedException {
|
|||||||
DSEvent.DS_APP_ATTEMPT_START);
|
DSEvent.DS_APP_ATTEMPT_START);
|
||||||
} else {
|
} else {
|
||||||
publishApplicationAttemptEvent(timelineClient, appAttemptID.toString(),
|
publishApplicationAttemptEvent(timelineClient, appAttemptID.toString(),
|
||||||
DSEvent.DS_APP_ATTEMPT_END, domainId, appSubmitterUgi);
|
DSEvent.DS_APP_ATTEMPT_START, domainId, appSubmitterUgi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,7 +684,12 @@ public Map<ApplicationId, String> getRegisteredCollectors() {
|
|||||||
|
|
||||||
public void addRegisteredCollectors(
|
public void addRegisteredCollectors(
|
||||||
Map<ApplicationId, String> newRegisteredCollectors) {
|
Map<ApplicationId, String> newRegisteredCollectors) {
|
||||||
|
if (registeredCollectors != null) {
|
||||||
this.registeredCollectors.putAll(newRegisteredCollectors);
|
this.registeredCollectors.putAll(newRegisteredCollectors);
|
||||||
|
} else {
|
||||||
|
LOG.warn("collectors are added when the registered collectors are " +
|
||||||
|
"initialized");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -243,7 +243,6 @@ protected void serviceStop() throws Exception {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.serviceStop();
|
super.serviceStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +421,6 @@ public void run() {
|
|||||||
.entrySet()) {
|
.entrySet()) {
|
||||||
ContainerId containerId = entry.getKey();
|
ContainerId containerId = entry.getKey();
|
||||||
ProcessTreeInfo ptInfo = entry.getValue();
|
ProcessTreeInfo ptInfo = entry.getValue();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String pId = ptInfo.getPID();
|
String pId = ptInfo.getPID();
|
||||||
|
|
||||||
|
@ -111,7 +111,6 @@ public boolean isPmemCheckEnabled() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
||||||
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
||||||
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
||||||
@ -175,7 +174,6 @@ public boolean isPmemCheckEnabled() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
||||||
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
||||||
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
||||||
|
@ -30,10 +30,8 @@
|
|||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
import org.apache.hadoop.yarn.event.Dispatcher;
|
import org.apache.hadoop.yarn.event.Dispatcher;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.ahs.RMApplicationHistoryWriter;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.metrics.SystemMetricsPublisher;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMDelegatedNodeLabelsUpdater;
|
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMDelegatedNodeLabelsUpdater;
|
||||||
|
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementManager;
|
import org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementManager;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore;
|
import org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore;
|
import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore;
|
||||||
@ -95,8 +93,6 @@ public class RMActiveServiceContext {
|
|||||||
private NodesListManager nodesListManager;
|
private NodesListManager nodesListManager;
|
||||||
private ResourceTrackerService resourceTrackerService;
|
private ResourceTrackerService resourceTrackerService;
|
||||||
private ApplicationMasterService applicationMasterService;
|
private ApplicationMasterService applicationMasterService;
|
||||||
private RMApplicationHistoryWriter rmApplicationHistoryWriter;
|
|
||||||
private SystemMetricsPublisher systemMetricsPublisher;
|
|
||||||
private RMTimelineCollectorManager timelineCollectorManager;
|
private RMTimelineCollectorManager timelineCollectorManager;
|
||||||
|
|
||||||
private RMNodeLabelsManager nodeLabelManager;
|
private RMNodeLabelsManager nodeLabelManager;
|
||||||
@ -373,12 +369,6 @@ public boolean isWorkPreservingRecoveryEnabled() {
|
|||||||
return this.isWorkPreservingRecoveryEnabled;
|
return this.isWorkPreservingRecoveryEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Private
|
|
||||||
@Unstable
|
|
||||||
public RMApplicationHistoryWriter getRMApplicationHistoryWriter() {
|
|
||||||
return rmApplicationHistoryWriter;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public RMTimelineCollectorManager getRMTimelineCollectorManager() {
|
public RMTimelineCollectorManager getRMTimelineCollectorManager() {
|
||||||
@ -392,26 +382,6 @@ public void setRMTimelineCollectorManager(
|
|||||||
this.timelineCollectorManager = collectorManager;
|
this.timelineCollectorManager = collectorManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Private
|
|
||||||
@Unstable
|
|
||||||
public void setSystemMetricsPublisher(
|
|
||||||
SystemMetricsPublisher metricsPublisher) {
|
|
||||||
this.systemMetricsPublisher = metricsPublisher;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Private
|
|
||||||
@Unstable
|
|
||||||
public SystemMetricsPublisher getSystemMetricsPublisher() {
|
|
||||||
return systemMetricsPublisher;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Private
|
|
||||||
@Unstable
|
|
||||||
public void setRMApplicationHistoryWriter(
|
|
||||||
RMApplicationHistoryWriter rmApplicationHistoryWriter) {
|
|
||||||
this.rmApplicationHistoryWriter = rmApplicationHistoryWriter;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public long getEpoch() {
|
public long getEpoch() {
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.security.PrivilegedExceptionAction;
|
import java.security.PrivilegedExceptionAction;
|
||||||
|
import java.security.SecureRandom;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.BlockingQueue;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -123,15 +123,6 @@
|
|||||||
import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
|
import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
|
||||||
import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
|
import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.PrintStream;
|
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.security.PrivilegedExceptionAction;
|
|
||||||
import java.security.SecureRandom;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -312,6 +303,15 @@ protected void serviceInit(Configuration conf) throws Exception {
|
|||||||
addService(rmApplicationHistoryWriter);
|
addService(rmApplicationHistoryWriter);
|
||||||
rmContext.setRMApplicationHistoryWriter(rmApplicationHistoryWriter);
|
rmContext.setRMApplicationHistoryWriter(rmApplicationHistoryWriter);
|
||||||
|
|
||||||
|
// initialize the RM timeline collector first so that the system metrics
|
||||||
|
// publisher can bind to it
|
||||||
|
if (YarnConfiguration.timelineServiceV2Enabled(this.conf)) {
|
||||||
|
RMTimelineCollectorManager timelineCollectorManager =
|
||||||
|
createRMTimelineCollectorManager();
|
||||||
|
addService(timelineCollectorManager);
|
||||||
|
rmContext.setRMTimelineCollectorManager(timelineCollectorManager);
|
||||||
|
}
|
||||||
|
|
||||||
SystemMetricsPublisher systemMetricsPublisher =
|
SystemMetricsPublisher systemMetricsPublisher =
|
||||||
createSystemMetricsPublisher();
|
createSystemMetricsPublisher();
|
||||||
addIfService(systemMetricsPublisher);
|
addIfService(systemMetricsPublisher);
|
||||||
@ -602,18 +602,6 @@ protected void serviceInit(Configuration configuration) throws Exception {
|
|||||||
rmContext.setDelegationTokenRenewer(delegationTokenRenewer);
|
rmContext.setDelegationTokenRenewer(delegationTokenRenewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
RMApplicationHistoryWriter rmApplicationHistoryWriter =
|
|
||||||
createRMApplicationHistoryWriter();
|
|
||||||
addService(rmApplicationHistoryWriter);
|
|
||||||
rmContext.setRMApplicationHistoryWriter(rmApplicationHistoryWriter);
|
|
||||||
|
|
||||||
if (YarnConfiguration.timelineServiceV2Enabled(configuration)) {
|
|
||||||
RMTimelineCollectorManager timelineCollectorManager =
|
|
||||||
createRMTimelineCollectorManager();
|
|
||||||
addService(timelineCollectorManager);
|
|
||||||
rmContext.setRMTimelineCollectorManager(timelineCollectorManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register event handler for NodesListManager
|
// Register event handler for NodesListManager
|
||||||
nodesListManager = new NodesListManager(rmContext);
|
nodesListManager = new NodesListManager(rmContext);
|
||||||
rmDispatcher.register(NodesListManagerEventType.class, nodesListManager);
|
rmDispatcher.register(NodesListManagerEventType.class, nodesListManager);
|
||||||
|
@ -177,19 +177,25 @@ ApplicationReport createAndGetApplicationReport(String clientUserName,
|
|||||||
String getTrackingUrl();
|
String getTrackingUrl();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The collector address for the application.
|
* The collector address for the application. It should be used only if the
|
||||||
* @return the address for the application's collector.
|
* timeline service v.2 is enabled.
|
||||||
|
*
|
||||||
|
* @return the address for the application's collector, or null if the
|
||||||
|
* timeline service v.2 is not enabled.
|
||||||
*/
|
*/
|
||||||
String getCollectorAddr();
|
String getCollectorAddr();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set collector address for the application
|
* Set collector address for the application. It should be used only if the
|
||||||
|
* timeline service v.2 is enabled.
|
||||||
|
*
|
||||||
* @param collectorAddr the address of collector
|
* @param collectorAddr the address of collector
|
||||||
*/
|
*/
|
||||||
void setCollectorAddr(String collectorAddr);
|
void setCollectorAddr(String collectorAddr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove collector address when application is finished or killed.
|
* Remove collector address when application is finished or killed. It should
|
||||||
|
* be used only if the timeline service v.2 is enabled.
|
||||||
*/
|
*/
|
||||||
void removeCollectorAddr();
|
void removeCollectorAddr();
|
||||||
|
|
||||||
|
@ -526,6 +526,10 @@ public RMAppImpl(ApplicationId applicationId, RMContext rmContext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts the application level timeline collector for this app. This should
|
||||||
|
* be used only if the timeline service v.2 is enabled.
|
||||||
|
*/
|
||||||
public void startTimelineCollector() {
|
public void startTimelineCollector() {
|
||||||
AppLevelTimelineCollector collector =
|
AppLevelTimelineCollector collector =
|
||||||
new AppLevelTimelineCollector(applicationId);
|
new AppLevelTimelineCollector(applicationId);
|
||||||
@ -533,6 +537,10 @@ public void startTimelineCollector() {
|
|||||||
applicationId, collector);
|
applicationId, collector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the application level timeline collector for this app. This should be
|
||||||
|
* used only if the timeline service v.2 is enabled.
|
||||||
|
*/
|
||||||
public void stopTimelineCollector() {
|
public void stopTimelineCollector() {
|
||||||
rmContext.getRMTimelineCollectorManager().remove(applicationId);
|
rmContext.getRMTimelineCollectorManager().remove(applicationId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user