test_class.file: smart-hadoop-support/smart-hadoop/src/test/java/org/smartdata/hdfs/action/TestAppendFileAction.java
test_class.identifier: TestAppendFileAction
test_class.superclass: extends MiniClusterHarness
test_case.body: @Test
    public void testAppendNonExistFile() throws UnsupportedEncodingException {
      Map<String, String> args = new HashMap<>();
      args.put(WriteFileAction.FILE_PATH, "/Test");
      AppendFileAction appendFileAction = new AppendFileAction();
      appendFileAction.init(args);
      appendFileAction.run();
      Assert.assertNotNull(appendFileAction.getActionStatus().getThrowable());
    }
test_case.class_method_signature: TestAppendFileAction.testAppendNonExistFile()
test_case.full_signature: @Test public void testAppendNonExistFile()
test_case.identifier: testAppendNonExistFile
test_case.invocations: put init run assertNotNull getThrowable getActionStatus
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAppendNonExistFile()
focal_class.declarator: BUF_SIZE = "-bufSize"
focal_class.modifier: static final
focal_class.original_string: static final String BUF_SIZE = "-bufSize";
focal_class.type: String
focal_class.var_name: BUF_SIZE
focal_class.declarator: LENGTH = "-length"
focal_class.modifier: static final
focal_class.original_string: static final String LENGTH = "-length";
focal_class.type: String
focal_class.var_name: LENGTH
focal_class.declarator: srcPath
focal_class.modifier: private
focal_class.original_string: private String srcPath;
focal_class.type: String
focal_class.var_name: srcPath
focal_class.declarator: length = 1024
focal_class.modifier: private
focal_class.original_string: private long length = 1024;
focal_class.type: long
focal_class.var_name: length
focal_class.declarator: bufferSize = 64 * 1024
focal_class.modifier: private
focal_class.original_string: private int bufferSize = 64 * 1024;
focal_class.type: int
focal_class.var_name: bufferSize
focal_class.declarator: conf
focal_class.modifier: private
focal_class.original_string: private Configuration conf;
focal_class.type: Configuration
focal_class.var_name: conf
focal_class.file: smart-hadoop-support/smart-hadoop/src/main/java/org/smartdata/hdfs/action/AppendFileAction.java
focal_class.identifier: AppendFileAction
focal_class.class_method_signature: AppendFileAction.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: AppendFileAction.setConf(Configuration conf)
focal_class.full_signature: @VisibleForTesting protected void setConf(Configuration conf)
focal_class.identifier: setConf
focal_class.modifiers: @VisibleForTesting protected
focal_class.parameters: (Configuration conf)
focal_class.return: void
focal_class.signature: void setConf(Configuration conf)
focal_class.class_method_signature: AppendFileAction.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.superclass: extends HdfsAction
focal_method.body: @Override
    public void init(Map<String, String> args) {
      try {
        this.conf = getContext().getConf();
        String nameNodeURL = this.conf.get(SmartConfKeys.SMART_DFS_NAMENODE_RPCSERVER_KEY);
        conf.set(DFSConfigKeys.FS_DEFAULT_NAME_KEY, nameNodeURL);
      } catch (NullPointerException e) {
        this.conf = new Configuration();
        appendLog("Conf error!, NameNode URL is not configured!");
      }
      super.init(args);
      this.srcPath = args.get(FILE_PATH);
      if (args.containsKey(BUF_SIZE)) {
        bufferSize = Integer.valueOf(args.get(BUF_SIZE));
      }
      if (args.containsKey(LENGTH)) {
        length = Long.valueOf(args.get(LENGTH));
      }
    }
focal_method.class_method_signature: AppendFileAction.init(Map<String, String> args)
focal_method.full_signature: @Override public void init(Map<String, String> args)
focal_method.identifier: init
focal_method.invocations: getConf getContext get set appendLog init get containsKey valueOf get containsKey valueOf 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)