Thursday, 3 November, 2011 12:48 PM
In my application I need to get the different job priorities for a specific job template that the user chooses.(the priorities are not the same for all job template)
how can i get it using C#?
Thursday, 3 November, 2011 10:05 PM
JobTemplate is a filterable property. You can use the example posted to your previous question here (http://social.microsoft.com/Forums/is/windowshpcdevs/thread/80a7d082-c94e-4b60-aaf8-4ef1b7acec1e) to get the list of jobs for a given JobTemplate (instead of all running jobs). Simply change the filter from:
FilterProperty filStateRunning = new FilterProperty(FilterOperator.Equal, JobPropertyIds.State, JobState.Running);
FilterProperty filDesiredJobTemplate = new FilterProperty(FilterOperator.Equal, JobPropertyIds.JobTemplate, "JobTemplateNameHere");
You can then recraft the loops and collection to look at the job priority instead of the nodegroup.
For busy clusters, there is a balance between too few filter clauses and too many: Too few and the resulting collection may require moving a lot of data across the wire (and burden the Scheduler process with large data sets) and too many can result in excessive computation costs. The actual limits depend entirely on the resources upon which your cluster is built: HN cpu, drive speeds, ram, the same for wherever SQL is running and average and peak HN loads.
- Marked As Answer by Ben.Alterzon Wednesday, 9 November, 2011 12:57 PM