public class StreamSpec
extends java.lang.Object
Constructor and Description |
---|
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName) |
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName,
boolean isBounded,
java.util.Map<java.lang.String,java.lang.String> config) |
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName,
int partitionCount) |
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName,
int partitionCount,
boolean isBounded,
java.util.Map<java.lang.String,java.lang.String> config) |
Modifier and Type | Method and Description |
---|---|
StreamSpec |
copyWithPartitionCount(int partitionCount)
Copies this StreamSpec, but applies a new partitionCount.
|
StreamSpec |
copyWithPhysicalName(java.lang.String physicalName) |
static StreamSpec |
createChangeLogStreamSpec(java.lang.String physicalName,
java.lang.String systemName,
int partitionCount) |
static StreamSpec |
createCheckpointStreamSpec(java.lang.String physicalName,
java.lang.String systemName) |
static StreamSpec |
createCoordinatorStreamSpec(java.lang.String physicalName,
java.lang.String systemName) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
get(java.lang.String propertyName) |
java.util.Map<java.lang.String,java.lang.String> |
getConfig() |
java.lang.String |
getId() |
java.lang.String |
getOrDefault(java.lang.String propertyName,
java.lang.String defaultValue) |
int |
getPartitionCount() |
java.lang.String |
getPhysicalName() |
java.lang.String |
getSystemName() |
int |
hashCode() |
boolean |
isBounded() |
boolean |
isChangeLogStream() |
boolean |
isCoordinatorStream() |
java.lang.String |
toString() |
SystemStream |
toSystemStream() |
public StreamSpec(java.lang.String id, java.lang.String physicalName, java.lang.String systemName)
id
- The application-unique logical identifier for the stream. It is used to distinguish between
streams in a Samza application so it must be unique in the context of one deployable unit.
It does not need to be globally unique or unique with respect to a host.physicalName
- The physical identifier for the stream. This is the identifier that will be used in remote
systems to identify the stream. In Kafka this would be the topic name whereas in HDFS it
might be a file URN.systemName
- The System name on which this stream will exist. Corresponds to a named implementation of the
Samza System abstraction. See SystemFactory
public StreamSpec(java.lang.String id, java.lang.String physicalName, java.lang.String systemName, int partitionCount)
id
- The application-unique logical identifier for the stream. It is used to distinguish between
streams in a Samza application so it must be unique in the context of one deployable unit.
It does not need to be globally unique or unique with respect to a host.physicalName
- The physical identifier for the stream. This is the identifier that will be used in remote
systems to identify the stream. In Kafka this would be the topic name whereas in HDFS it
might be a file URN.systemName
- The System name on which this stream will exist. Corresponds to a named implementation of the
Samza System abstraction. See SystemFactory
partitionCount
- The number of partitionts for the stream. A value of 1
indicates unpartitioned.public StreamSpec(java.lang.String id, java.lang.String physicalName, java.lang.String systemName, boolean isBounded, java.util.Map<java.lang.String,java.lang.String> config)
id
- The application-unique logical identifier for the stream. It is used to distinguish between
streams in a Samza application so it must be unique in the context of one deployable unit.
It does not need to be globally unique or unique with respect to a host.physicalName
- The physical identifier for the stream. This is the identifier that will be used in remote
systems to identify the stream. In Kafka this would be the topic name whereas in HDFS it
might be a file URN.systemName
- The System name on which this stream will exist. Corresponds to a named implementation of the
Samza System abstraction. See SystemFactory
isBounded
- The stream is bounded or not.config
- A map of properties for the stream. These may be System-specfic.public StreamSpec(java.lang.String id, java.lang.String physicalName, java.lang.String systemName, int partitionCount, boolean isBounded, java.util.Map<java.lang.String,java.lang.String> config)
id
- The application-unique logical identifier for the stream. It is used to distinguish between
streams in a Samza application so it must be unique in the context of one deployable unit.
It does not need to be globally unique or unique with respect to a host.physicalName
- The physical identifier for the stream. This is the identifier that will be used in remote
systems to identify the stream. In Kafka this would be the topic name whereas in HDFS it
might be a file URN.systemName
- The System name on which this stream will exist. Corresponds to a named implementation of the
Samza System abstraction. See SystemFactory
partitionCount
- The number of partitionts for the stream. A value of 1
indicates unpartitioned.isBounded
- The stream is bounded or not.config
- A map of properties for the stream. These may be System-specfic.public java.lang.String toString()
toString
in class java.lang.Object
public StreamSpec copyWithPartitionCount(int partitionCount)
partitionCount
- The partitionCount for the returned StreamSpec.public StreamSpec copyWithPhysicalName(java.lang.String physicalName)
public java.lang.String getId()
public java.lang.String getSystemName()
public java.lang.String getPhysicalName()
public int getPartitionCount()
public java.util.Map<java.lang.String,java.lang.String> getConfig()
public java.lang.String get(java.lang.String propertyName)
public java.lang.String getOrDefault(java.lang.String propertyName, java.lang.String defaultValue)
public SystemStream toSystemStream()
public boolean isChangeLogStream()
public boolean isCoordinatorStream()
public boolean isBounded()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static StreamSpec createChangeLogStreamSpec(java.lang.String physicalName, java.lang.String systemName, int partitionCount)
public static StreamSpec createCoordinatorStreamSpec(java.lang.String physicalName, java.lang.String systemName)
public static StreamSpec createCheckpointStreamSpec(java.lang.String physicalName, java.lang.String systemName)