Package org.apache.hadoop.fs

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


    if (currentStep > 0) {
      LocalFileSystem local = FileSystem.getLocal(conf);
      local.delete(new Path(getSoftGraphFileName(rootPath, currentStep - 1)),
          true);
      String softGraphFileName = getSoftGraphFileName(rootPath, currentStep);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
    }
    currentStep++;
  }

  @Override
View Full Code Here


          Math.max(0, currentStep - 1));
      LocalFileSystem local = FileSystem.getLocal(conf);
      // close the files
      IOUtils.cleanup(null, softGraphPartsDos, softGraphPartsDis,
          staticGraphPartsDis, staticGraphPartsDos);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
      staticGraphPartsDis = local.open(new Path(staticFile));

      // ensure the vertex is not null
      if (cachedVertexInstance == null) {
        cachedVertexInstance = GraphJobRunner
View Full Code Here

      LocalFileSystem local = FileSystem.getLocal(conf);
      // close the files
      IOUtils.cleanup(null, softGraphPartsDos, softGraphPartsDis,
          staticGraphPartsDis, staticGraphPartsDos);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
      staticGraphPartsDis = local.open(new Path(staticFile));

      // ensure the vertex is not null
      if (cachedVertexInstance == null) {
        cachedVertexInstance = GraphJobRunner
            .<V, E, M> newVertexInstance(GraphJobRunner.VERTEX_CLASS);
View Full Code Here

    }

    // Take empty files in case the place holder is needed
    FSDataInputStream in = null;
    try {
      in = localFs.open(itemToZip);
      final ZipEntry ze = new ZipEntry(inZipPath);
      ze.setTime(itemStatus.getModificationTime());
      // Comments confuse looking at the zip file
      // ze.setComment(itemToZip.toString());
      zos.putNextEntry(ze);
View Full Code Here

    if (currentStep > 0) {
      LocalFileSystem local = FileSystem.getLocal(conf);
      local.delete(new Path(getSoftGraphFileName(rootPath, currentStep - 1)),
          true);
      String softGraphFileName = getSoftGraphFileName(rootPath, currentStep);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
    }
    currentStep++;
  }

  @Override
View Full Code Here

          Math.max(0, currentStep - 1));
      LocalFileSystem local = FileSystem.getLocal(conf);
      // close the files
      IOUtils.cleanup(null, softGraphPartsDos, softGraphPartsDis,
          staticGraphPartsDis, staticGraphPartsDos);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
      staticGraphPartsDis = local.open(new Path(staticFile));

      // ensure the vertex is not null
      if (cachedVertexInstance == null) {
        cachedVertexInstance = GraphJobRunner
View Full Code Here

      LocalFileSystem local = FileSystem.getLocal(conf);
      // close the files
      IOUtils.cleanup(null, softGraphPartsDos, softGraphPartsDis,
          staticGraphPartsDis, staticGraphPartsDos);
      softGraphPartsDis = local.open(new Path(softGraphFileName));
      staticGraphPartsDis = local.open(new Path(staticFile));

      // ensure the vertex is not null
      if (cachedVertexInstance == null) {
        cachedVertexInstance = GraphJobRunner
            .<V, E, M> newVertexInstance(GraphJobRunner.VERTEX_CLASS);
View Full Code Here

    String taskRanFile = args[0];
    Configuration conf = new Configuration();
   
    //read the Task objects from the file
    LocalFileSystem lfs = FileSystem.getLocal(conf);
    FSDataInputStream din = lfs.open(new Path(taskRanFile));
   
    int numTasksRan = din.readInt();
    List<Task> taskAttemptsRan = new ArrayList<Task>();
    for (int i = 0; i < numTasksRan; i++) {
      Task t;
View Full Code Here

    }

    // Take empty files in case the place holder is needed
    FSDataInputStream in = null;
    try {
      in = localFs.open(itemToZip);
      final ZipEntry ze = new ZipEntry(inZipPath);
      ze.setTime(itemStatus.getModificationTime());
      // Comments confuse looking at the zip file
      // ze.setComment(itemToZip.toString());
      zos.putNextEntry(ze);
View Full Code Here

    }

    // Take empty files in case the place holder is needed
    FSDataInputStream in = null;
    try {
      in = localFs.open(itemToZip);
      final ZipEntry ze = new ZipEntry(inZipPath);
      ze.setTime(itemStatus.getModificationTime());
      // Comments confuse looking at the zip file
      // ze.setComment(itemToZip.toString());
      zos.putNextEntry(ze);
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.