/// <summary>
        /// Get all job information from Livy service
        /// </summary>
        /// <returns></returns>
        public async Task <SparkJobConfig[]> SyncAllJobState()
        {
            var jobs = await JobData.GetAll();

            Logger.LogInformation($"sync'ing job states for all jobs'");
            return(await SyncJobStateByNames(jobs.Select(job => job.Name).ToArray()));
        }
        /// <summary>
        /// Start all jobs
        /// </summary>
        /// <returns></returns>
        public async Task <SparkJobConfig[]> StartAllJobs()
        {
            var jobs = await JobData.GetAll();

            string[] jobNames = jobs.Select(job => job.Name).ToArray();
            await Task.WhenAll(jobNames.Select(name => StartJob(name)));

            Logger.LogInformation($"sync'ing job states for all jobs'");
            return(await SyncJobStateByNames(jobs.Select(job => job.Name).ToArray()));
        }
Esempio n. 3
0
        public IActionResult Index()
        {
            ViewBag.columns       = ColumnChoices;
            ViewBag.tableChoices  = TableChoices;
            ViewBag.all           = JobData.GetAll();
            ViewBag.employers     = JobData.GetAllEmployers();
            ViewBag.locations     = JobData.GetAllLocations();
            ViewBag.positionTypes = JobData.GetAllPositionTypes();
            ViewBag.skills        = JobData.GetAllCoreCompetencies();

            return(View());
        }
Esempio n. 4
0
        public JobType(JobData data)
        {
            Field <UserType>(
                "jobs",
                resolve: context => data.GetAll()
                );

            Name = "JobType";

            Field(x => x.Name);
            Field(x => x.Since);
            Field <CompanyType>("company");
        }