Search in sources :

Example 1 with ArchiveFileAction

use of org.smartdata.hdfs.action.ArchiveFileAction in project SSM by Intel-bigdata.

the class TestMoveFileAction method moveFile.

private void moveFile(String file) throws Exception {
    // schedule move to SSD
    ArchiveFileAction action = new ArchiveFileAction();
    action.setDfsClient(dfsClient);
    action.setContext(smartContext);
    Map<String, String> args = new HashMap();
    args.put(ArchiveFileAction.FILE_PATH, file);
    FileMovePlan plan = createPlan(file, "ARCHIVE");
    args.put(MoveFileAction.MOVE_PLAN, plan.toString());
    action.init(args);
    action.run();
    Assert.assertTrue(action.getExpectedAfterRun());
}
Also used : HashMap(java.util.HashMap) ArchiveFileAction(org.smartdata.hdfs.action.ArchiveFileAction) FileMovePlan(org.smartdata.model.action.FileMovePlan)

Aggregations

HashMap (java.util.HashMap)1 ArchiveFileAction (org.smartdata.hdfs.action.ArchiveFileAction)1 FileMovePlan (org.smartdata.model.action.FileMovePlan)1