Package org.apache.storm.loadgen
Class InputStream
- java.lang.Object
-
- org.apache.storm.loadgen.InputStream
-
- All Implemented Interfaces:
Serializable
public class InputStream extends Object implements Serializable
A set of measurements about a stream so we can statistically reproduce it.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InputStream.Builder
-
Field Summary
Fields Modifier and Type Field Description NormalDistStats
execTime
String
fromComponent
GroupingType
groupingType
String
id
NormalDistStats
processTime
String
toComponent
-
Constructor Summary
Constructors Constructor Description InputStream(String fromComponent, String toComponent, String id, NormalDistStats execTime, NormalDistStats processTime, GroupingType groupingType)
Create a new input stream to a bolt.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InputStream
fromConf(Map<String,Object> conf)
Create an output stream from a config.GlobalStreamId
gsid()
Get the global stream id for this input stream.InputStream
remap(Map<String,String> remappedComponents, Map<GlobalStreamId,GlobalStreamId> remappedStreams)
Remap the names of components.InputStream
replaceShuffleWithLocalOrShuffle()
Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.Map<String,Object>
toConf()
Convert this to a conf.
-
-
-
Field Detail
-
fromComponent
public final String fromComponent
-
toComponent
public final String toComponent
-
id
public final String id
-
execTime
public final NormalDistStats execTime
-
processTime
public final NormalDistStats processTime
-
groupingType
public final GroupingType groupingType
-
-
Constructor Detail
-
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 Detail
-
fromConf
public static InputStream fromConf(Map<String,Object> conf)
Create an output stream from a config.- Parameters:
conf
- the config to read from.- Returns:
- the read OutputStream.
-
gsid
public GlobalStreamId 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
public InputStream replaceShuffleWithLocalOrShuffle()
Replace all SHUFFLE groupings with LOCAL_OR_SHUFFLE.- Returns:
- a modified copy of this
-
-