forked from antonis.lempesis/dnet-hadoop
add create file instruction
This commit is contained in:
parent
354f0162be
commit
276b95b7b3
|
@ -119,6 +119,7 @@ public class ReadBlacklistFromDB implements Closeable {
|
||||||
this.conf.set("fs.defaultFS", hdfsNameNode);
|
this.conf.set("fs.defaultFS", hdfsNameNode);
|
||||||
FileSystem fileSystem = FileSystem.get(this.conf);
|
FileSystem fileSystem = FileSystem.get(this.conf);
|
||||||
Path hdfsWritePath = new Path(hdfsPath);
|
Path hdfsWritePath = new Path(hdfsPath);
|
||||||
|
fileSystem.create(hdfsWritePath);
|
||||||
FSDataOutputStream fsDataOutputStream = fileSystem.append(hdfsWritePath);
|
FSDataOutputStream fsDataOutputStream = fileSystem.append(hdfsWritePath);
|
||||||
this.writer = new BufferedWriter(new OutputStreamWriter(fsDataOutputStream, StandardCharsets.UTF_8));
|
this.writer = new BufferedWriter(new OutputStreamWriter(fsDataOutputStream, StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue