public class LogEvents extends Object
LogEventsEmitter
using which the events
are published to the destination topic.Constructor and Description |
---|
LogEvents() |
Modifier and Type | Method and Description |
---|---|
static void |
connectorFailedEvent(Supplier<LogEventsEmitter> logEventsEmitterSupplier,
String connectorId,
Throwable cause,
Optional<LogEventState> logEventStateOptional)
Constructs
ConnectLogEntry for a Connector failure event, and forwards the entry to
LogEventsEmitter to emit it in the form of CloudEvent to the
destination topic. |
static void |
connectorTaskFailedEvent(Supplier<LogEventsEmitter> logEventsEmitterSupplier,
String connectorId,
String taskId,
Throwable cause,
Optional<LogEventState> logEventStateOptional)
Constructs
ConnectLogEntry for a Connector Task failure event, and forwards the entry
to LogEventsEmitter to emit it in the form of CloudEvent to the
destination topic. |
static LogEventState |
createLogEventState(Function<Map.Entry<String,LogEventState>,LogEventState> createLogEventStateIfAbsent,
String id,
long logFailureEventResetTime) |
public static void connectorFailedEvent(Supplier<LogEventsEmitter> logEventsEmitterSupplier, String connectorId, Throwable cause, Optional<LogEventState> logEventStateOptional)
ConnectLogEntry
for a Connector failure event, and forwards the entry to
LogEventsEmitter
to emit it in the form of CloudEvent
to the
destination topic. Before constructing connect log entry, checks if this failure is deduplicated.logEventsEmitterSupplier
- Supplier of LogEventsEmitter
. May not be null.connectorId
- Id of the connector. May not be empty or null.cause
- Throwable instance, capturing Connector's failure. May not belogEventStateOptional
- Optional of logEventState for the given connector id. If deduplication
is disabled, this optional would be empty.public static void connectorTaskFailedEvent(Supplier<LogEventsEmitter> logEventsEmitterSupplier, String connectorId, String taskId, Throwable cause, Optional<LogEventState> logEventStateOptional)
ConnectLogEntry
for a Connector Task failure event, and forwards the entry
to LogEventsEmitter
to emit it in the form of CloudEvent
to the
destination topic. Before constructing connect log entry, checks if this failure is deduplicated.logEventsEmitterSupplier
- Supplier of LogEventsEmitter
. May not be null.connectorId
- Id of the connector. May not be empty or null.taskId
- Id of the task. May not be empty or null.cause
- Throwable instance, capturing Connector's failure. MaylogEventStateOptional
- Optional of logEventState for the given task id. If deduplication
is disabled, this optional would be empty.public static LogEventState createLogEventState(Function<Map.Entry<String,LogEventState>,LogEventState> createLogEventStateIfAbsent, String id, long logFailureEventResetTime)