davidradl commented on code in PR #224:
URL:
https://github.com/apache/flink-connector-aws/pull/224#discussion_r2890073625
##########
flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/source/reader/fanout/FanOutKinesisShardSubscription.java:
##########
@@ -161,14 +153,16 @@ public void activateSubscription() {
try {
if (waitForSubscriptionLatch.await(
subscriptionTimeout.toMillis(),
TimeUnit.MILLISECONDS)) {
- LOG.info(
- "Successfully subscribed to shard {} with
starting position {} for consumer {}.",
- shardId,
- startingPosition,
- consumerArn);
- subscriptionActive.set(true);
- // Request first batch of records.
- shardSubscriber.requestRecords();
+ Throwable error = subscriptionException.get();
+ if (error == null) {
+ LOG.info(
+ "Successfully subscribed to shard {}
with starting position {} for consumer {}.",
+ shardId,
+ startingPosition,
+ consumerArn);
+ } else {
+ LOG.debug(String.format("Initialization
finished with error: %s", error.getMessage()), error);
Review Comment:
Why is this debug - I would expect errors to be logged as errors - or at
least as high as the none error case?
I notice LOG.info has {} and the debug used String.format( why are they
using different methods to bring in parameters?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]