flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2622) Scala DataStream API does not have writeAsText method which supports WriteMode
Date Mon, 21 Dec 2015 15:22:46 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066559#comment-15066559
] 

ASF GitHub Bot commented on FLINK-2622:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1473#discussion_r48155123
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
---
    @@ -937,26 +941,40 @@ public ExecutionConfig getExecutionConfig() {
     	 *            NO_OVERWRITE and OVERWRITE.
     	 * @param millis
     	 *            the file update frequency
    -	 * 
    +	 * @param rowDelimiter
    +	 *            the delimiter for two rows
    +	 * @param fieldDelimiter
    +	 *            the delimiter for two fields
    +	 *
     	 * @return the closed DataStream
     	 */
     	@SuppressWarnings("unchecked")
    -	public <X extends Tuple> DataStreamSink<T> writeAsCsv(String path, WriteMode
writeMode,
    -			long millis) {
    -		Preconditions.checkArgument(getType().isTupleType(),
    -				"The writeAsCsv() method can only be used on data sets of tuples.");
    -		CsvOutputFormat<X> of = new CsvOutputFormat<X>(new Path(path),
    -				CsvOutputFormat.DEFAULT_LINE_DELIMITER, CsvOutputFormat.DEFAULT_FIELD_DELIMITER);
    +	public <X extends Tuple> DataStreamSink<T> writeAsCsv(
    +			String path,
    +			WriteMode writeMode,
    +			long millis,
    +			String rowDelimiter,
    +			String fieldDelimiter) {
    +		Preconditions.checkArgument(
    +			getType().isTupleType(),
    +			"The writeAsCsv() method can only be used on data sets of tuples.");
    --- End diff --
    
    Good catch. Will change it. Thx.


> Scala DataStream API does not have writeAsText method which supports WriteMode
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-2622
>                 URL: https://issues.apache.org/jira/browse/FLINK-2622
>             Project: Flink
>          Issue Type: Bug
>          Components: Scala API, Streaming
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>
> The Scala DataStream API, unlike the Java DataStream API, does not support a {{writeAsText}}
method which takes the {{WriteMode}} as a parameter. In order to make the two APIs consistent,
it should be added to the Scala DataStream API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message