Java Code Examples for org.apache.samza.system.SystemStreamPartition#getSystem()
The following examples show how to use
org.apache.samza.system.SystemStreamPartition#getSystem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StartpointManager.java From samza with Apache License 2.0 | 5 votes |
private static String toReadWriteStoreKey(SystemStreamPartition ssp, TaskName taskName) { Preconditions.checkArgument(ssp != null, "SystemStreamPartition should be defined"); Preconditions.checkArgument(StringUtils.isNotBlank(ssp.getSystem()), "System should be defined"); Preconditions.checkArgument(StringUtils.isNotBlank(ssp.getStream()), "Stream should be defined"); Preconditions.checkArgument(ssp.getPartition() != null, "Partition should be defined"); String storeKey = ssp.getSystem() + "." + ssp.getStream() + "." + String.valueOf(ssp.getPartition().getPartitionId()); if (taskName != null) { storeKey += "." + taskName.getTaskName(); } return storeKey; }
Example 2
Source File: SamzaObjectMapper.java From samza with Apache License 2.0 | 4 votes |
@Override public void serialize(SystemStreamPartition ssp, JsonGenerator jgen, SerializerProvider provider) throws IOException { String sspString = ssp.getSystem() + "." + ssp.getStream() + "." + String.valueOf(ssp.getPartition().getPartitionId()); jgen.writeFieldName(sspString); }
Example 3
Source File: Partition.java From samza with Apache License 2.0 | 4 votes |
public Partition(SystemStreamPartition systemStreamPartition) { this(systemStreamPartition.getSystem(), systemStreamPartition.getStream(), systemStreamPartition.getPartition().getPartitionId()); }