MOD_RANGE Record Recovery Mode
In MOD_RANGE mode, record recovery accepts input of a list of metadata files. It generates a recovery file for each metadata file. MOD_RANGE Configuration Properties describes the configuration property used to specify a range of metadata files by filename.
Property | Description |
---|---|
sftp.internal.recovery.modRange.metadataFiles | List of metadata files, by filename. |
This mode runs as a Kubernetes job specified in asn1-kafka-sftp-recovery.yaml. Configuration is specified in the ConfigMap section. The following asn1-kafka-sftp-recovery.yaml example is configured for MOD_RANGE mode, recovering the records described in the asn1-sftp-sink-sink-0_-_1.20220811_._1822+0000.json and asn1-sftp-sink-sink-0_-_3.20220811_._1822+0000.json metadata files.
kind: ConfigMap
apiVersion: v1
metadata:
name: sink-recovery-config
namespace: matrixx
data:
asn1-sftp-sink.yaml: |-
kafka:
configuration:
bootstrap.servers: mtx-kafka-cp-kafka.confluent.svc.cluster.local:9092
sftp:
remote:
user: mtxsftpuser
password: mtx123
host: sftp.sftp.svc.cluster.local
port: 22
internal:
buffer:
path: "/opt/mtx/recovery/buffer"
uploader:
path: "/opt/mtx/recovery/internal_recovery"
recovery:
enabled: true
path: "/opt/mtx/recovery"
modRange:
metadataFiles: [asn1-sftp-sink-sink-0_-_1.20220811_._1822+0000.json,asn1-sftp-sink-sink-0_-_3.20220811_._1822+0000.json]
routes:
- topic: cdr-asn1-1
path: "upload/uploads-1"
isdefault: true
- topic: cdr-asn1-2
path: "upload/uploads-2"
MOD_RANGE mode does the following:
- Retrieves specified metadata files.
- Collects Kafka starting and ending offsets from each metadata file.
- Locates records using the specified Kafka information using the
seek
function and reprocesses them. - When all records described by the metadata files are collected, the ASN.1 record is generated. The name of the record is generated using the file naming configuration provided and the values inside the metadata file. For more information, see the discussion about file naming configuration.
- The job stops.