public NMTimelinePublisher getNMTimelinePublisher() { return context.getNMTimelinePublisher(); }
context.getNMTimelinePublisher(); if (nmTimelinePublisher != null) { nmTimelinePublisher.setTimelineServiceAddress(appId,
context.getNMTimelinePublisher(); if (nmTimelinePublisher != null) { nmTimelinePublisher.setTimelineServiceAddress(
private void updateCollectorStatus(ApplicationImpl app) { // Remove collectors info for finished apps. // TODO check we remove related collectors info in failure cases // (YARN-3038) Map<ApplicationId, AppCollectorData> registeringCollectors = app.context.getRegisteringCollectors(); if (registeringCollectors != null) { registeringCollectors.remove(app.getAppId()); } Map<ApplicationId, AppCollectorData> knownCollectors = app.context.getKnownCollectors(); if (knownCollectors != null) { knownCollectors.remove(app.getAppId()); } // stop timelineClient when application get finished. NMTimelinePublisher nmTimelinePublisher = app.context.getNMTimelinePublisher(); if (nmTimelinePublisher != null) { nmTimelinePublisher.stopTimelineClient(app.getAppId()); } }
public ApplicationImpl(Dispatcher dispatcher, String user, FlowContext flowContext, ApplicationId appId, Credentials credentials, Context context, long recoveredLogInitedTime) { this.dispatcher = dispatcher; this.user = user; this.appId = appId; this.credentials = credentials; this.aclsManager = context.getApplicationACLsManager(); Configuration conf = context.getConf(); if (YarnConfiguration.timelineServiceV2Enabled(conf)) { if (flowContext == null) { throw new IllegalArgumentException("flow context cannot be null"); } this.flowContext = flowContext; if (YarnConfiguration.systemMetricsPublisherEnabled(conf)) { context.getNMTimelinePublisher().createTimelineClient(appId); } } this.context = context; this.appStateStore = context.getNMStateStore(); ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); readLock = lock.readLock(); writeLock = lock.writeLock(); stateMachine = stateMachineFactory.make(this); setAppLogInitedTimestamp(recoveredLogInitedTime); }