MCPcopy Create free account
hub / github.com/AdRoll/baker / Shutdown

Method Shutdown

input/kcl.go:272–285  ·  view source on GitHub ↗

Shutdown is invoked by the Amazon Kinesis Client Library to indicate it will no longer send data records to this RecordProcessor instance.

(input *interfaces.ShutdownInput)

Source from the content-addressed store, hash-verified

270// Shutdown is invoked by the Amazon Kinesis Client Library to indicate it will
271// no longer send data records to this RecordProcessor instance.
272func (p *recordProcessor) Shutdown(input *interfaces.ShutdownInput) {
273 log.WithFields(log.Fields{
274 "shard": p.shardID,
275 "reason": aws.StringValue(interfaces.ShutdownReasonMessage(input.ShutdownReason)),
276 }).Info("Shutting down a KCL record processor")
277
278 // The shard is closed and completely read, so we checkpoint the nil value that informs
279 // vmware-go-kcl about that fact
280 if input.ShutdownReason == interfaces.TERMINATE {
281 if err := input.Checkpointer.Checkpoint(nil); err != nil {
282 log.Errorf("Error checkpointing nil: %v", err)
283 }
284 }
285}
286
287// Initialize is invoked by the Amazon Kinesis Client Library before data
288// records are delivered to the RecordProcessor instance (via processRecords).

Callers 1

RunMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected