Package org.apache.flink.streaming.api.function.source

Examples of org.apache.flink.streaming.api.function.source.GenSequenceFunction


   */
  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), 1);
  }
View Full Code Here


  }
 
  @Test
  public void genSequenceTest() {
    List<Long> expectedList = Arrays.asList(1L, 2L, 3L);
    List<Long> actualList = MockSource.createAndExecute(new GenSequenceFunction(1, 3));
    assertEquals(expectedList, actualList);
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.streaming.api.function.source.GenSequenceFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.