Skip to content

Commit

Permalink
Add logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffxiang committed Oct 29, 2024
1 parent 46054b5 commit e982187
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.pinterest.psc.discovery.ServiceDiscoveryManager;
import com.pinterest.psc.environment.Environment;
import com.pinterest.psc.exception.startup.ConfigurationException;
import com.pinterest.psc.logging.PscLogger;
import com.pinterest.psc.metadata.TopicRnMetadata;

import java.io.IOException;
Expand All @@ -25,11 +26,14 @@
*/
public abstract class PscBackendMetadataClient implements AutoCloseable {

private static final PscLogger logger = PscLogger.getLogger(PscBackendMetadataClient.class);

protected TopicUri topicUri;
protected PscConfigurationInternal pscConfigurationInternal;
protected ServiceDiscoveryConfig discoveryConfig;

public void initialize(TopicUri topicUri, Environment env, PscConfigurationInternal pscConfigurationInternal) throws ConfigurationException {
logger.info("Initializing metadata client for topicUri: " + topicUri);
this.topicUri = topicUri;
this.pscConfigurationInternal = pscConfigurationInternal;
this.discoveryConfig =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.pinterest.psc.environment.Environment;
import com.pinterest.psc.exception.startup.ConfigurationException;
import com.pinterest.psc.exception.startup.TopicUriSyntaxException;
import com.pinterest.psc.logging.PscLogger;
import com.pinterest.psc.metadata.client.kafka.PscKafkaMetadataClient;

/**
Expand All @@ -16,8 +17,11 @@
@PscMetadataClientCreatorPlugin(backend = PscUtils.BACKEND_TYPE_KAFKA)
public class PscKafkaMetadataClientCreator extends PscBackendMetadataClientCreator {

private static final PscLogger logger = PscLogger.getLogger(PscKafkaMetadataClientCreator.class);

@Override
public PscKafkaMetadataClient create(Environment env, PscConfigurationInternal pscConfigurationInternal, TopicUri clusterUri) throws ConfigurationException {
logger.info("Creating Kafka metadata client for clusterUri: " + clusterUri);
PscKafkaMetadataClient pscKafkaMetadataClient = new PscKafkaMetadataClient();
pscKafkaMetadataClient.initialize(
clusterUri,
Expand Down

0 comments on commit e982187

Please sign in to comment.