Beispiel #1
0
        private VertexScheduler(ProcessTable table)
        {
            this.processTable = table;
            this.jobStatus = new JobStatus(schedulerHelper);

            // These environment variables will not be set when the vertex rerun command is executed
            // Set them to 0 so we can use them later to detect that we're rerunning a vertex outside of an HPC job
            if (!Int32.TryParse(Environment.GetEnvironmentVariable("CCP_JOBID"), out JobId))
            {
                JobId = 0;
            }
            if (!Int32.TryParse(Environment.GetEnvironmentVariable("CCP_DRYADPROCID"), out processId))
            {
                processId = 0;
            }
            this.baseUri = String.Format(Constants.vertexCallbackAddrFormat, AzureUtils.CurrentHostName, processId);
            this.replyUri = this.baseUri + Constants.vertexCallbackServiceName;
            this.callbackServiceHost = new VertexCallbackServiceHost(this);
        }
Beispiel #2
0
        public static VertexScheduler GetInstance()
        {
            if (vertexScheduler == null)
            {
                lock (factoryLock)
                {
                    if (vertexScheduler == null)
                    {
                        ProcessTable processTable = new ProcessTable();

                        vertexScheduler = new VertexScheduler(processTable);

                        vertexScheduler.Initialize();
                    }
                }
            }
            return vertexScheduler;
        }