Package com.hdfsTools.action

Source Code of com.hdfsTools.action.createAction

package com.hdfsTools.action;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;

import com.hdfsTools.dao.mkdirDao;
import com.hdfsTools.impl.mkdirImpl;

public class createAction extends BaseAction {

  public createAction() {
  }

  /**
   *
   * @param fsUrl
   *            ,example: hdfs://localhost:8889
   */
  /*
   * public createAction(String fsUrl){ super(fsUrl); }
   */

  public createAction(Configuration conf) {
    super(conf);
  }

  /**
   *
   * @param fsUrl
   *            url,example: hdfs://localhost:8889
   * @param dirUrl
   *            ,example: /user
   * @return
   * @throws IOException
   */

  public boolean createDir(String dirUrl) throws IOException {
    mkdirDao mkdir = new mkdirImpl();
    return mkdir.createDir(getConf(), dirUrl);

  }

  /**
   * @param args
   * @throws IOException
   */
  public static void main(String[] args) throws IOException {

    new createAction().createDir("/user/ltl");

  }

}
TOP

Related Classes of com.hdfsTools.action.createAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.