Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.Path


    if (libraryFileName == null) {
      throw new IOException("libraryName is null!");
    }

    final Path storePath = new Path(this.libraryCachePath + "/" + libraryFileName);

    synchronized (this.fs) {

      if (!fs.exists(storePath)) {
        throw new IOException(storePath + " does not exist!");
View Full Code Here


    }

    final byte[] buf = new byte[(int) length];
    in.readFully(buf);

    final Path storePath = new Path(this.libraryCachePath + "/" + libraryFileName);

    synchronized (this.fs) {

      // Check if file already exists in our library cache, if not write it to the cache directory
      if (!fs.exists(storePath)) {
View Full Code Here

    this.md.reset();
    this.md.update(buf);

    // Construct internal jar name from digest
    final String cacheName = StringUtils.byteToHexString(md.digest()) + ".jar";
    final Path storePath = new Path(this.libraryCachePath + "/" + cacheName);

    synchronized (this.fs) {

      // Check if file already exists in our library cache, if not write it to the cache directory
      if (!this.fs.exists(storePath)) {
View Full Code Here

   * Set minNumSplits to number of files.
   */
  @Override
  public FileInputSplit[] createInputSplits(int minNumSplits) throws IOException {
    int numAvroFiles = 0;
    final Path path = this.filePath;
    // get all the files that are involved in the splits
    final FileSystem fs = path.getFileSystem();
    final FileStatus pathFile = fs.getFileStatus(path);

    if (!acceptFile(pathFile)) {
      throw new IOException("The given file does not pass the file-filter");
    }
View Full Code Here

    this.path = filePath;
    this.executionContext = executionContext;
  }
 
  public CsvReader(String filePath, ExecutionEnvironment executionContext) {
    this(new Path(Validate.notNull(filePath, "The file path may not be null.")), executionContext);
  }
View Full Code Here

      TaskConfig taskConfig = new TaskConfig(output.getConfiguration());
      taskConfig.addInputToGroup(0);
      taskConfig.setInputSerializer(serializer, 0);

      PointOutFormat outFormat = new PointOutFormat();
      outFormat.setOutputFilePath(new Path(resultPath));
     
      taskConfig.setStubWrapper(new UserCodeObjectWrapper<PointOutFormat>(outFormat));
    }

    return output;
View Full Code Here

   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<String> readTextFile(String filePath) {
    Validate.notNull(filePath, "The file path may not be null.");
   
    return new DataSource<String>(this, new TextInputFormat(new Path(filePath)), BasicTypeInfo.STRING_TYPE_INFO );
  }
View Full Code Here

   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<String> readTextFile(String filePath, String charsetName) {
    Validate.notNull(filePath, "The file path may not be null.");

    TextInputFormat format = new TextInputFormat(new Path(filePath));
    format.setCharsetName(charsetName);
    return new DataSource<String>(this, format, BasicTypeInfo.STRING_TYPE_INFO );
  }
View Full Code Here

   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<StringValue> readTextFileWithValue(String filePath) {
    Validate.notNull(filePath, "The file path may not be null.");
   
    return new DataSource<StringValue>(this, new TextValueInputFormat(new Path(filePath)), new ValueTypeInfo<StringValue>(StringValue.class) );
  }
View Full Code Here

   * @return A DataSet that represents the data read from the given file as text lines.
   */
  public DataSource<StringValue> readTextFileWithValue(String filePath, String charsetName, boolean skipInvalidLines) {
    Validate.notNull(filePath, "The file path may not be null.");
   
    TextValueInputFormat format = new TextValueInputFormat(new Path(filePath));
    format.setCharsetName(charsetName);
    format.setSkipInvalidLines(skipInvalidLines);
    return new DataSource<StringValue>(this, format, new ValueTypeInfo<StringValue>(StringValue.class) );
  }
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.