@Test public void testCheckStorageAction() throws IOException { CheckStorageAction checkStorageAction = new CheckStorageAction(); checkStorageAction.setDfsClient(dfsClient); checkStorageAction.setContext(smartContext); final String file = "/testPath/file1"; dfsClient.mkdirs("/testPath"); dfsClient.setStoragePolicy("/testPath", "ONE_SSD"); final OutputStream out = dfsClient.create(file, true); byte[] content = ("This is a file containing two blocks" + "......................").getBytes(); out.write(content); out.close(); Map<String, String> args = new HashMap(); args.put(CheckStorageAction.FILE_PATH, file); checkStorageAction.init(args); checkStorageAction.run(); Assert.assertTrue(checkStorageAction.getExpectedAfterRun()); }
@Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }
CheckStorageAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
CheckStorageAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }  }
CheckStorageAction 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); }
CheckStorageAction 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);  }