/// <exception cref="System.IO.IOException"/> /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> public virtual void RefreshNodes(Configuration yarnConf) { lock (hostsReader) { if (null == yarnConf) { yarnConf = new YarnConfiguration(); } includesFile = yarnConf.Get(YarnConfiguration.RmNodesIncludeFilePath, YarnConfiguration .DefaultRmNodesIncludeFilePath); excludesFile = yarnConf.Get(YarnConfiguration.RmNodesExcludeFilePath, YarnConfiguration .DefaultRmNodesExcludeFilePath); hostsReader.UpdateFileNames(includesFile, excludesFile); hostsReader.Refresh(includesFile.IsEmpty() ? null : this.rmContext.GetConfigurationProvider ().GetConfigurationInputStream(this.conf, includesFile), excludesFile.IsEmpty() ? null : this.rmContext.GetConfigurationProvider().GetConfigurationInputStream(this .conf, excludesFile)); PrintConfiguredHosts(); } foreach (NodeId nodeId in rmContext.GetRMNodes().Keys) { if (!IsValidNode(nodeId.GetHost())) { this.rmContext.GetDispatcher().GetEventHandler().Handle(new RMNodeEvent(nodeId, RMNodeEventType .Decommission)); } } }