Skip to content

Commit e9a2a83

Browse files
Make logs debug to reduce noise (#3)
* move some info logs to debug * make info
1 parent a375db5 commit e9a2a83

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

source/src/main/java/com/trustpilot/connector/dynamodb/DynamoDBSourceConnector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ private void startBackgroundReconfigurationTasks(ConnectorContext connectorConte
9090
public void run() {
9191
try {
9292
if (consumableTables != null) {
93-
LOGGER.info("Looking for changed DynamoDB tables");
93+
LOGGER.debug("Looking for changed DynamoDB tables");
9494
List<String> consumableTablesRefreshed = tablesProvider.getConsumableTables();
9595
if (!consumableTables.equals(consumableTablesRefreshed)) {
96-
LOGGER.info("Detected changes in DynamoDB tables. Requesting tasks reconfiguration.");
96+
LOGGER.debug("Detected changes in DynamoDB tables. Requesting tasks reconfiguration.");
9797
connectorContext.requestTaskReconfiguration();
9898
}
9999
}
@@ -131,7 +131,7 @@ public List<Map<String, String>> taskConfigs(int maxTasks) {
131131

132132
List<Map<String, String>> taskConfigs = new ArrayList<>(consumableTables.size());
133133
for (String table : consumableTables) {
134-
LOGGER.info("Configuring task for table {}", table);
134+
LOGGER.debug("Configuring task for table {}", table);
135135
Map<String, String> taskProps = new HashMap<>(configProperties);
136136

137137
taskProps.put(DynamoDBSourceTaskConfig.TABLE_NAME_CONFIG, table);

source/src/main/java/com/trustpilot/connector/dynamodb/DynamoDBSourceTask.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public String version() {
110110
public void start(Map<String, String> configProperties) {
111111

112112
DynamoDBSourceTaskConfig config = new DynamoDBSourceTaskConfig(configProperties);
113-
LOGGER.info("Starting task for table: {}", config.getTableName());
113+
LOGGER.debug("Starting task for table: {}", config.getTableName());
114114

115115
LOGGER.debug("Getting DynamoDB description for table: {}", config.getTableName());
116116
if (client == null) {
@@ -126,7 +126,7 @@ public void start(Map<String, String> configProperties) {
126126

127127
LOGGER.debug("Getting offset for table: {}", tableDesc.getTableName());
128128
setStateFromOffset();
129-
LOGGER.info("Task status: {}", sourceInfo);
129+
LOGGER.debug("Task status: {}", sourceInfo);
130130

131131
LOGGER.debug("Initiating DynamoDB table scanner and record converter.");
132132
if (tableScanner == null) {
@@ -136,7 +136,7 @@ public void start(Map<String, String> configProperties) {
136136
}
137137
converter = new RecordConverter(tableDesc, config.getDestinationTopicPrefix(), config.getDestinationTopicMap());
138138

139-
LOGGER.info("Starting background KCL worker thread for table: {}", tableDesc.getTableName());
139+
LOGGER.debug("Starting background KCL worker thread for table: {}", tableDesc.getTableName());
140140

141141
AmazonDynamoDBStreams dynamoDBStreamsClient = AwsClients.buildDynamoDbStreamsClient(
142142
config.getAwsRegion(),
@@ -225,7 +225,7 @@ private LinkedList<SourceRecord> initSync() throws Exception {
225225
Thread.sleep(initSyncDelay * 1000);
226226
}
227227

228-
LOGGER.info("Continuing INIT_SYNC {}", sourceInfo);
228+
LOGGER.debug("Continuing INIT_SYNC {}", sourceInfo);
229229
ScanResult scanResult = tableScanner.getItems(sourceInfo.exclusiveStartKey);
230230

231231
LinkedList<SourceRecord> result = new LinkedList<>();
@@ -261,7 +261,7 @@ private LinkedList<SourceRecord> initSync() throws Exception {
261261

262262

263263
if (sourceInfo.initSyncStatus == InitSyncStatus.RUNNING) {
264-
LOGGER.info(
264+
LOGGER.debug(
265265
"INIT_SYNC iteration returned {}. Status: {}", result.size(), sourceInfo);
266266
} else {
267267
LOGGER.info("INIT_SYNC FINISHED: {}", sourceInfo);

source/src/main/java/com/trustpilot/connector/dynamodb/aws/ConfigTablesProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public List<String> getConsumableTables() {
2828
final TableDescription tableDesc = client.describeTable(table).getTable();
2929

3030
if (this.hasValidConfig(tableDesc, table)) {
31-
LOGGER.info("Table to sync: {}", table);
31+
LOGGER.debug("Table to sync: {}", table);
3232
consumableTables.add(table);
3333
}
3434
}

source/src/main/java/com/trustpilot/connector/dynamodb/aws/DynamoDBTablesProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public DynamoDBTablesProvider(AWSResourceGroupsTaggingAPI groupsTaggingAPI,
4343
}
4444

4545
public List<String> getConsumableTables() {
46-
LOGGER.info("Searching for tables with tag.key: {}", ingestionTagKey);
46+
LOGGER.debug("Searching for tables with tag.key: {}", ingestionTagKey);
4747

4848
final List<String> consumableTables = new LinkedList<>();
4949
GetResourcesRequest resourcesRequest = getGetResourcesRequest();
@@ -58,7 +58,7 @@ public List<String> getConsumableTables() {
5858
final TableDescription tableDesc = client.describeTable(tableName).getTable();
5959

6060
if (hasValidConfig(tableDesc, tableName)) {
61-
LOGGER.info("Table to sync: {}", tableName);
61+
LOGGER.debug("Table to sync: {}", tableName);
6262
consumableTables.add(tableName);
6363
}
6464
}

source/src/main/java/com/trustpilot/connector/dynamodb/kcl/KclRecordProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void process(ProcessRecordsInput processRecordsInput) {
131131

132132
String firstProcessedSeqNo = records.get(0).getSequenceNumber();
133133
lastProcessedSeqNo = records.get(records.size() - 1).getSequenceNumber();
134-
LOGGER.info("Added {} records to eventsQueue. Table: {} ShardID: {}, FirstSeqNo: {}, LastSeqNo: {}",
134+
LOGGER.debug("Added {} records to eventsQueue. Table: {} ShardID: {}, FirstSeqNo: {}, LastSeqNo: {}",
135135
records.size(),
136136
tableName,
137137
shardId,
@@ -152,7 +152,7 @@ private void checkpoint(IRecordProcessorCheckpointer checkpointer) {
152152

153153
if (!lastCommittedRecordSequenceNumber.equals("")) { // If at least one record was committed to Kafka
154154
try {
155-
LOGGER.info("KCL checkpoint table: {} shardId: {} at sequenceNumber: {}",
155+
LOGGER.debug("KCL checkpoint table: {} shardId: {} at sequenceNumber: {}",
156156
tableName,
157157
shardId,
158158
lastCommittedRecordSequenceNumber);
@@ -233,7 +233,7 @@ private void onTerminate(ShutdownInput shutdownInput) throws InvalidStateExcepti
233233
shardId);
234234
shardRegister.remove(shardId);
235235

236-
LOGGER.info(
236+
LOGGER.debug(
237237
"Shard ended. All data committed. Checkpoint and proceed to next one. Table: {} ShardID: {}",
238238
tableName,
239239
shardId);

source/src/main/java/com/trustpilot/connector/dynamodb/kcl/KclWorkerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void start(AmazonDynamoDB dynamoDBClient,
7777
cloudWatchClient);
7878

7979

80-
LOGGER.info("Creating KCL worker for Stream: {} ApplicationName: {} WorkerId: {}",
80+
LOGGER.debug("Creating KCL worker for Stream: {} ApplicationName: {} WorkerId: {}",
8181
clientLibConfiguration.getStreamName(),
8282
clientLibConfiguration.getApplicationName(),
8383
clientLibConfiguration.getWorkerIdentifier()

0 commit comments

Comments
 (0)