public class SimplePartitionManager extends Object implements IPartitionManager
A simple partition manager that does not re-send failed messages
Modifier and Type | Field and Description |
---|---|
protected String |
committedOffset |
protected EventHubSpoutConfig |
config |
protected String |
lastOffset |
protected IEventHubReceiver |
receiver |
Constructor and Description |
---|
SimplePartitionManager(EventHubSpoutConfig spoutConfig,
String partitionId,
IStateStore stateStore,
IEventHubReceiver receiver) |
Modifier and Type | Method and Description |
---|---|
void |
ack(String offset) |
void |
checkpoint() |
void |
close() |
void |
fail(String offset) |
protected String |
getCompletedOffset() |
Map |
getMetricsData() |
void |
open() |
EventData |
receive() |
protected final IEventHubReceiver receiver
protected String lastOffset
protected String committedOffset
protected final EventHubSpoutConfig config
public SimplePartitionManager(EventHubSpoutConfig spoutConfig, String partitionId, IStateStore stateStore, IEventHubReceiver receiver)
public void open() throws Exception
open
in interface IPartitionManager
Exception
public void close()
close
in interface IPartitionManager
public void checkpoint()
checkpoint
in interface IPartitionManager
protected String getCompletedOffset()
public EventData receive()
receive
in interface IPartitionManager
public void ack(String offset)
ack
in interface IPartitionManager
public void fail(String offset)
fail
in interface IPartitionManager
public Map getMetricsData()
getMetricsData
in interface IPartitionManager
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.