Package org.apache.storm.loadgen
Class InputStream
java.lang.Object
org.apache.storm.loadgen.InputStream
- All Implemented Interfaces:
Serializable
A set of measurements about a stream so we can statistically reproduce it.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfinal NormalDistStats
final String
final GroupingType
final String
final NormalDistStats
final String
-
Constructor Summary
ConstructorDescriptionInputStream
(String fromComponent, String toComponent, String id, NormalDistStats execTime, NormalDistStats processTime, GroupingType groupingType) Create a new input stream to a bolt. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
Create an output stream from a config.gsid()
Get the global stream id for this input stream.remap
(Map<String, String> remappedComponents, Map<GlobalStreamId, GlobalStreamId> remappedStreams) Remap the names of components.Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.toConf()
Convert this to a conf.
-
Field Details
-
fromComponent
-
toComponent
-
id
-
execTime
-
processTime
-
groupingType
-
-
Constructor Details
-
InputStream
public InputStream(String fromComponent, String toComponent, String id, NormalDistStats execTime, NormalDistStats processTime, GroupingType groupingType) Create a new input stream to a bolt.- Parameters:
fromComponent
- the source component of the stream.id
- the id of the streamexecTime
- exec time statsprocessTime
- process time stats
-
-
Method Details
-
fromConf
Create an output stream from a config.- Parameters:
conf
- the config to read from.- Returns:
- the read OutputStream.
-
toConf
Convert this to a conf.- Returns:
- the conf.
-
gsid
Get the global stream id for this input stream.- Returns:
- the GlobalStreamId for this input stream.
-
remap
public InputStream remap(Map<String, String> remappedComponents, Map<GlobalStreamId, GlobalStreamId> remappedStreams) Remap the names of components.- Parameters:
remappedComponents
- old name to new name of components.remappedStreams
- old ID to new ID of streams.- Returns:
- a modified version of this with names remapped.
-
replaceShuffleWithLocalOrShuffle
Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.- Returns:
- a modified copy of this
-