Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.FileSystem.create()


      if (status.isDir()) {
        outputPath = new Path(outputPath.toUri().toString() + "/file_" + getIndexInSubtaskGroup() + ".txt");
      }
    }

    final FSDataOutputStream outputStream = fs.create(outputPath, true);

    while (this.input.hasNext()) {

      StringRecord record = this.input.next();
      byte[] recordByte = (record.toString() + "\r\n").getBytes();
View Full Code Here


      final FileSystem fs = dir.getFileSystem();

      fs.mkdirs(subsubdir);

      final OutputStream os = fs.create(file, true);
      generateTestData(os, SMALL_FILE_SIZE);
      os.close();

      // On this directory levels there should only be one subdirectory
      FileStatus[] list = fs.listStatus(dir);
View Full Code Here

      final FileSystem fs = dir.getFileSystem();

      fs.mkdirs(dir);

      final OutputStream os = fs.create(file, true);
      generateTestData(os, SMALL_FILE_SIZE);
      os.close();

      final FileStatus fileStatus = fs.getFileStatus(file);
      assertNotNull(fileStatus);
View Full Code Here

    // Create test bucket
    fs.mkdirs(bucketPath);

    // Write test file to S3
    final FSDataOutputStream outputStream = fs.create(objectPath, false);
    generateTestData(outputStream, fileSize);
    outputStream.close();

    // Now read the same file back from S3
    final FSDataInputStream inputStream = fs.open(objectPath);
View Full Code Here

        }
         
        // create output file
        switch(writeMode) {
        case NO_OVERWRITE:
          this.fdos = fs.create(p, false);
          break;
        case OVERWRITE:
          this.fdos = fs.create(p, true);
          break;
        default:
View Full Code Here

        switch(writeMode) {
        case NO_OVERWRITE:
          this.fdos = fs.create(p, false);
          break;
        case OVERWRITE:
          this.fdos = fs.create(p, true);
          break;
        default:
          throw new IllegalArgumentException("Invalid write mode: "+writeMode);
        }
       
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.