Github user mjsax commented on a diff in the pull request:
https://github.com/apache/flink/pull/1398#discussion_r45730899
--- Diff:
flink-contrib/flink-storm-examples/src/main/java/org/apache/flink/storm/util/BoltFileSink.java
---
@@ -40,16 +43,17 @@ public BoltFileSink(final String path) {
public BoltFileSink(final String path, final OutputFormatter formatter)
{
super(formatter);
- this.path = path;
+ this.path = new Path(path);
}
@SuppressWarnings("rawtypes")
@Override
public void prepareSimple(final Map stormConf, final TopologyContext
context) {
try {
- this.writer = new BufferedWriter(new
FileWriter(this.path));
+ FSDataOutputStream outputStream =
FileSystem.getLocalFileSystem().create(path, false);
+ this.writer = new BufferedWriter(new
OutputStreamWriter(outputStream));
} catch (final IOException e) {
--- End diff --
In my examples (ITCases) I strip the `file://" prefix before given the path
to the spout.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---