HDFS-10197. TestFsDatasetCache failing intermittently due to timeout. Contributed by Lin Yiqun.

(cherry picked from commit f2aec4eb82)
(cherry picked from commit 1d79b57c14)
This commit is contained in:
Andrew Wang 2016-03-29 11:54:42 -07:00
parent 68cd8112e7
commit 026b84bf70
2 changed files with 5 additions and 2 deletions

View File

@ -1459,7 +1459,7 @@ public Boolean get() {
NativeIO.POSIX.getCacheManipulator().getMemlockLimit()); NativeIO.POSIX.getCacheManipulator().getMemlockLimit());
return true; return true;
} }
}, 100, 60000); }, 100, 120000);
return expectedCacheUsed; return expectedCacheUsed;
} }

View File

@ -88,6 +88,8 @@
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.primitives.Ints; import com.google.common.primitives.Ints;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DATANODE_FSDATASETCACHE_MAX_THREADS_PER_VOLUME_KEY;
public class TestFsDatasetCache { public class TestFsDatasetCache {
private static final Log LOG = LogFactory.getLog(TestFsDatasetCache.class); private static final Log LOG = LogFactory.getLog(TestFsDatasetCache.class);
@ -124,6 +126,7 @@ public void setUp() throws Exception {
conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY, conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
CACHE_CAPACITY); CACHE_CAPACITY);
conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1); conf.setLong(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
conf.setInt(DFS_DATANODE_FSDATASETCACHE_MAX_THREADS_PER_VOLUME_KEY, 10);
prevCacheManipulator = NativeIO.POSIX.getCacheManipulator(); prevCacheManipulator = NativeIO.POSIX.getCacheManipulator();
NativeIO.POSIX.setCacheManipulator(new NoMlockCacheManipulator()); NativeIO.POSIX.setCacheManipulator(new NoMlockCacheManipulator());
@ -454,7 +457,7 @@ public Boolean get() {
}, 100, 10000); }, 100, 10000);
} }
@Test(timeout=60000) @Test(timeout=600000)
public void testPageRounder() throws Exception { public void testPageRounder() throws Exception {
// Write a small file // Write a small file
Path fileName = new Path("/testPageRounder"); Path fileName = new Path("/testPageRounder");