FsDatasetCache { public long getNumBlocksFailedToUncache() { return numBlocksFailedToUncache.get(); } FsDatasetCache(FsDatasetImpl dataset); void initCache(String bpid); long getMemCacheUsed(); long getCacheUsed(); long getMemCacheCapacity(); long getCacheCapacity(); long getNumBlocksFailedToCache(); long getNumBlocksFailedToUncache(); long getNumBlocksCached(); synchronized boolean isCached(String bpid, long blockId);  }
@Test(timeout=60000) public void testUncacheUnknownBlock() throws Exception { Path fileName = new Path("/testUncacheUnknownBlock"); int fileLen = 4096; DFSTestUtil.createFile(fs, fileName, fileLen, (short)1, 0xFDFD); HdfsBlockLocation[] locs = (HdfsBlockLocation[])fs.getFileBlockLocations( fileName, 0, fileLen); setHeartbeatResponse(uncacheBlocks(locs)); GenericTestUtils.waitFor(new Supplier<Boolean>() { @Override public Boolean get() { return fsd.getNumBlocksFailedToUncache() > 0; } }, 100, 10000); }