Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.Path


      PrintStream ps = new  PrintStream(tempFile);
      ps.println(FIRST);
      ps.println(SECOND);
      ps.close();
     
      TextInputFormat inputFormat = new TextInputFormat(new Path(tempFile.toURI().toString()));
     
      Configuration parameters = new Configuration();
      inputFormat.configure(parameters);
     
      FileInputSplit[] splits = inputFormat.createInputSplits(1);
View Full Code Here


     
      OutputStreamWriter wrt = new OutputStreamWriter(new FileOutputStream(tempFile));
      wrt.write(CONTENT);
      wrt.close();
     
      TextInputFormat inputFormat = new TextInputFormat(new Path(tempFile.toURI().toString()));
      inputFormat.setFilePath(tempFile.toURI().toString());
     
      Configuration parameters = new Configuration();
      inputFormat.configure(parameters);
     
View Full Code Here

   
    FileWriter wrt = new FileWriter(tempFile);
    wrt.write(content);
    wrt.close();
     
    return new FileInputSplit(0, new Path(tempFile.toURI().toString()), 0, tempFile.length(), new String[] {"localhost"});
  }
View Full Code Here

     
      OutputStreamWriter wrt = new OutputStreamWriter(new FileOutputStream(tempFile));
      wrt.write(fileContent);
      wrt.close();
     
      CsvInputFormat<Tuple1<String>> inputFormat = new CsvInputFormat<Tuple1<String>>(new Path(tempFile.toURI().toString()),String.class);
     
      Configuration parameters = new Configuration();
      inputFormat.configure(parameters);
     
      inputFormat.setDelimiter(lineBreakerSetup);
View Full Code Here

   
    DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
    dos.writeBytes(content);
    dos.close();
     
    return new FileInputSplit(0, new Path(this.tempFile.toURI().toString()), 0, this.tempFile.length(), new String[] {"localhost"});
  }
View Full Code Here

   * @param fs
   *        the file system the corresponding file has been read from
   */
  public LocalFileStatus(final File f, final FileSystem fs) {
    this.file = f;
    this.path = new Path(fs.getUri().getScheme() + ":" + f.toURI().getPath());
  }
View Full Code Here

  /**
   * Constructs a new <code>LocalFileSystem</code> object.
   */
  public LocalFileSystem() {
    this.workingDir = new Path(System.getProperty("user.dir")).makeQualified(this);

    String tmp = "unknownHost";

    try {
      tmp = InetAddress.getLocalHost().getHostName();
View Full Code Here

  }


  private File pathToFile(Path path) {
    if (!path.isAbsolute()) {
      path = new Path(getWorkingDirectory(), path);
    }
    return new File(path.toUri().getPath());
  }
View Full Code Here

    if (names == null) {
      return null;
    }
    results = new FileStatus[names.length];
    for (int i = 0; i < names.length; i++) {
      results[i] = getFileStatus(new Path(f, names[i]));
    }

    return results;
  }
View Full Code Here

   * @throws IOException
   *         thrown if an error occurred while creating the directory/directories
   */
  public boolean mkdirs(final Path f) throws IOException {

    final Path parent = f.getParent();
    final File p2f = pathToFile(f);
    return (parent == null || mkdirs(parent)) && (p2f.mkdir() || p2f.isDirectory());
  }
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.