Uses of Interface
com.gengoai.stream.MStream
-
Packages that use MStream Package Description com.gengoai.io Classes for reading and writing to various different sources, e.g.com.gengoai.io.resource A mix between Java's FileSystem and Spring's Resourcecom.gengoai.math com.gengoai.stream A unified stream interface that can work across Java and Spark streams.com.gengoai.stream.local com.gengoai.stream.spark -
-
Uses of MStream in com.gengoai.io
Methods in com.gengoai.io that return MStream Modifier and Type Method Description static <T> MStream<T>
ResourceMonitor. monitor(@NonNull MStream<T> stream)
Monitors the given MStreamMethods in com.gengoai.io with parameters of type MStream Modifier and Type Method Description static <T> MStream<T>
ResourceMonitor. monitor(@NonNull MStream<T> stream)
Monitors the given MStream -
Uses of MStream in com.gengoai.io.resource
Methods in com.gengoai.io.resource that return MStream Modifier and Type Method Description MStream<String>
ByteArrayResource. lines()
default MStream<String>
Resource. lines()
Creates anMStream
over the lines in the resource.MStream<String>
StringResource. lines()
MStream<String>
URLResource. lines()
default MStream<String>
WriteOnlyResource. lines()
-
Uses of MStream in com.gengoai.math
Methods in com.gengoai.math with parameters of type MStream Modifier and Type Method Description <T> Optional<T>
Optimum. optimum(MStream<T> stream, SerializableToDoubleFunction<T> function)
Optimum optional. -
Uses of MStream in com.gengoai.stream
Methods in com.gengoai.stream that return MStream Modifier and Type Method Description MStream<T>
MStream. cache()
Caches the stream.MStream<T>
MStream. distinct()
Removes duplicates from the streamabstract <T> MStream<T>
StreamingContext. empty()
Creates a new empty streamMStream<T>
MStream. filter(SerializablePredicate<? super T> predicate)
Filters the stream.<R> MStream<R>
MStream. flatMap(SerializableFunction<? super T,Stream<? extends R>> mapper)
Maps the objects in this stream to one or more new objects using the given function.MStream<T>
MStream. intersection(MStream<T> other)
Returns a new MStream containing the intersection of elements in this stream and the argument stream.MStream<T>
MPairStream. keys()
Returns a stream over the keys in this pair streamMStream<T>
MStream. limit(long number)
Limits the stream to the firstnumber
items.<R> MStream<R>
MPairStream. map(SerializableBiFunction<? super T,? super U,? extends R> function)
Maps the key-value pairs to a new object<R> MStream<R>
MStream. map(SerializableFunction<? super T,? extends R> function)
Maps the objects in the stream using the given function<T> MStream<T>
MDoubleStream. mapToObj(SerializableDoubleFunction<? extends T> function)
Maps the doubles in the stream to objects using the given functionMStream<T>
MStream. onClose(SerializableRunnable closeHandler)
Sets the handler to call when the stream is closed.MStream<T>
MStream. parallel()
Ensures that the stream is parallel or distributed.MStream<Stream<T>>
MStream. partition(long partitionSize)
Partitions the stream into iterables each of size<=
partitionSize
.MStream<T>
MStream. persist(StorageLevel storageLevel)
Persists the stream to the given storage levelabstract MStream<Integer>
StreamingContext. range(int startInclusive, int endExclusive)
Creates a ranged based integer stream starting atstartInclusive
and ending beforeendExclusive
.MStream<T>
MStream. repartition(int numPartitions)
Repartitions the stream to the given number of partitions.MStream<T>
MStream. sample(boolean withReplacement, int number)
Randomly samplesnumber
items from the stream.default MStream<T>
MStream. shuffle()
Shuffles the items in the stream.MStream<T>
MStream. shuffle(Random random)
Shuffles the items in the string using the givenRandom
object.MStream<T>
MStream. skip(long n)
Skips the firstn
items in the stream<R extends Comparable<R>>
MStream<T>MStream. sortBy(boolean ascending, SerializableFunction<? super T,? extends R> keyFunction)
Sorts the items in the stream in ascending or descending order using the given keyFunction to determine how to compare.default MStream<T>
MStream. sorted(boolean ascending)
Sorts the items in the stream in ascending or descending order.abstract <T> MStream<T>
StreamingContext. stream(Iterable<? extends T> iterable)
Creates a new MStream from the given iterable<T> MStream<T>
StreamingContext. stream(Iterator<? extends T> iterator)
Creates a new MStream from the given iteratorabstract <T> MStream<T>
StreamingContext. stream(Stream<T> stream)
Creates a new MStream from Java Stream<T> MStream<T>
StreamingContext. stream(T... items)
Creates a stream wrapping the given items.abstract MStream<String>
StreamingContext. textFile(@NonNull Resource location)
Creates a new MStream where each element is a line in the resources (recursive) at the given location.abstract MStream<String>
StreamingContext. textFile(@NonNull Resource location, boolean wholeFile)
Creates a new MStream where each element is the entire content of a resource (wholeFile = true) or a single line of the resource (wholeFile = False) and resources are gathered recursively from the given location.MStream<String>
StreamingContext. textFile(@NonNull Resource location, @NonNull String pattern)
Creates a new MStream where each element is a line in the resources (recursive) at the given location only reading files matching the given pattern.abstract MStream<String>
StreamingContext. textFile(String location)
Creates a new MStream where each element is a line in the resources (recursive) at the given location.MStream<T>
MStream. union(MStream<T> other)
Unions this stream with another.MStream<U>
MPairStream. values()
Returns a stream of valuesMethods in com.gengoai.stream with parameters of type MStream Modifier and Type Method Description MStream<T>
MStream. intersection(MStream<T> other)
Returns a new MStream containing the intersection of elements in this stream and the argument stream.MStream<T>
MStream. union(MStream<T> other)
Unions this stream with another.<U> MPairStream<T,U>
MStream. zip(MStream<U> other)
Zips (combines) this stream together with the given other creating a pair stream. -
Uses of MStream in com.gengoai.stream.local
Classes in com.gengoai.stream.local that implement MStream Modifier and Type Class Description class
LocalInMemoryMStream<T>
The type Local in memory m stream.class
LocalReusableMStream<T>
The type Local reusable m stream.Methods in com.gengoai.stream.local that return MStream Modifier and Type Method Description protected abstract MStream<Map.Entry<K,V>>
AbstractLocalMPairStream. asMStream()
protected MStream<Map.Entry<K,V>>
LocalDefaultMPairStream. asMStream()
MStream<T>
LocalInMemoryMStream. cache()
<T> MStream<T>
LocalStreamingContext. empty()
MStream<K>
AbstractLocalMPairStream. keys()
<R> MStream<R>
AbstractLocalMPairStream. map(@NonNull SerializableBiFunction<? super K,? super V,? extends R> function)
<T> MStream<T>
LocalMDoubleStream. mapToObj(@NonNull SerializableDoubleFunction<? extends T> function)
MStream<T>
LocalInMemoryMStream. onClose(SerializableRunnable closeHandler)
MStream<T>
LocalInMemoryMStream. parallel()
MStream<Stream<T>>
LocalInMemoryMStream. partition(long partitionSize)
MStream<Integer>
LocalStreamingContext. range(int startInclusive, int endExclusive)
MStream<T>
LocalInMemoryMStream. sample(boolean withReplacement, int number)
MStream<T>
LocalInMemoryMStream. skip(long n)
<T> MStream<T>
LocalStreamingContext. stream(Iterable<? extends T> iterable)
<T> MStream<T>
LocalStreamingContext. stream(Stream<T> stream)
MStream<String>
LocalStreamingContext. textFile(Resource resource)
MStream<String>
LocalStreamingContext. textFile(Resource location, boolean wholeFile)
MStream<String>
LocalStreamingContext. textFile(String location)
MStream<V>
AbstractLocalMPairStream. values()
Constructors in com.gengoai.stream.local with parameters of type MStream Constructor Description LocalDefaultMPairStream(MStream<Map.Entry<K,V>> stream)
-
Uses of MStream in com.gengoai.stream.spark
Classes in com.gengoai.stream.spark that implement MStream Modifier and Type Class Description class
SparkStream<T>
A MStream wrapper around a Spark RDD.Methods in com.gengoai.stream.spark that return MStream Modifier and Type Method Description MStream<T>
SparkStream. intersection(MStream<T> other)
MStream<T>
SparkPairStream. keys()
<R> MStream<R>
SparkPairStream. map(SerializableBiFunction<? super T,? super U,? extends R> function)
MStream<T>
SparkStream. onClose(SerializableRunnable closeHandler)
MStream<Stream<T>>
SparkStream. partition(long partitionSize)
MStream<T>
SparkStream. persist(StorageLevel storageLevel)
<R extends Comparable<R>>
MStream<T>SparkStream. sortBy(boolean ascending, SerializableFunction<? super T,? extends R> keyFunction)
MStream<String>
SparkStreamingContext. textFile(Resource location, boolean wholeFile)
MStream<U>
SparkPairStream. values()
Methods in com.gengoai.stream.spark with parameters of type MStream Modifier and Type Method Description MStream<T>
SparkStream. intersection(MStream<T> other)
SparkStream<T>
SparkStream. union(MStream<T> other)
<U> SparkPairStream<T,U>
SparkStream. zip(MStream<U> other)
Constructors in com.gengoai.stream.spark with parameters of type MStream Constructor Description SparkStream(MStream<T> mStream)
Instantiates a new Spark stream.
-