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<String,Object> |
getMetricsData() |
void |
open() |
EventDataWrap |
receive() |
protected final IEventHubReceiver receiver
protected final EventHubSpoutConfig config
protected String lastOffset
protected String committedOffset
public SimplePartitionManager(EventHubSpoutConfig spoutConfig, String partitionId, IStateStore stateStore, IEventHubReceiver receiver)
public void open()
throws Exception
open in interface IPartitionManagerExceptionpublic void close()
close in interface IPartitionManagerpublic void checkpoint()
checkpoint in interface IPartitionManagerprotected String getCompletedOffset()
public EventDataWrap receive()
receive in interface IPartitionManagerpublic void ack(String offset)
ack in interface IPartitionManagerpublic void fail(String offset)
fail in interface IPartitionManagerpublic Map<String,Object> getMetricsData()
getMetricsData in interface IPartitionManagerCopyright © 2019 The Apache Software Foundation. All rights reserved.