Skip to content

Commit 53e7079

Browse files
committed
Rename transport version
1 parent 23823bf commit 53e7079

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class DataStreamLifecycle implements SimpleDiffable<DataStreamLifecycle>,
5858

5959
// Versions over the wire
6060
public static final TransportVersion ADDED_ENABLED_FLAG_VERSION = TransportVersions.V_8_10_X;
61-
public static final TransportVersion ADD_LAST_VALUE_DOWNSAMPLE_DLM = TransportVersion.fromName("add_last_value_downsample_dlm");
61+
public static final TransportVersion ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM = TransportVersion.fromName("add_sample_method_downsample_dlm");
6262
public static final String EFFECTIVE_RETENTION_REST_API_CAPABILITY = "data_stream_lifecycle_effective_retention";
6363

6464
public static final String DATA_STREAMS_LIFECYCLE_ONLY_SETTING_NAME = "data_streams.lifecycle_only.mode";
@@ -383,7 +383,7 @@ public void writeTo(StreamOutput out) throws IOException {
383383
if (out.getTransportVersion().supports(INTRODUCE_FAILURES_LIFECYCLE)) {
384384
lifecycleType.writeTo(out);
385385
}
386-
if (out.getTransportVersion().supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)) {
386+
if (out.getTransportVersion().supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)) {
387387
out.writeOptionalWriteable(downsamplingMethod);
388388
}
389389
}
@@ -410,7 +410,7 @@ public DataStreamLifecycle(StreamInput in) throws IOException {
410410
enabled = true;
411411
}
412412
lifecycleType = in.getTransportVersion().supports(INTRODUCE_FAILURES_LIFECYCLE) ? LifecycleType.read(in) : LifecycleType.DATA;
413-
downsamplingMethod = in.getTransportVersion().supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)
413+
downsamplingMethod = in.getTransportVersion().supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)
414414
? in.readOptionalWriteable(DownsampleConfig.SamplingMethod::read)
415415
: null;
416416
}
@@ -628,7 +628,7 @@ static void validateRounds(List<DownsamplingRound> rounds) {
628628

629629
public static DownsamplingRound read(StreamInput in) throws IOException {
630630
TimeValue after = in.readTimeValue();
631-
DateHistogramInterval fixedInterval = in.getTransportVersion().supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)
631+
DateHistogramInterval fixedInterval = in.getTransportVersion().supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)
632632
? new DateHistogramInterval(in)
633633
: new DownsampleConfig(in).getFixedInterval();
634634
return new DownsamplingRound(after, fixedInterval);
@@ -645,7 +645,7 @@ public static DownsamplingRound read(StreamInput in) throws IOException {
645645
@Override
646646
public void writeTo(StreamOutput out) throws IOException {
647647
out.writeTimeValue(after);
648-
if (out.getTransportVersion().supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)) {
648+
if (out.getTransportVersion().supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)) {
649649
out.writeWriteable(fixedInterval);
650650
} else {
651651
out.writeWriteable(new DownsampleConfig(fixedInterval, null));
@@ -819,7 +819,7 @@ public void writeTo(StreamOutput out) throws IOException {
819819
if (out.getTransportVersion().supports(INTRODUCE_FAILURES_LIFECYCLE)) {
820820
lifecycleType.writeTo(out);
821821
}
822-
if (out.getTransportVersion().supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)) {
822+
if (out.getTransportVersion().supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)) {
823823
ResettableValue.write(out, downsamplingMethod, StreamOutput::writeWriteable);
824824
}
825825
}
@@ -883,7 +883,7 @@ public static Template read(StreamInput in) throws IOException {
883883
? LifecycleType.read(in)
884884
: LifecycleType.DATA;
885885
ResettableValue<DownsampleConfig.SamplingMethod> downsamplingMethod = in.getTransportVersion()
886-
.supports(ADD_LAST_VALUE_DOWNSAMPLE_DLM)
886+
.supports(ADD_SAMPLE_METHOD_DOWNSAMPLE_DLM)
887887
? ResettableValue.read(in, DownsampleConfig.SamplingMethod::read)
888888
: ResettableValue.undefined();
889889
return new Template(lifecycleTarget, enabled, dataRetention, downsamplingRounds, downsamplingMethod);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
add_last_value_downsample_dlm,9204000
1+
add_sample_method_downsample_dlm,9204000

0 commit comments

Comments
 (0)