Skip to content

Commit e6dc2db

Browse files
committed
Apply spotless suggestions
1 parent 527016d commit e6dc2db

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/MetadataMappingService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import java.util.HashMap;
4343
import java.util.List;
4444
import java.util.Map;
45-
import java.util.Set;
4645

4746
/**
4847
* Service responsible for submitting mapping changes

x-pack/plugin/otel-data/src/main/java/org/elasticsearch/xpack/oteldata/otlp/datapoint/DataPointGroupingContext.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@
77

88
package org.elasticsearch.xpack.oteldata.otlp.datapoint;
99

10-
import com.dynatrace.hash4j.hashing.HashStream32;
11-
import com.dynatrace.hash4j.hashing.HashValue128;
12-
import com.dynatrace.hash4j.hashing.Hasher32;
13-
import com.dynatrace.hash4j.hashing.Hashing;
14-
import com.google.protobuf.ByteString;
1510
import io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;
1611
import io.opentelemetry.proto.common.v1.InstrumentationScope;
1712
import io.opentelemetry.proto.common.v1.KeyValue;
1813
import io.opentelemetry.proto.metrics.v1.Metric;
1914
import io.opentelemetry.proto.metrics.v1.ResourceMetrics;
2015
import io.opentelemetry.proto.metrics.v1.ScopeMetrics;
2116
import io.opentelemetry.proto.resource.v1.Resource;
17+
18+
import com.dynatrace.hash4j.hashing.HashStream32;
19+
import com.dynatrace.hash4j.hashing.HashValue128;
20+
import com.dynatrace.hash4j.hashing.Hasher32;
21+
import com.dynatrace.hash4j.hashing.Hashing;
22+
import com.google.protobuf.ByteString;
23+
2224
import org.elasticsearch.cluster.routing.TsidBuilder;
2325
import org.elasticsearch.core.CheckedConsumer;
2426
import org.elasticsearch.xpack.oteldata.otlp.proto.BufferedByteStringAccessor;
@@ -99,7 +101,7 @@ public void groupDataPoints(ExportMetricsServiceRequest exportMetricsServiceRequ
99101
* @throws E if the consumer throws an exception
100102
*/
101103
public <E extends Exception> void consume(CheckedConsumer<DataPointGroup, E> consumer) throws E {
102-
for (Iterator<ResourceGroup> iterator = resourceGroups.values().iterator(); iterator.hasNext(); ) {
104+
for (Iterator<ResourceGroup> iterator = resourceGroups.values().iterator(); iterator.hasNext();) {
103105
ResourceGroup resourceGroup = iterator.next();
104106
// Remove the resource group from the map can help to significantly reduce GC overhead.
105107
// This avoids that the resource groups are promoted to survivor space when the context is kept alive for a while,

x-pack/plugin/otel-data/src/main/java/org/elasticsearch/xpack/oteldata/otlp/docbuilder/MetricDocumentBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import com.google.protobuf.ByteString;
1616

1717
import org.elasticsearch.xcontent.XContentBuilder;
18-
import org.elasticsearch.xpack.oteldata.otlp.proto.BufferedByteStringAccessor;
19-
import org.elasticsearch.xpack.oteldata.otlp.datapoint.TargetIndex;
2018
import org.elasticsearch.xpack.oteldata.otlp.datapoint.DataPoint;
2119
import org.elasticsearch.xpack.oteldata.otlp.datapoint.DataPointGroupingContext;
20+
import org.elasticsearch.xpack.oteldata.otlp.datapoint.TargetIndex;
21+
import org.elasticsearch.xpack.oteldata.otlp.proto.BufferedByteStringAccessor;
2222

2323
import java.io.IOException;
2424
import java.util.HashMap;

x-pack/plugin/otel-data/src/main/java/org/elasticsearch/xpack/oteldata/otlp/tsid/AttributeListTsidFunnel.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
import org.elasticsearch.cluster.routing.TsidBuilder;
1414
import org.elasticsearch.cluster.routing.TsidBuilder.TsidFunnel;
15+
import org.elasticsearch.xpack.oteldata.otlp.datapoint.TargetIndex;
1516
import org.elasticsearch.xpack.oteldata.otlp.docbuilder.MappingHints;
1617
import org.elasticsearch.xpack.oteldata.otlp.proto.BufferedByteStringAccessor;
17-
import org.elasticsearch.xpack.oteldata.otlp.datapoint.TargetIndex;
1818

1919
import java.util.List;
2020

@@ -63,10 +63,7 @@ private void hashValue(TsidBuilder tsidBuilder, String key, AnyValue value) {
6363
tsidBuilder.addLongDimension(key, value.getIntValue());
6464
break;
6565
case KVLIST_VALUE:
66-
tsidBuilder.add(
67-
value.getKvlistValue().getValuesList(),
68-
AttributeListTsidFunnel.get(byteStringAccessor, key + ".")
69-
);
66+
tsidBuilder.add(value.getKvlistValue().getValuesList(), AttributeListTsidFunnel.get(byteStringAccessor, key + "."));
7067
break;
7168
case ARRAY_VALUE:
7269
List<AnyValue> valuesList = value.getArrayValue().getValuesList();

0 commit comments

Comments
 (0)