Package com.hdfsTools.action

Examples of com.hdfsTools.action.upLoadAction


     * 获取上传到所在目录对应的url,也就是要上传文件到hdfs文件系统的目标目录
     */
    HdfsFile dfsfile = filedao.findFile(currentId);
    String dst = dfsfile.getFileUrl(); // 获得当前目录的url

    upLoadAction upAction = new upLoadAction();

    boolean result = upAction.copytoDFS(file, dst, true, filename,
        safelevel);

    if (result) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
      Date newDate;
View Full Code Here


  public boolean exists(long currentId, String filename) {
    HdfsFile dfsfile = filedao.findFile(currentId);
    String dst = dfsfile.getFileUrl(); // 获得当前目录的url
    String filePath = dst + "/" + filename;

    upLoadAction upAction = new upLoadAction();
    // 查找路径filePath对应的文件是否存在
    return upAction.fileExists(filePath);
  }
View Full Code Here

TOP

Related Classes of com.hdfsTools.action.upLoadAction

Copyright © 2018 www.massapicom. 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.