Class CustomStreamlet<R,T>
- java.lang.Object
-
- org.apache.heron.streamlet.impl.StreamletBaseImpl<R>
-
- org.apache.heron.streamlet.impl.StreamletImpl<T>
-
- org.apache.heron.streamlet.impl.streamlets.CustomStreamlet<R,T>
-
- All Implemented Interfaces:
Streamlet<T>
,StreamletBase<T>
public class CustomStreamlet<R,T> extends StreamletImpl<T>
CustomStreamlet represents a Streamlet that is made up of applying the user supplied custom operator to each element of the parent streamlet.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.heron.streamlet.impl.StreamletBaseImpl
StreamletBaseImpl.StreamletNamePrefix
-
-
Field Summary
-
Fields inherited from class org.apache.heron.streamlet.impl.StreamletBaseImpl
name, nPartitions
-
-
Constructor Summary
Constructors Constructor Description CustomStreamlet(StreamletImpl<R> parent, IStreamletOperator<R,T> operator, StreamGrouping grouper)
Create a custom streamlet from user defined CustomOperator object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doBuild(TopologyBuilder bldr, Set<String> stageNames)
Connect this streamlet to TopologyBuilder.-
Methods inherited from class org.apache.heron.streamlet.impl.StreamletImpl
applyOperator, applyOperator, clone, consume, countByKey, countByKeyAndWindow, filter, flatMap, getAvailableStreamIds, getStreamId, join, join, keyBy, keyBy, log, map, reduceByKey, reduceByKey, reduceByKeyAndWindow, reduceByKeyAndWindow, repartition, repartition, setName, setNumPartitions, split, toSink, transform, union, withStream
-
Methods inherited from class org.apache.heron.streamlet.impl.StreamletBaseImpl
addChild, build, getChildren, getName, getNumPartitions, isBuilt, isFullyBuilt, setDefaultNameIfNone
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.heron.streamlet.Streamlet
getName, getNumPartitions
-
-
-
-
Constructor Detail
-
CustomStreamlet
public CustomStreamlet(StreamletImpl<R> parent, IStreamletOperator<R,T> operator, StreamGrouping grouper)
Create a custom streamlet from user defined CustomOperator object.- Parameters:
parent
- The parent(upstream) streamlet objectoperator
- The user defined CustomeOperatorgrouper
- The StreamGrouper to be used with the operator
-
-
Method Detail
-
doBuild
public boolean doBuild(TopologyBuilder bldr, Set<String> stageNames)
Connect this streamlet to TopologyBuilder.- Specified by:
doBuild
in classStreamletBaseImpl<T>
- Parameters:
bldr
- The TopologyBuilder for the topologystageNames
- The existing stage names- Returns:
- True if successful
-
-