1
0
Fork 0

add create file instruction

This commit is contained in:
Miriam Baglioni 2020-04-30 15:05:17 +02:00
parent 354f0162be
commit 276b95b7b3
1 changed files with 1 additions and 0 deletions

View File

@ -119,6 +119,7 @@ public class ReadBlacklistFromDB implements Closeable {
this.conf.set("fs.defaultFS", hdfsNameNode);
FileSystem fileSystem = FileSystem.get(this.conf);
Path hdfsWritePath = new Path(hdfsPath);
fileSystem.create(hdfsWritePath);
FSDataOutputStream fsDataOutputStream = fileSystem.append(hdfsWritePath);
this.writer = new BufferedWriter(new OutputStreamWriter(fsDataOutputStream, StandardCharsets.UTF_8));
}