test_class.file: smart-hadoop-support/smart-hadoop-3.1/src/test/java/org/smartdata/hdfs/action/TestUnErasureCodingAction.java
test_class.identifier: TestUnErasureCodingAction
test_class.superclass: extends TestErasureCodingMiniCluster
test_case.body: @Test
    public void testUnEcActionForDir() throws Exception {
      String testDir = "/test_dir";
      dfs.mkdirs(new Path(testDir));
      dfs.setErasureCodingPolicy(new Path(testDir), ecPolicy.getName());
      assertEquals(dfsClient.getErasureCodingPolicy(testDir), ecPolicy);
  
      UnErasureCodingAction unEcAction = new UnErasureCodingAction();
      unEcAction.setContext(smartContext);
      Map<String, String> args = new HashMap<>();
      args.put(HdfsAction.FILE_PATH, testDir);
      unEcAction.init(args);
      unEcAction.run();
      assertNull(dfs.getErasureCodingPolicy(new Path(testDir)));
  
      // Create test file, its EC policy is expected to be replication.
      String srcPath = testDir + "/ec_file";
      createTestFile(srcPath, 1000);
      assertNull(dfs.getErasureCodingPolicy(new Path(srcPath)));
    }
test_case.class_method_signature: TestUnErasureCodingAction.testUnEcActionForDir()
test_case.full_signature: @Test public void testUnEcActionForDir()
test_case.identifier: testUnEcActionForDir
test_case.invocations: mkdirs setErasureCodingPolicy getName assertEquals getErasureCodingPolicy setContext put init run assertNull getErasureCodingPolicy createTestFile assertNull getErasureCodingPolicy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUnEcActionForDir()
focal_class.declarator: LOG =
        LoggerFactory.getLogger(UnErasureCodingAction.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG =
        LoggerFactory.getLogger(UnErasureCodingAction.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: ecPolicyName
focal_class.modifier: private
focal_class.original_string: private String ecPolicyName;
focal_class.type: String
focal_class.var_name: ecPolicyName
focal_class.declarator: conf
focal_class.modifier: private
focal_class.original_string: private SmartConf conf;
focal_class.type: SmartConf
focal_class.var_name: conf
focal_class.file: smart-hadoop-support/smart-hadoop-3.1/src/main/java/org/smartdata/hdfs/action/UnErasureCodingAction.java
focal_class.identifier: UnErasureCodingAction
focal_class.class_method_signature: UnErasureCodingAction.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: UnErasureCodingAction.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: UnErasureCodingAction.getProgress()
focal_class.full_signature: @Override public float getProgress()
focal_class.identifier: getProgress
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getProgress()
focal_class.superclass: extends ErasureCodingBase
focal_method.body: @Override
    public void init(Map<String, String> args) {
      super.init(args);
      this.conf = getContext().getConf();
      this.srcPath = args.get(FILE_PATH);
      this.ecPolicyName = REPLICATION_POLICY_NAME;
      if (args.containsKey(EC_TMP)) {
        this.ecTmpPath = args.get(EC_TMP);
      }
      if (args.containsKey(BUF_SIZE) && !args.get(BUF_SIZE).isEmpty()) {
        this.bufferSize = (int) StringUtil.parseToByte(args.get(BUF_SIZE));
      }
      this.progress = 0.0F;
    }
focal_method.class_method_signature: UnErasureCodingAction.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 getConf getContext get containsKey get containsKey isEmpty get parseToByte 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)