Package org.apache.flink.core.fs

Examples of org.apache.flink.core.fs.FileSystem.mkdirs()


    try {

      final FileSystem fs = bucketPath.getFileSystem();

      // Create directory
      fs.mkdirs(bucketPath);

      // Check if directory is correctly displayed in file system hierarchy
      final FileStatus[] content = fs.listStatus(new Path(S3_BASE_URI));
      boolean entryFound = false;
      for (final FileStatus entry : content) {
View Full Code Here


    try {

      final FileSystem fs = dir.getFileSystem();

      fs.mkdirs(subsubdir);

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

    try {

      final FileSystem fs = dir.getFileSystem();

      fs.mkdirs(dir);

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

    final Path objectPath = new Path(S3_BASE_URI + bucketName + Path.SEPARATOR + objectName);

    FileSystem fs = bucketPath.getFileSystem();

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

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

  public static void copy(Path sourcePath, Path targetPath, boolean executable) throws IOException {
    FileSystem sFS = sourcePath.getFileSystem();
    FileSystem tFS = targetPath.getFileSystem();
    if (!tFS.exists(targetPath)) {
      if (sFS.getFileStatus(sourcePath).isDir()) {
        tFS.mkdirs(targetPath);
        FileStatus[] contents = sFS.listStatus(sourcePath);
        for (FileStatus content : contents) {
          String distPath = content.getPath().toString();
          if (content.isDir()) {
            if (distPath.endsWith("/")) {
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.