Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.LocalFileSystem.mkdirs()


            console.printInfo(mesg, mesg_detail);
            // if source exists, rename. Otherwise, create a empty directory
            if (fs.exists(sourcePath))
              fs.copyToLocalFile(sourcePath, targetPath);
            else
              dstFs.mkdirs(targetPath);
          } else {
            console.printInfo("Unable to delete the existing destination directory: " + targetPath);
          }
        }
      }
View Full Code Here


        console.printInfo(mesg, mesg_detail);
        // if source exists, rename. Otherwise, create a empty directory
        if (fs.exists(sourcePath)) {
          fs.copyToLocalFile(sourcePath, targetPath);
        } else {
          if (!dstFs.mkdirs(targetPath)) {
            throw new HiveException("Unable to make local directory: "
                + targetPath);
          }
        }
      } else {
View Full Code Here

        console.printInfo(mesg, mesg_detail);
        // if source exists, rename. Otherwise, create a empty directory
        if (fs.exists(sourcePath)) {
          fs.copyToLocalFile(sourcePath, targetPath);
        } else {
          if (!dstFs.mkdirs(targetPath)) {
            throw new HiveException("Unable to make local directory: "
                + targetPath);
          }
        }
      } else {
View Full Code Here

    tmpStaticOffsets = new ArrayList<Long>();
    String p = conf.get(DISK_VERTICES_PATH_KEY, "/tmp/graph/");
    rootPath = p + attempt.getJobID().toString() + "/" + attempt.toString()
        + "/";
    LocalFileSystem local = FileSystem.getLocal(conf);
    local.mkdirs(new Path(rootPath));
    staticFile = rootPath + "static.graph";
    local.delete(new Path(staticFile), false);
    staticGraphPartsDos = local.create(new Path(staticFile));
    String softGraphFileName = getSoftGraphFileName(rootPath, currentStep);
    local.delete(new Path(softGraphFileName), false);
View Full Code Here

            console.printInfo(mesg, mesg_detail);
            // if source exists, rename. Otherwise, create a empty directory
            if (fs.exists(sourcePath))
              fs.copyToLocalFile(sourcePath, targetPath);
            else {
              if (!dstFs.mkdirs(targetPath))
                throw new HiveException ("Unable to make local directory: " + targetPath);
            }
          } else {
            throw new AccessControlException("Unable to delete the existing destination directory: " + targetPath);
          }
View Full Code Here

            console.printInfo(mesg, mesg_detail);
            // if source exists, rename. Otherwise, create a empty directory
            if (fs.exists(sourcePath))
              fs.copyToLocalFile(sourcePath, targetPath);
            else {
              if (!dstFs.mkdirs(targetPath))
                throw new HiveException ("Unable to make local directory: " + targetPath);
            }
          } else {
            throw new AccessControlException("Unable to delete the existing destination directory: " + targetPath);
          }
View Full Code Here

            console.printInfo(mesg, mesg_detail);
          // if source exists, rename. Otherwise, create a empty directory
          if (fs.exists(sourcePath))
            fs.copyToLocalFile(sourcePath, targetPath);
          else
            dstFs.mkdirs(targetPath);
          } else {
            console.printInfo("Unable to delete the existing destination directory: " + targetPath);
          }
        }
      }
View Full Code Here

    tmpStaticOffsets = new ArrayList<Long>();
    String p = conf.get(DISK_VERTICES_PATH_KEY, "/tmp/graph/");
    rootPath = p + attempt.getJobID().toString() + "/" + attempt.toString()
        + "/";
    LocalFileSystem local = FileSystem.getLocal(conf);
    local.mkdirs(new Path(rootPath));
    staticFile = rootPath + "static.graph";
    local.delete(new Path(staticFile), false);
    staticGraphPartsDos = local.create(new Path(staticFile));
    String softGraphFileName = getSoftGraphFileName(rootPath, currentStep);
    local.delete(new Path(softGraphFileName), false);
View Full Code Here

        console.printInfo(mesg, mesg_detail);
        // if source exists, rename. Otherwise, create a empty directory
        if (fs.exists(sourcePath)) {
          fs.copyToLocalFile(sourcePath, targetPath);
        } else {
          if (!dstFs.mkdirs(targetPath)) {
            throw new HiveException("Unable to make local directory: "
                + targetPath);
          }
        }
      } else {
View Full Code Here

  public void setup() throws Exception {
    LocalFileSystem fs = FileSystem.getLocal(conf);
    if (fs.exists(TEST_DIR) && !fs.delete(TEST_DIR, true)) {
      Assert.fail("Can't clean up test root dir");
    }
    fs.mkdirs(TEST_DIR);
  }
 
  private static final Progressable defaultProgressable = new Progressable() {
    @Override
    public void progress() {
View Full Code Here

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.