StreamMessageType
- type of messages in this stream.SubClass
- type of the concrete sub-classpublic abstract class StreamDescriptor<StreamMessageType,SubClass extends StreamDescriptor<StreamMessageType,SubClass>>
extends java.lang.Object
StreamDescriptor
can be used for specifying Samza and system-specific properties of input/output streams.
Stream properties provided in configuration override corresponding properties specified using a descriptors.
This is the base descriptor for an input/output stream. Use a system-specific input/output descriptor
(e.g. KafkaInputDescriptor) obtained from its system descriptor (e.g. KafkaSystemDescriptor) if one is available.
Otherwise use the GenericInputDescriptor
and GenericOutputDescriptor
obtained from a
GenericSystemDescriptor
.
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getPhysicalName() |
Serde |
getSerde() |
java.lang.String |
getStreamId() |
SystemDescriptor |
getSystemDescriptor() |
java.lang.String |
getSystemName() |
java.util.Map<java.lang.String,java.lang.String> |
toConfig() |
SubClass |
withPhysicalName(java.lang.String physicalName)
The physical name of the stream on the system on which this stream will be accessed.
|
SubClass |
withStreamConfigs(java.util.Map<java.lang.String,java.lang.String> streamConfigs)
Additional system-specific properties for this stream.
|
public SubClass withPhysicalName(java.lang.String physicalName)
streamId
which is the logical name that Samza uses to identify the stream.
A physical name could be a Kafka topic name, an HDFS file URN, or any other system-specific identifier.
If not provided, the logical streamId
is used as the physical name.
physicalName
- physical name for this stream.public SubClass withStreamConfigs(java.util.Map<java.lang.String,java.lang.String> streamConfigs)
These properties are added under the streams.stream-id.*
scope.
streamConfigs
- system-specific properties for this streampublic java.lang.String getStreamId()
public java.lang.String getSystemName()
public Serde getSerde()
public SystemDescriptor getSystemDescriptor()
public java.util.Optional<java.lang.String> getPhysicalName()
public java.util.Map<java.lang.String,java.lang.String> toConfig()