use of java.util.stream.IntStream.range in project hazelcast-jet by hazelcast.
the class ReadHdfsPTest method writeToFile.
private void writeToFile() throws IOException {
Configuration conf = new Configuration();
LocalFileSystem local = FileSystem.getLocal(conf);
IntStream.range(0, 4).mapToObj(i -> createPath()).forEach(path -> uncheckRun(() -> {
paths.add(path);
if (SequenceFileInputFormat.class.equals(inputFormatClass)) {
writeToSequenceFile(conf, path);
} else {
writeToTextFile(local, path);
}
}));
}
Aggregations