public class KafkaTridentSpoutBatchMetadata extends Object implements Serializable
Wraps transaction batch information.
Modifier and Type | Field and Description |
---|---|
static String |
FIRST_OFFSET_KEY |
static String |
LAST_OFFSET_KEY |
static String |
TOPOLOGY_ID_KEY |
Constructor and Description |
---|
KafkaTridentSpoutBatchMetadata(long firstOffset,
long lastOffset,
String topologyId)
Builds a metadata object.
|
Modifier and Type | Method and Description |
---|---|
static KafkaTridentSpoutBatchMetadata |
fromMap(Map<String,Object> map)
Constructs a metadata object from a Map in the format produced by
toMap() . |
long |
getFirstOffset() |
long |
getLastOffset() |
String |
getTopologyId() |
Map<String,Object> |
toMap()
Writes this metadata object to a Map so Trident can read/write it to Zookeeper.
|
String |
toString() |
public static final String FIRST_OFFSET_KEY
public static final String LAST_OFFSET_KEY
public static final String TOPOLOGY_ID_KEY
public KafkaTridentSpoutBatchMetadata(long firstOffset, long lastOffset, String topologyId)
Builds a metadata object.
firstOffset
- The first offset for the batchlastOffset
- The last offset for the batchpublic long getFirstOffset()
public long getLastOffset()
public String getTopologyId()
public static KafkaTridentSpoutBatchMetadata fromMap(Map<String,Object> map)
Constructs a metadata object from a Map in the format produced by toMap()
.
map
- The source mappublic Map<String,Object> toMap()
Writes this metadata object to a Map so Trident can read/write it to Zookeeper.
Copyright © 2019 The Apache Software Foundation. All rights reserved.