Skip to content

Commit 1402625

Browse files
committed
Rename counter variables from sqsQueueNotFoundCounter to sqsResourceNotFoundCounter
1 parent 2051700 commit 1402625

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • data-prepper-plugins
    • s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3
    • sqs-common/src/main/java/org/opensearch/dataprepper/plugins/source/sqs/common

data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class SqsWorker implements Runnable {
8484
private final Counter sqsVisibilityTimeoutChangeFailedCount;
8585
private final Counter sqsMessageAccessDeniedCounter;
8686
private final Counter sqsMessageThrottledCounter;
87-
private final Counter sqsQueueNotFoundCounter;
87+
private final Counter sqsResourceNotFoundCounter;
8888
private final Timer sqsMessageDelayTimer;
8989
private final Backoff standardBackoff;
9090
private final SqsMessageParser sqsMessageParser;
@@ -124,7 +124,7 @@ public SqsWorker(final AcknowledgementSetManager acknowledgementSetManager,
124124
sqsVisibilityTimeoutChangeFailedCount = pluginMetrics.counter(SQS_VISIBILITY_TIMEOUT_CHANGE_FAILED_COUNT_METRIC_NAME);
125125
sqsMessageAccessDeniedCounter = pluginMetrics.counter(SQS_MESSAGE_ACCESS_DENIED_METRIC_NAME);
126126
sqsMessageThrottledCounter = pluginMetrics.counter(SQS_MESSAGE_THROTTLED_METRIC_NAME);
127-
sqsQueueNotFoundCounter = pluginMetrics.counter(SQS_RESOURCE_NOT_FOUND_METRIC_NAME);
127+
sqsResourceNotFoundCounter = pluginMetrics.counter(SQS_RESOURCE_NOT_FOUND_METRIC_NAME);
128128
}
129129

130130
@Override
@@ -478,7 +478,7 @@ private void recordSqsException(final AwsServiceException e) {
478478
} else if (e.statusCode() == 404 ||
479479
e instanceof QueueDoesNotExistException ||
480480
e instanceof KmsNotFoundException) {
481-
sqsQueueNotFoundCounter.increment();
481+
sqsResourceNotFoundCounter.increment();
482482
} else if (e.isThrottlingException() ||
483483
e instanceof KmsThrottledException) {
484484
sqsMessageThrottledCounter.increment();

data-prepper-plugins/sqs-common/src/main/java/org/opensearch/dataprepper/plugins/source/sqs/common/SqsWorkerCommon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class SqsWorkerCommon {
6464
private final Counter sqsVisibilityTimeoutChangeFailedCount;
6565
private final Counter sqsMessageAccessDeniedCounter;
6666
private final Counter sqsMessageThrottledCounter;
67-
private final Counter sqsQueueNotFoundCounter;
67+
private final Counter sqsResourceNotFoundCounter;
6868

6969
public SqsWorkerCommon(final Backoff standardBackoff,
7070
final PluginMetrics pluginMetrics,
@@ -86,7 +86,7 @@ public SqsWorkerCommon(final Backoff standardBackoff,
8686
sqsVisibilityTimeoutChangeFailedCount = pluginMetrics.counter(SQS_VISIBILITY_TIMEOUT_CHANGE_FAILED_COUNT_METRIC_NAME);
8787
sqsMessageAccessDeniedCounter = pluginMetrics.counter(SQS_MESSAGE_ACCESS_DENIED_METRIC_NAME);
8888
sqsMessageThrottledCounter = pluginMetrics.counter(SQS_MESSAGE_THROTTLED_METRIC_NAME);
89-
sqsQueueNotFoundCounter = pluginMetrics.counter(SQS_RESOURCE_NOT_FOUND_METRIC_NAME);
89+
sqsResourceNotFoundCounter = pluginMetrics.counter(SQS_RESOURCE_NOT_FOUND_METRIC_NAME);
9090
}
9191

9292
public List<Message> pollSqsMessages(final String queueUrl,
@@ -238,7 +238,7 @@ public void recordSqsException(final AwsServiceException e) {
238238
} else if (e.statusCode() == 404 ||
239239
e instanceof QueueDoesNotExistException ||
240240
e instanceof KmsNotFoundException) {
241-
sqsQueueNotFoundCounter.increment();
241+
sqsResourceNotFoundCounter.increment();
242242
} else if (e.isThrottlingException() ||
243243
e instanceof KmsThrottledException) {
244244
sqsMessageThrottledCounter.increment();

0 commit comments

Comments
 (0)