TombstoneHandler¶
ここでは、Confluent SMT io.confluent.connect.transforms.TombstoneHandler
の使用方法を説明します。
説明¶
tombstone レコードを管理します。tombstone レコードとは、ValueSchema の有無に関係なく、値フィールド全体が null になっているレコードと定義されています。
インストール¶
この変換は Confluent が開発したものであり、Kafka または Confluent Platform にデフォルトで同梱されるものではありません。この変換は、Confluent Hub クライアント を使用してインストールできます。
confluent-hub install confluentinc/connect-transforms:latest
例¶
以下の構成スニペットは、Tombstone
SMT の使用方法と構成方法を示しています。
The connector uses the default (warn) behavior to handle tombstone records, which ignores the tombstone silently and writes a WARN message to log.
"transforms": "tombstoneHandlerExample",
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler"
The connector uses the ignore behavior to handle tombstone records, which ignores the tombstone silently and writes a DEBUG message to log.
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler",
"transforms.tombstoneHandlerExample.behavior": "ignore",
The connector uses the fail behavior to handle tombstone records, which fails
the execution, throws a DataException
, and writes a DEBUG message to log.
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler",
"transforms.tombstoneHandlerExample.behavior": "fail"
ちなみに
For additional examples, see Tombstone Handler for managed connectors.
プロパティ¶
名前 | 説明 | 型 | デフォルト | 指定可能な値 | 重要度 |
---|---|---|---|---|---|
behavior |
ignore を設定すると、tombstone レコードは単に無視され、DEBUG メッセージがログに書き込まれます。warn を設定すると、tombstone レコードは単に無視され、WARN メッセージがログに書き込まれます。fail を設定すると、実行は失敗し、DataException がスローされ、DEBUG メッセージがログに書き込まれます。 |
string | warn | [ignore、warn、fail] | 中 |
述語¶
"述語" を使用することにより、一定の条件を満たすレコードのみに変換が適用されるように、変換を構成することができます。述語は変換チェーンで使用することができ、Filter(Apache Kafka) と組み合わせると、条件に基づいて特定のレコードを除外できます。詳細と例については、「述語」を参照してください。