List of usage examples for org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair AllocationFileLoaderService ALLOC_RELOAD_WAIT_MS
long ALLOC_RELOAD_WAIT_MS
To view the source code for org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair AllocationFileLoaderService ALLOC_RELOAD_WAIT_MS.
Click Source Link
From source file:com.cloudera.impala.util.TestRequestPoolService.java
License:Apache License
@Test public void testUpdatingConfigs() throws Exception { // Tests updating the config files and then checking the pool resolution, ACLs, and // pool limit configs. This tests all three together rather than separating into // separate test cases because we updateConfigFiles() will end up waiting around 7 // seconds, so this helps cut down on the total test execution time. // A one second pause is necessary to ensure the file timestamps are unique if the // test gets here within one second. createPoolService(ALLOCATION_FILE, LLAMA_CONFIG_FILE); Thread.sleep(1000L);//from w w w . j a v a 2 s. c o m Files.copy(getClasspathFile(ALLOCATION_FILE_MODIFIED), allocationConfFile_); Files.copy(getClasspathFile(LLAMA_CONFIG_FILE_MODIFIED), llamaConfFile_); // Wait at least 1 second more than the time it will take for the // AllocationFileLoaderService to update the file. The FileWatchService does not // have that additional wait time, so it will be updated within 'CHECK_INTERVAL_MS' Thread.sleep(1000L + CHECK_INTERVAL_MS + AllocationFileLoaderService.ALLOC_RELOAD_WAIT_MS); checkModifiedConfigResults(); }