public YarnSchedulerHelper() { // init the DryadLogger, just to make sure DryadLogger.Start("xcompute.log"); m_taskUpdateQueue = new BlockingCollection <VertexTask>(); // if we are not running in a vertex, then init the GM string jmString = Environment.GetEnvironmentVariable(Constants.jobManager); if (String.IsNullOrEmpty(jmString)) { m_minNodes = int.Parse(Environment.GetEnvironmentVariable("MINIMUM_COMPUTE_NODES")); m_maxNodes = int.Parse(Environment.GetEnvironmentVariable("MAXIMUM_COMPUTE_NODES")); m_startNodes = m_minNodes; m_vertices = new VertexTask[JobMaxNodes + 2]; DryadLogger.LogInformation("YarnSchedulerHelper()", "Initializing JAVA GM"); DryadLogger.LogInformation("YarnSchedulerHelper()", "m_maxNodes: {0}", m_maxNodes); AMInstance.RegisterGMCallback(new UpdateProcessState(QueueYarnUpdate)); ((ISchedulerHelper)this).OnVertexChange += new VertexChangeEventHandler(OnVertexChangeHandler); m_appMaster = new AMInstance(); } else { m_vertices = new VertexTask[JobMaxNodes + 2]; DryadLogger.LogInformation("YarnSchedulerHelper()", "Not initializing JAVA GM"); } }
public YarnSchedulerHelper() { // init the DryadLogger, just to make sure DryadLogger.Start("xcompute.log"); m_taskUpdateQueue = new BlockingCollection<VertexTask>(); // if we are not running in a vertex, then init the GM string jmString = Environment.GetEnvironmentVariable(Constants.jobManager); if (String.IsNullOrEmpty(jmString)) { m_minNodes = int.Parse(Environment.GetEnvironmentVariable("MINIMUM_COMPUTE_NODES")); m_maxNodes = int.Parse(Environment.GetEnvironmentVariable("MAXIMUM_COMPUTE_NODES")); m_startNodes = m_minNodes; m_vertices = new VertexTask[JobMaxNodes + 2]; DryadLogger.LogInformation("YarnSchedulerHelper()", "Initializing JAVA GM"); DryadLogger.LogInformation("YarnSchedulerHelper()", "m_maxNodes: {0}", m_maxNodes); AMInstance.RegisterGMCallback(new UpdateProcessState(QueueYarnUpdate)); ((ISchedulerHelper)this).OnVertexChange += new VertexChangeEventHandler(OnVertexChangeHandler); m_appMaster = new AMInstance(); } else { m_vertices = new VertexTask[JobMaxNodes + 2]; DryadLogger.LogInformation("YarnSchedulerHelper()", "Not initializing JAVA GM"); } }