WriteAsText bug or bad name?
Posted by
Flavio Pompermaier on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/WriteAsText-bug-or-bad-name-tp236.html
Hi to all,
running the example at
http://flink.incubator.apache.org/docs/0.7-incubating/local_execution.html I was thinking that the writeAsText on a local file was creating a text file on my local filesystem..instead it creates something similar to a sequence file (within a folder).
This is something misleading I think...or the API name is wrong or this is a bug (IMHO).
Btw..how can I modify the following program to write results in a single text file on my local filesystem?
public static void main(String[] args) throws Exception {
ExecutionEnvironment env = ExecutionEnvironment.createLocalEnvironment();
DataSet<String> data = env.readTextFile("file:///tmp/res.txt");
data.filter(new FilterFunction<String>() {
public boolean filter(String value) {
return value.startsWith("http://");
}
}).writeAsText("file:///
tmp/res.txt
");
env.execute();
}
Best,
Flavio