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,
int partitionCount) |
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName,
int partitionCount,
java.util.Map<java.lang.String,java.lang.String> config) |
StreamSpec(java.lang.String id,
java.lang.String physicalName,
java.lang.String systemName,
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.
|
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() |
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, 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
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, 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.config
- A map of properties for the stream. These may be System-specfic.public StreamSpec copyWithPartitionCount(int partitionCount)
partitionCount
- The partitionCount for the returned StreamSpec.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 boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object