test_class.file: smart-hadoop-support/smart-hadoop/src/test/java/org/smartdata/hdfs/action/TestDeleteFileAction.java
test_class.identifier: TestDeleteFileAction
test_class.superclass: extends MiniClusterHarness
test_case.body: @Test
    public void testRemoteFileDelete() throws Exception {
      final String srcPath = "/testDel";
      final String file1 = "file1";
      Path srcDir = new Path(srcPath);
      dfs.mkdirs(srcDir);
      //Write to DISK
      final FSDataOutputStream out1 = dfs.create(new Path(srcPath + "/" + file1));
      out1.writeChars("testDelete1");
      out1.close();
      Assert.assertTrue(dfsClient.exists(srcPath + "/" + file1));
  
      DeleteFileAction deleteFileAction = new DeleteFileAction();
      deleteFileAction.setDfsClient(dfsClient);
      deleteFileAction.setContext(smartContext);
      Map<String, String> args = new HashMap<>();
      // Destination with "hdfs" prefix
      args.put(DeleteFileAction.FILE_PATH, dfs.getUri() + srcPath + "/" + file1);
      deleteFileAction.init(args);
      deleteFileAction.run();
      Assert.assertTrue(deleteFileAction.getExpectedAfterRun());
      Assert.assertFalse(dfsClient.exists(srcPath + "/" + file1));
    }
test_case.class_method_signature: TestDeleteFileAction.testRemoteFileDelete()
test_case.full_signature: @Test public void testRemoteFileDelete()
test_case.identifier: testRemoteFileDelete
test_case.invocations: mkdirs create writeChars close assertTrue exists setDfsClient setContext put getUri init run assertTrue getExpectedAfterRun assertFalse exists
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemoteFileDelete()
focal_class.declarator: LOG =
        LoggerFactory.getLogger(DeleteFileAction.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG =
        LoggerFactory.getLogger(DeleteFileAction.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: filePath
focal_class.modifier: private
focal_class.original_string: private String filePath;
focal_class.type: String
focal_class.var_name: filePath
focal_class.file: smart-hadoop-support/smart-hadoop/src/main/java/org/smartdata/hdfs/action/DeleteFileAction.java
focal_class.identifier: DeleteFileAction
focal_class.class_method_signature: DeleteFileAction.init(Map<String, String> args)
focal_class.full_signature: @Override public void init(Map<String, String> args)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, String> args)
focal_class.return: void
focal_class.signature: void init(Map<String, String> args)
focal_class.class_method_signature: DeleteFileAction.execute()
focal_class.full_signature: @Override protected void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: DeleteFileAction.deleteFile(
        String filePath)
focal_class.full_signature: private boolean deleteFile(
        String filePath)
focal_class.identifier: deleteFile
focal_class.modifiers: private
focal_class.parameters: (
        String filePath)
focal_class.return: boolean
focal_class.signature: boolean deleteFile(
        String filePath)
focal_class.superclass: extends HdfsAction
focal_method.body: @Override
    public void init(Map<String, String> args) {
      super.init(args);
      this.filePath = args.get(FILE_PATH);
    }
focal_method.class_method_signature: DeleteFileAction.init(Map<String, String> args)
focal_method.full_signature: @Override public void init(Map<String, String> args)
focal_method.identifier: init
focal_method.invocations: init get
focal_method.modifiers: @Override public
focal_method.parameters: (Map<String, String> args)
focal_method.return: void
focal_method.signature: void init(Map<String, String> args)