Examples of toPath()


Examples of com.asakusafw.compiler.flow.Location.toPath()

                    Scanner scanner = new Scanner(input, "UTF-8");
                    while (scanner.hasNextLine()) {
                        String line = scanner.nextLine();
                        contents.add(line);
                    }
                    entries.put(location.toPath('/'), contents);
                    scanner.close();
                } finally {
                    input.close();
                }
            }
View Full Code Here

Examples of com.asakusafw.compiler.flow.Location.toPath()

                    Scanner scanner = new Scanner(input, "UTF-8");
                    while (scanner.hasNextLine()) {
                        String line = scanner.nextLine();
                        contents.add(line);
                    }
                    entries.put(location.toPath('/'), contents);
                    scanner.close();
                } finally {
                    input.close();
                }
            }
View Full Code Here

Examples of com.asakusafw.compiler.flow.Location.toPath()

        }

        private MethodDeclaration createStageOutputPath() {
            Location location = environment.getTargetLocation();
            location = getCleanupTarget(location);
            String path = location.toPath(PATH_SEPARATOR);
            return createValueMethod(
                    AbstractCleanupStageClient.METHOD_CLEANUP_PATH,
                    t(String.class),
                    Models.toLiteral(factory, path));
        }
View Full Code Here

Examples of com.asakusafw.compiler.flow.Location.toPath()

        return name.equals(FileOutputCommitter.SUCCEEDED_FILE_NAME) || name.equals("_logs");
    }

    private String computeInputPath(FileSystem fs, String tableName) {
        Location location = FlowPartDriverUtils.createInputLocation(driverContext, tableName);
        String path = new Path(fs.getWorkingDirectory(), location.toPath('/')).toString();
        return resolvePath(path);
    }

    private String computeOutputPath(FileSystem fs, String tableName) {
        Location location = FlowPartDriverUtils.createOutputLocation(driverContext, tableName);
View Full Code Here

Examples of com.asakusafw.compiler.flow.Location.toPath()

        return resolvePath(path);
    }

    private String computeOutputPath(FileSystem fs, String tableName) {
        Location location = FlowPartDriverUtils.createOutputLocation(driverContext, tableName);
        String path = new Path(fs.getWorkingDirectory(), location.toPath('/')).toString();
        return resolvePath(path);
    }

    private String resolvePath(String path) {
        assert path != null;
View Full Code Here

Examples of com.metamx.common.Granularity.toPath()

      long mTime = entry.getValue();

      String bucketOutput = String.format(
          "%s/%s",
          config.getSchema().getIOConfig().getSegmentOutputPath(),
          segmentGranularity.toPath(timeBucket)
      );
      for (FileStatus fileStatus : FSSpideringIterator.spiderIterable(fs, new Path(bucketOutput))) {
        if (fileStatus.getModificationTime() > mTime) {
          bucketsToRun.add(new Interval(timeBucket, segmentGranularity.increment(timeBucket)));
          break;
View Full Code Here

Examples of java.io.File.toPath()

            File metaInf = new File(file, "META-INF");
            if (!metaInf.isDirectory()) {
                return;
            }
            final Path filePath = file.toPath();
            Files.walkFileTree(metaInf.toPath(), new SimpleFileVisitor<Path>() {
                @Override
                public FileVisitResult visitFile(Path file,
                                                 BasicFileAttributes attrs)
                        throws IOException {
                    if (!file.getFileName().toString()
View Full Code Here

Examples of java.io.File.toPath()

                "Either the address provided with 'jscsi_target-published_ip' is illegal or not contained within the available network interfaces.");
     
        File schemaFile = new File("jscsi-target.xsd");
       
        if(schemaFile.exists() == false){
            Files.copy(context.getBundle().getResource("/jscsi-target.xsd").openStream(), schemaFile.toPath());
        }
       
        System.out.println("Schemafile: " + ((schemaFile.exists())? "exists" : "does not exist"));
       
        File configFile = new File("jscsi-target.xml");
View Full Code Here

Examples of java.io.File.toPath()

       
        System.out.println("Schemafile: " + ((schemaFile.exists())? "exists" : "does not exist"));
       
        File configFile = new File("jscsi-target.xml");
        if(configFile.exists() == false){
            Files.copy(context.getBundle().getResource("/jscsi-target.xml").openStream(), configFile.toPath());
        }
       
        System.out.println("Configfile: " + ((configFile.exists())? "exists" : "does not exist"));

        target = new TargetServer(Configuration.create(schemaFile, configFile, addr.getHostAddress()));
View Full Code Here

Examples of java.io.File.toPath()

        File fileAtPos = new File(mBaseDir + File.separator + filePos);
        if (!fileAtPos.exists()) {
            fileAtPos.createNewFile();
            cachedBytes = new byte[mFileSize];
            Files.write(fileAtPos.toPath(), cachedBytes);
        } else if (cachedBytes == null) {
            cachedBytes = Files.readAllBytes(fileAtPos.toPath());
            mCache.put((int) filePos, cachedBytes);
        }
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.