Kafka Connect не регистрирует мои журналы Connector - PullRequest
0 голосов
/ 13 февраля 2020

Я написал собственный исходный код Kafka. Я хотел проверить соединитель, поэтому скопировал UAR JAR в папку ${CONFLUENT_HOME}/share/java и поместил конфигурации (connect-standalone.properties и connect-file-source.properties) в папку et c в каталоге, который я создал для моего соединителя.

Когда я попытался запустить соединитель следующим образом:

$CONFLUENT_HOME/bin/connect-standalone $CONFLUENT_HOME/etc/kafka/connect-standalone.properties $CONFLUENT_HOME/etc/kafka/connect-file-source.properties

Я попытался запустить свой соединитель. Он запускается и производит записи для Кафки. Но я нигде не вижу журналы моего соединителя. Я попытался добавить log4j.properties моего коннектора, а также попытался обновить connect-log4j.properties. Тем не менее я не вижу свои журналы.

Например: у меня есть запись журнала:

@Override
public void start(Map<String, String> props) {
    log.info("*** Start Method called ***");

    filename = props.get(FileStreamTailerSourceConnector.FILE_CONFIG);

Ниже приведен фрагмент моего файла connect-file-source.properties.

name=kafka-connect-file
connector.class=com.connect.file.FileStreamTailerSourceConnector
tasks.max=1

#Path to where the file is going to be published.
file=test_data.csv

# Topic to publish file data to.
# MANDATORY FIELD, no default
# Valid Values: non-empty string and no ISO control characters
topic=tailer_test2

# Window of data to pull from log api.
# Valid Values: [2,...,10000]
# The default is 100.
batch.size=2

# Poll interval in milliseconds. E.G. Roughly, how often the connector will connect to the file and read data.
# The default is 1000 as in once a second.
poll.interval=1000

# Schema file for the records of the file
source.schema=test_data_schema.avsc

# Encryption of fields in the record for security
field.encryption=true
encryption.fields=bin,ssn,acn
encryption.class=com.connect.encryption.DummyEncryption

Ниже приведен мой фрагмент connect-standalone.properties:

# A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
bootstrap.servers=<LIST OF COMMA SEPARATED BOOTSTRAP SERVERS>

# unique name for the cluster, used in forming the Connect cluster group. Note that this must not conflict with consumer group IDs
group.id=connect-cluster-file-test1

offset.storage.topic=connect-offsets-test1
offset.storage.replication.factor=1

config.storage.topic=connect-configs-test1
config.storage.replication.factor=1

status.storage.topic=connect-status-test1
status.storage.replication.factor=1
#status.storage.partitions=5

# Flush much faster than normal, which is useful for testing/debugging
offset.flush.interval.ms=10000

rest.port=8083


plugin.path=/share/confluent/package/share/java

Я не вижу нигде вышеуказанного сообщения журнала. Любая помощь приветствуется!

...