Skip to content

Conversation

@raulb
Copy link
Contributor

@raulb raulb commented Aug 23, 2023

Description of change

Fixes #794

⚠️ Depends on https://github.com/meroxa/platform-api/pull/2012 and https://github.com/meroxa/meroxa-go/pull/190

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging
  • Tested in minikube

Demo

Before

$ meroxa jobs logs my-flink-job
 
# Shows help (not existing command)

After

⚠️ Requires flink feature flag.

$ meroxa jobs logs my-flink-job
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"ConnectorConfig values: \n\tconfig.action.reload = restart\n\tconnector.class = io.aiven.connect.jdbc.JdbcSourceConnector\n\terrors.log.enable = false\n\terrors.log.include.messages = false\n\terrors.retry.delay.max.ms = 60000\n\terrors.retry.timeout = 0\n\terrors.tolerance = none\n\theader.converter = null\n\tkey.converter = null\n\tname = connector-56763\n\ttasks.max = 1\n\ttransforms = []\n\tvalue.converter = null\n"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"EnrichedConnectorConfig values: \n\tconfig.action.reload = restart\n\tconnector.class = io.aiven.connect.jdbc.JdbcSourceConnector\n\terrors.log.enable = false\n\terrors.log.include.messages = false\n\terrors.retry.delay.max.ms = 60000\n\terrors.retry.timeout = 0\n\terrors.tolerance = none\n\theader.converter = null\n\tkey.converter = null\n\tname = connector-56763\n\ttasks.max = 1\n\ttransforms = []\n\tvalue.converter = null\n"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Creating connector connector-56763 of type io.aiven.connect.jdbc.JdbcSourceConnector"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Instantiated connector connector-56763 with version 6.7.0_MEROXA of type class io.aiven.connect.jdbc.JdbcSourceConnector"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Starting JDBC Source Connector"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"JdbcSourceConnectorConfig values: \n\tbatch.max.rows = 100\n\tcatalog.pattern = null\n\tconnection.attempts = 3\n\tconnection.backoff.ms = 10000\n\tconnection.password = [hidden]\n\tconnection.url = jdbc:postgresql://diffuser-production-01h8ecnhrsxgavc6gbkzbqawj9.cg05juyjuelr.us-east-1.rds.amazonaws.com:5432/diffuser?ApplicationName=Meroxa+Data+Platform&OpenSourceSubProtocolOverride=true&defaultRowFetchSize=1000\n\tconnection.user = meroxa\n\tdb.timezone = UTC\n\tdialect.name = \n\tincrementing.column.name = id\n\tincrementing.initial = -1\n\tmode = incrementing\n\tnumeric.mapping = null\n\tnumeric.precision.mapping = false\n\tpoll.interval.ms = 1000\n\tquery = \n\tschema.pattern = null\n\tsql.quote.identifiers = true\n\ttable.blacklist = []\n\ttable.poll.interval.ms = 60000\n\ttable.types = [TABLE]\n\ttable.whitelist = [user_activity]\n\ttimestamp.column.name = []\n\ttimestamp.delay.interval.ms = 1000\n\ttimestamp.initial.ms = 0\n\ttopic.prefix = resource-62001-557333-\n\tvalidate.non.null = true\n"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Attempting to open connection #1 to PostgreSql"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Starting thread to monitor tables."
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Finished creating connector connector-56763"
[2023-08-25T08:27:13Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"After filtering the tables are: \"public\".\"user_activity\""
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Creating task connector-56763-0"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"ConnectorConfig values: \n\tconfig.action.reload = restart\n\tconnector.class = io.aiven.connect.jdbc.JdbcSourceConnector\n\terrors.log.enable = false\n\terrors.log.include.messages = false\n\terrors.retry.delay.max.ms = 60000\n\terrors.retry.timeout = 0\n\terrors.tolerance = none\n\theader.converter = null\n\tkey.converter = null\n\tname = connector-56763\n\ttasks.max = 1\n\ttransforms = []\n\tvalue.converter = null\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"EnrichedConnectorConfig values: \n\tconfig.action.reload = restart\n\tconnector.class = io.aiven.connect.jdbc.JdbcSourceConnector\n\terrors.log.enable = false\n\terrors.log.include.messages = false\n\terrors.retry.delay.max.ms = 60000\n\terrors.retry.timeout = 0\n\terrors.tolerance = none\n\theader.converter = null\n\tkey.converter = null\n\tname = connector-56763\n\ttasks.max = 1\n\ttransforms = []\n\tvalue.converter = null\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"TaskConfig values: \n\ttask.class = class io.aiven.connect.jdbc.source.JdbcSourceTask\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Instantiated task connector-56763-0 with version 6.7.0_MEROXA of type io.aiven.connect.jdbc.source.JdbcSourceTask"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"JsonConverterConfig values: \n\tconverter.type = key\n\tdecimal.format = BASE64\n\tschemas.cache.size = 1000\n\tschemas.enable = true\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Set up the key converter class org.apache.kafka.connect.json.JsonConverter for task connector-56763-0 using the worker config"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"JsonConverterConfig values: \n\tconverter.type = value\n\tdecimal.format = BASE64\n\tschemas.cache.size = 1000\n\tschemas.enable = true\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Set up the value converter class org.apache.kafka.connect.json.JsonConverter for task connector-56763-0 using the worker config"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Set up the header converter class org.apache.kafka.connect.storage.SimpleHeaderConverter for task connector-56763-0 using the worker config"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Initializing: org.apache.kafka.connect.runtime.TransformationChain{}"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"ProducerConfig values: \n\tacks = -1\n\tbatch.size = 16384\n\tbootstrap.servers = [b-3.meroxa-msk-d419bd4a-2.8d4w2q.c10.kafka.us-east-1.amazonaws.com:9094, b-4.meroxa-msk-d419bd4a-2.8d4w2q.c10.kafka.us-east-1.amazonaws.com:9094, b-1.meroxa-msk-d419bd4a-2.8d4w2q.c10.kafka.us-east-1.amazonaws.com:9094]\n\tbuffer.memory = 33554432\n\tclient.dns.lookup = default\n\tclient.id = connector-producer-connector-56763-0\n\tcompression.type = none\n\tconnections.max.idle.ms = 540000\n\tdelivery.timeout.ms = 2147483647\n\tenable.idempotence = false\n\tinterceptor.classes = []\n\tkey.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer\n\tlinger.ms = 0\n\tmax.block.ms = 9223372036854775807\n\tmax.in.flight.requests.per.connection = 1\n\tmax.request.size = 1048576\n\tmetadata.max.age.ms = 300000\n\tmetadata.max.idle.ms = 300000\n\tmetric.reporters = []\n\tmetrics.num.samples = 2\n\tmetrics.recording.level = INFO\n\tmetrics.sample.window.ms = 30000\n\tpartitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner\n\treceive.buffer.bytes = 32768\n\treconnect.backoff.max.ms = 1000\n\treconnect.backoff.ms = 50\n\trequest.timeout.ms = 2147483647\n\tretries = 2147483647\n\tretry.backoff.ms = 100\n\tsasl.client.callback.handler.class = null\n\tsasl.jaas.config = null\n\tsasl.kerberos.kinit.cmd = /usr/bin/kinit\n\tsasl.kerberos.min.time.before.relogin = 60000\n\tsasl.kerberos.service.name = null\n\tsasl.kerberos.ticket.renew.jitter = 0.05\n\tsasl.kerberos.ticket.renew.window.factor = 0.8\n\tsasl.login.callback.handler.class = null\n\tsasl.login.class = null\n\tsasl.login.refresh.buffer.seconds = 300\n\tsasl.login.refresh.min.period.seconds = 60\n\tsasl.login.refresh.window.factor = 0.8\n\tsasl.login.refresh.window.jitter = 0.05\n\tsasl.mechanism = GSSAPI\n\tsecurity.protocol = SSL\n\tsecurity.providers = null\n\tsend.buffer.bytes = 131072\n\tssl.cipher.suites = null\n\tssl.enabled.protocols = [TLSv1.2]\n\tssl.endpoint.identification.algorithm = https\n\tssl.key.password = null\n\tssl.keymanager.algorithm = SunX509\n\tssl.keystore.location = null\n\tssl.keystore.password = null\n\tssl.keystore.type = JKS\n\tssl.protocol = TLSv1.2\n\tssl.provider = null\n\tssl.secure.random.implementation = null\n\tssl.trustmanager.algorithm = PKIX\n\tssl.truststore.location = null\n\tssl.truststore.password = null\n\tssl.truststore.type = JKS\n\ttransaction.timeout.ms = 60000\n\ttransactional.id = null\n\tvalue.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Kafka version: 2.5.0"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Kafka commitId: 66563e712b0b9f84"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Kafka startTimeMs: 1692952036634"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Starting JDBC source task"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"JdbcSourceTaskConfig values: \n\tbatch.max.rows = 100\n\tcatalog.pattern = null\n\tconnection.attempts = 3\n\tconnection.backoff.ms = 10000\n\tconnection.password = [hidden]\n\tconnection.url = jdbc:postgresql://diffuser-production-01h8ecnhrsxgavc6gbkzbqawj9.cg05juyjuelr.us-east-1.rds.amazonaws.com:5432/diffuser?ApplicationName=Meroxa+Data+Platform&OpenSourceSubProtocolOverride=true&defaultRowFetchSize=1000\n\tconnection.user = meroxa\n\tdb.timezone = UTC\n\tdialect.name = \n\tincrementing.column.name = id\n\tincrementing.initial = -1\n\tmode = incrementing\n\tnumeric.mapping = null\n\tnumeric.precision.mapping = false\n\tpoll.interval.ms = 1000\n\tquery = \n\tschema.pattern = null\n\tsql.quote.identifiers = true\n\ttable.blacklist = []\n\ttable.poll.interval.ms = 60000\n\ttable.types = [TABLE]\n\ttable.whitelist = [user_activity]\n\ttables = [\"public\".\"user_activity\"]\n\ttimestamp.column.name = []\n\ttimestamp.delay.interval.ms = 1000\n\ttimestamp.initial.ms = 0\n\ttopic.prefix = resource-62001-557333-\n\tvalidate.non.null = true\n"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Using JDBC dialect PostgreSql"
[2023-08-25T08:27:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"[Producer clientId=connector-producer-connector-56763-0] Cluster ID: -AYSRNUoRm6Jgj_Fn5DqWA"
[2023-08-25T08:27:17Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Attempting to open connection #1 to PostgreSql"
[2023-08-25T08:27:17Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"Started JDBC source task"
[2023-08-25T08:27:17Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Source task finished initialization and start"
[2023-08-25T08:27:17Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"[Producer clientId=connector-producer-connector-56763-0] Error while fetching metadata with correlation id 3 : {resource-62001-557333-user_activity=LEADER_NOT_AVAILABLE}"
[2023-08-25T08:28:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Committing offsets"
[2023-08-25T08:28:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} flushing 0 outstanding messages for offset commit"
[2023-08-25T08:28:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Finished commitOffsets successfully in 53 ms"
[2023-08-25T08:29:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Committing offsets"
[2023-08-25T08:29:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} flushing 0 outstanding messages for offset commit"
[2023-08-25T08:30:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Committing offsets"
[2023-08-25T08:30:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} flushing 0 outstanding messages for offset commit"
[2023-08-25T08:31:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} Committing offsets"
[2023-08-25T08:31:16Z]	source-5adc17d5-8e50-4321-912f-7a5adfb69d65-5943	"WorkerSourceTask{id=connector-56763-0} flushing 0 outstanding messages for offset commit"

@raulb raulb self-assigned this Aug 23, 2023
@raulb raulb marked this pull request as ready for review August 23, 2023 14:24
@raulb raulb merged commit f13fca7 into master Aug 25, 2023
@raulb raulb deleted the raul/flink-logs branch August 25, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logs: M2] CLI command for Flink logs

3 participants