[
https://issues.apache.org/jira/browse/FLINK-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15025352#comment-15025352
]
ASF GitHub Bot commented on FLINK-3059:
---------------------------------------
Github user jaoki commented on a diff in the pull request:
https://github.com/apache/flink/pull/1392#discussion_r45792220
--- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
---
@@ -1343,10 +1343,34 @@ public long count() throws Exception {
//
--------------------------------------------------------------------------------------------
/**
- * Writes a DataSet as a text file to the specified location.<br>
- * For each element of the DataSet the result of {@link
Object#toString()} is written.
+ * Writes a DataSet as text file(s) to the specified location.<br>
+ * For each element of the DataSet the result of {@link
Object#toString()} is written.<br/>
+ * <br/>
+ * <span class="strong">How it writes DataSet</span><br/>
+ * A single file is written when
+ * <ul>
+ * <li>parallelism is set to 1</li>
+ * <li>or <a
href="https://ci.apache.org/projects/flink/flink-docs-master/setup/config.html#file-systems">fs.output.always-create-directory</a>
is set to true in flink-conf.yaml file</li>
--- End diff --
@StephanEwen , good catch.
Let me clarify this further. We have 3 cases (instead of the current 2
cases)
1. /path1 as text file
2. /path1/1 and /path1/2 and so on
3. /path1/1 only. and 1 is a sole text file.
I mixed 1 and 3. will fix
> Javadoc fix for DataSet.writeAsText()
> -------------------------------------
>
> Key: FLINK-3059
> URL: https://issues.apache.org/jira/browse/FLINK-3059
> Project: Flink
> Issue Type: Bug
> Reporter: jun aoki
> Priority: Trivial
>
> Currently writeAsText() in javadoc states it simply generates a file,
> but this is not always true and it depends on the environment configuration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)