Package

com.twitter.finatra.kafkastreams.transformer

utils

Permalink

package utils

Visibility
  1. Public
  2. All

Type Members

  1. trait IteratorImplicits extends AnyRef

    Permalink
  2. class MultiSpanIterator[T, SpanId] extends Iterator[Iterator[T]]

    Permalink

    This Iterator will take an Iterator and split it into subiterators, where each subiterator contains all contiguous elements that have the same span as defined by the getSpan function.

    This Iterator will take an Iterator and split it into subiterators, where each subiterator contains all contiguous elements that have the same span as defined by the getSpan function.

    For example:

    Passing in an Iterator(1, 1, 1, 2, 2, 3) with a span function of identity will yield:

    Iterator(
      Iterator(1,1,1),
      Iterator(2,2),
      Iterator(3))

    If there are multiple elements that have the same span, but they are not contiguous then they will be returned in separate subiterators.

    For example:

    Passing in an Iterator(1,2,1,2) with a span function of identity will yield:

    Iterator(
      Iterator(1),
      Iterator(2),
      Iterator(1),
      Iterator(2))

    Contiguous is defined by the Iterator.span function:

    T

    the type of the item

    SpanId

    the type of the span

    See also

    scala.collection.Iterator.span

Value Members

  1. object SamplingUtils

    Permalink

Ungrouped