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-1687) Streaming file source/sink API is not in sync with the batch API
Date Mon, 18 May 2015 16:21:00 GMT

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

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

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

    https://github.com/apache/flink/pull/521#discussion_r30523005
  
    --- Diff: flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
---
    @@ -378,31 +390,271 @@ public void registerType(Class<?> type) {
     	// --------------------------------------------------------------------------------------------
     
     	/**
    -	 * Creates a DataStream that represents the Strings produced by reading the
    -	 * given file line wise. The file will be read with the system's default
    -	 * character set.
    -	 * 
    +	 * Creates a new data stream that contains a sequence of numbers. The data stream will
be created with parallelism
    +	 * one, so the order of the elements is guaranteed.
    +	 *
    +	 * @param from
    +	 * 		The number to start at (inclusive)
    +	 * @param to
    +	 * 		The number to stop at (inclusive)
    +	 * @return A data stream, containing all number in the [from, to] interval
    +	 */
    +	public DataStreamSource<Long> generateSequence(long from, long to) {
    +		if (from > to) {
    +			throw new IllegalArgumentException("Start of sequence must not be greater than the
end");
    +		}
    +		return addSource(new GenSequenceFunction(from, to), "Sequence Source");
    +	}
    --- End diff --
    
    The `GenSequenceFunction` is a `ParallelSource` itself, this would give the same behaviour
as the `generateParallelSource()`.


> Streaming file source/sink API is not in sync with the batch API
> ----------------------------------------------------------------
>
>                 Key: FLINK-1687
>                 URL: https://issues.apache.org/jira/browse/FLINK-1687
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Gábor Hermann
>            Assignee: Péter Szabó
>
> Streaming environment is missing file inputs like readFile, readCsvFile and also the
more general createInput function, and outputs like writeAsCsv and write. Streaming and batch
API should be consistent.



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

Mime
View raw message