@Test public void testUncacheNoncachedFile() throws Exception { final String file = "/testUncache/file"; Path dir = new Path("/testUncache"); dfs.mkdirs(dir); dfs.setStoragePolicy(dir, "HOT"); final FSDataOutputStream out = dfs.create(new Path(file)); out.writeChars("testUncache"); out.close(); CacheScheduler.createCachePool(dfsClient); UncacheFileAction uncacheFileAction = new UncacheFileAction(); uncacheFileAction.setDfsClient(dfsClient); uncacheFileAction.setContext(smartContext); Map<String, String> argsUncache = new HashMap(); argsUncache.put(UncacheFileAction.FILE_PATH, file); uncacheFileAction.init(argsUncache); uncacheFileAction.run(); Assert.assertTrue(uncacheFileAction.getExpectedAfterRun()); CacheFileAction cacheFileAction = new CacheFileAction(); cacheFileAction.setDfsClient(dfsClient); cacheFileAction.setContext(smartContext); Assert.assertFalse(cacheFileAction.isCached(file)); }
@Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }  }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }  @Override void init(Map<String, String> args); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }  @Override void init(Map<String, String> args);  }