agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/scheduling/AbstractJobSchedulingTest.java
/**
	 * Creates a distribution of jobs uniformly spread across all users.
	 * 
	 * @param totalJobs number of jobs to create
	 * @return Map of usernames to a list of UUID for the jobs created for that user
	 * @throws Exception 
	 */
Creates a distribution of jobs uniformly spread across all users.

@param totalJobs number of jobs to create
@return Map of usernames to a list of UUID for the jobs created for that user
@throws Exception
Creates a distribution of jobs uniformly spread across all users . @param totalJobs number of jobs to create @return Map of usernames to a list of UUID for the jobs created for that user @throws Exception
protected TreeMap<String,List<String>> loadUniformDistributionOfJobsForSingleApp(int totalJobs, JobStatusType status) 
	throws Exception 
	{
		TreeMap<String, List<String>> jobDistribution = new TreeMap<String, List<String>>();
		for (String username : testUsernames) {
			jobDistribution.put(username, new ArrayList<String>());
		}
		Software software = createSoftware();
		for (int i = 0; i < TEST_USER_COUNT; i++) {
			String username = "user-" + i;
			for (int j = 0; j < totalJobs / TEST_USER_COUNT; j++) {
				Job job = createJob(
						status,
						software,
						software.getExecutionSystem(),
						software.getExecutionSystem().getQueue(
								software.getDefaultQueue()), username);
				jobDistribution.get(username).add(job.getUuid());
			}
		}
		return jobDistribution;
	}
protected TreeMap < String , List < String > > loadUniformDistributionOfJobsForSingleApp ( int totalJobs , JobStatusType status ) throws Exception { TreeMap < String , List < String > > jobDistribution = new TreeMap < String , List < String > > ( ) ; for ( String username : testUsernames ) { jobDistribution . put ( username , new ArrayList < String > ( ) ) ; } Software software = createSoftware ( ) ; for ( int i = 0 ; i < TEST_USER_COUNT ; i ++ ) { String username = "user-" + i ; for ( int j = 0 ; j < totalJobs / TEST_USER_COUNT ; j ++ ) { Job job = createJob ( status , software , software . getExecutionSystem ( ) , software . getExecutionSystem ( ) . getQueue ( software . getDefaultQueue ( ) ) , username ) ; jobDistribution . get ( username ) . add ( job . getUuid ( ) ) ; } } return jobDistribution ; }
Creates a distribution of jobs uniformly spread across all users.
Creates a distribution of jobs uniformly spread across all users .
// generates a list of buckets with the task indices arranged in a list // within each bucket