From 08475bc124d5e0670578322e7929525de4d6c977 Mon Sep 17 00:00:00 2001 From: Jayaj Poudel Date: Wed, 8 Nov 2023 19:51:32 +0000 Subject: [PATCH] Spotless --- .../beam/sdk/metrics/DelegatingCounter.java | 16 +++++++++---- .../beam/sdk/metrics/DelegatingHistogram.java | 23 +++++++++++-------- .../io/gcp/bigquery/BigQuerySinkMetrics.java | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingCounter.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingCounter.java index ece0c70348c4..a0b2e3b34678 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingCounter.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingCounter.java @@ -28,7 +28,9 @@ public class DelegatingCounter implements Metric, Counter, Serializable { private final boolean perWorkerCounter; /** - * Create a {@code DelegatingCounter} with {@code perWorkerCounter} and {@code processWideContainer} set to false. + * Create a {@code DelegatingCounter} with {@code perWorkerCounter} and {@code + * processWideContainer} set to false. + * * @param name Metric name for this metric. */ public DelegatingCounter(MetricName name) { @@ -37,19 +39,23 @@ public DelegatingCounter(MetricName name) { /** * Create a {@code DelegatingCounter} with {@code perWorkerCounter} set to false. + * * @param name Metric name for this metric. - * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the current thread's container. + * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the + * current thread's container. */ public DelegatingCounter(MetricName name, boolean processWideContainer) { - this(name, processWideContainer, false); + this(name, processWideContainer, false); } /** * @param name Metric name for this metric. - * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the current thread's container. + * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the + * current thread's container. * @param perWorkerCounter Whether this Counter refers to a perWorker metric or not. */ - public DelegatingCounter(MetricName name, boolean processWideContainer, boolean perWorkerCounter) { + public DelegatingCounter( + MetricName name, boolean processWideContainer, boolean perWorkerCounter) { this.name = name; this.processWideContainer = processWideContainer; this.perWorkerCounter = perWorkerCounter; diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingHistogram.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingHistogram.java index b5c458836444..b877db69b0bf 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingHistogram.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/DelegatingHistogram.java @@ -31,29 +31,34 @@ public class DelegatingHistogram implements Metric, Histogram, Serializable { /** * Create a {@code DelegatingHistogram} with {@code perWorkerHistogram} set to false. + * * @param name Metric name for this metric. * @param bucketType Histogram bucketing strategy. - * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the current thread's container. + * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the + * current thread's container. */ public DelegatingHistogram( MetricName name, HistogramData.BucketType bucketType, boolean processWideContainer) { this(name, bucketType, processWideContainer, false); } - /** * @param name Metric name for this metric. * @param bucketType Histogram bucketing strategy. - * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the current thread's container. + * @param processWideContainer Whether this Counter is stored in the ProcessWide container or the + * current thread's container. * @param perWorkerHistogram Whether this Histogram refers to a perWorker metric or not. */ public DelegatingHistogram( - MetricName name, HistogramData.BucketType bucketType, boolean processWideContainer, boolean perWorkerHistogram) { - this.name = name; - this.bucketType = bucketType; - this.processWideContainer = processWideContainer; - this.perWorkerHistogram = perWorkerHistogram; - } + MetricName name, + HistogramData.BucketType bucketType, + boolean processWideContainer, + boolean perWorkerHistogram) { + this.name = name; + this.bucketType = bucketType; + this.processWideContainer = processWideContainer; + this.perWorkerHistogram = perWorkerHistogram; + } @Override public void update(double value) { diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySinkMetrics.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySinkMetrics.java index f8984c62c911..24323fce6895 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySinkMetrics.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySinkMetrics.java @@ -80,7 +80,7 @@ enum RowStatus { private static final char METRIC_NAME_DELIMITER = '-'; /** - * Returns a metric name that merges the baseName with metricLables formatted as.: + * Returns a metric name that merges the baseName with metricLables formatted as. * *

'{baseName}-{metricLabelKey1}:{metricLabelVal1};...{metricLabelKeyN}:{metricLabelValN};' */ @@ -118,7 +118,7 @@ private static Counter createRPCRequestCounter( } /** - * Creates an Histogram metric to record RPC latency. Metric will have name.: + * Creates an Histogram metric to record RPC latency. Metric will have name. * *

'RpcLatency-Method:{method};' *