Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.Path


    final long splitLength = inFile.length() / noSplits;
    long pos = 0;

    for (int i = 0; i < noSplits - 1; i++) {
      tmp[i] = new FileInputSplit(i, new Path(path), pos, splitLength, hosts);
      pos += splitLength;
    }

    tmp[noSplits - 1] = new FileInputSplit(noSplits - 1, new Path(path), pos, inFile.length() - pos, hosts);

    this.inputSplits = tmp;
  }
View Full Code Here


  }
 
  public void registerFileOutputTask(AbstractOutputTask outTask, FileOutputFormat outputFormat, String outPath) {
    TaskConfig dsConfig = new TaskConfig(this.mockEnv.getTaskConfiguration());
   
    outputFormat.setOutputFilePath(new Path(outPath));
    outputFormat.setWriteMode(WriteMode.OVERWRITE);

    dsConfig.setStubWrapper(new UserCodeObjectWrapper<FileOutputFormat>(outputFormat));

    outTask.setEnvironment(this.mockEnv);
View Full Code Here

  }

  @Override
  public Path getPath() {

    return new Path(fileStatus.getPath().toString());
  }
View Full Code Here

  }


  @Override
  public Path getWorkingDirectory() {
    return new Path(this.fs.getWorkingDirectory().toUri());
  }
View Full Code Here

    super.read(in);

    // Read path of the input file
    final boolean isNotNull = in.readBoolean();
    if (isNotNull) {
      this.path = new Path();
      this.path.read(in);
    }
  }
View Full Code Here

    super.read(in);

    // Read path of the input file
    boolean isNotNull = in.readBoolean();
    if (isNotNull) {
      this.path = new Path();
      this.path.read(in);
    }
  }
View Full Code Here

    // How many jar files follow?
    out.writeInt(this.userJars.size());

    for (int i = 0; i < this.userJars.size(); i++) {

      final Path jar = this.userJars.get(i);

      // Write out the actual path
      jar.write(out);

      // Write out the length of the file
      final FileStatus file = fs.getFileStatus(jar);
      out.writeLong(file.getLen());
View Full Code Here

    if (numJars > 0) {

      for (int i = 0; i < numJars; i++) {

        final Path p = new Path();
        p.read(in);
        this.userJars.add(p);

        // Read the size of the jar file
        final long sizeOfJar = in.readLong();
View Full Code Here

    final Configuration conf = getEnvironment().getTaskConfiguration();

    final String outputPath = conf.getString("outputPath", null);

    if (outputPath != null) {
      return new Path(outputPath);
    }

    return null;
  }
View Full Code Here

    DeleteProcess dp = new DeleteProcess(name, jobID, count.get(new ImmutablePair(jobID,name)));
    executorService.schedule(dp, 5000L, TimeUnit.MILLISECONDS);
  }

  public Path getTempDir(JobID jobID, String name) {
    return new Path(GlobalConfiguration.getString(ConfigConstants.TASK_MANAGER_TMP_DIR_KEY,
      ConfigConstants.DEFAULT_TASK_MANAGER_TMP_PATH), DistributedCache.TMP_PREFIX + jobID.toString() + "_" +  name);
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.core.fs.Path

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.