Class CountingSource

    • Method Detail

      • upTo

        @Deprecated
        public static BoundedSource<java.lang.Long> upTo​(long numElements)
        Deprecated.
        use GenerateSequence instead
        Creates a BoundedSource that will produce the specified number of elements, from 0 to numElements - 1.
      • unbounded

        @Deprecated
        public static UnboundedSource<java.lang.Long,​CountingSource.CounterMark> unbounded()
        Deprecated.
        use GenerateSequence instead
        Creates an UnboundedSource that will produce numbers starting from 0 up to Long.MAX_VALUE.

        After Long.MAX_VALUE, the source never produces more output. (In practice, this limit should never be reached.)

        Elements in the resulting PCollection<Long> will have timestamps corresponding to processing time at element generation, provided by Instant.now().