@Test public void testCheckSumAction() throws IOException { CheckSumAction checkSumAction = new CheckSumAction(); checkSumAction.setDfsClient(dfsClient); checkSumAction.setContext(smartContext); final String file = "/testPath/file1"; dfsClient.mkdirs("/testPath"); 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(CheckSumAction.FILE_PATH, file); checkSumAction.init(args); checkSumAction.run(); Assert.assertTrue(checkSumAction.getExpectedAfterRun()); }
@Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); this.conf = getContext().getConf(); }
CheckSumAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); this.conf = getContext().getConf(); } }
CheckSumAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); this.conf = getContext().getConf(); }  }
CheckSumAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); this.conf = getContext().getConf(); }  @Override void init(Map<String, String> args); static String byteArray2HexString(byte[] bytes); }
CheckSumAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); this.conf = getContext().getConf(); }  @Override void init(Map<String, String> args); static String byteArray2HexString(byte[] bytes);  }