flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
/**
	 * The test cluster has the following resources:
	 * - 2 Nodes with 4096 MB each.
	 * - RM_SCHEDULER_MINIMUM_ALLOCATION_MB is 512
	 *
	 * <p>We allocate:
	 * 1 JobManager with 256 MB (will be automatically upgraded to 512 due to min alloc mb)
	 * 5 TaskManagers with 1585 MB
	 *
	 * <p>user sees a total request of: 8181 MB (fits)
	 * system sees a total request of: 8437 (doesn't fit due to min alloc mb)
	 */
The test cluster has the following resources:
- 2 Nodes with 4096 MB each.
- RM_SCHEDULER_MINIMUM_ALLOCATION_MB is 512

We allocate:
1 JobManager with 256 MB (will be automatically upgraded to 512 due to min alloc mb)
5 TaskManagers with 1585 MB

user sees a total request of: 8181 MB (fits)
system sees a total request of: 8437 (doesn't fit due to min alloc mb)
The test cluster has the following resources : - 2 Nodes with 4096 MB each . - RM_SCHEDULER_MINIMUM_ALLOCATION_MB is 512 We allocate : 1 JobManager with 256 MB ( will be automatically upgraded to 512 due to min alloc mb ) 5 TaskManagers with 1585 MB user sees a total request of : 8181 MB ( fits ) system sees a total request of : 8437 ( doesn ' t fit due to min alloc mb )
@Ignore("The test is too resource consuming (8.5 GB of memory)")
	@Test
	public void testResourceComputation() {
		addTestAppender(YarnClusterDescriptor.class, Level.WARN);
		LOG.info("Starting testResourceComputation()");
		runWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(), "-t", flinkLibFolder.getAbsolutePath(),
				"-n", "5",
				"-jm", "256",
				"-tm", "1585"}, "Number of connected TaskManagers changed to", null, RunTypes.YARN_SESSION, 0);
		LOG.info("Finished testResourceComputation()");
		checkForLogString("This YARN session requires 8437MB of memory in the cluster. There are currently only 8192MB available.");
	}
@ Ignore ( "The test is too resource consuming (8.5 GB of memory)" ) @ Test public void testResourceComputation ( ) { addTestAppender ( YarnClusterDescriptor . class , Level . WARN ) ; LOG . info ( "Starting testResourceComputation()" ) ; runWithArgs ( new String [ ] { "-j" , flinkUberjar . getAbsolutePath ( ) , "-t" , flinkLibFolder . getAbsolutePath ( ) , "-n" , "5" , "-jm" , "256" , "-tm" , "1585" } , "Number of connected TaskManagers changed to" , null , RunTypes . YARN_SESSION , 0 ) ; LOG . info ( "Finished testResourceComputation()" ) ; checkForLogString ( "This YARN session requires 8437MB of memory in the cluster. There are currently only 8192MB available." ) ; }
The test cluster has the following resources:
 - 2 Nodes with 4096 MB each.
The test cluster has the following resources : - 2 Nodes with 4096 MB each .