Skip to content

Commit 545ce95

Browse files
committed
fixed more compile errors
1 parent a18a77f commit 545ce95

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ public void testILMDownsampleRollingRestart() throws Exception {
148148
final String sourceIndex = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
149149
long startTime = LocalDateTime.parse("1993-09-09T18:00:00").atZone(ZoneId.of("UTC")).toInstant().toEpochMilli();
150150
setup(sourceIndex, 1, 0, startTime);
151-
final DownsampleConfig config = new DownsampleConfig(randomInterval());
151+
Integer forceMergeMaxNumSegments = randomBoolean() ? null : randomIntBetween(-1, 128);
152+
final DownsampleConfig config = new DownsampleConfig(randomInterval(), forceMergeMaxNumSegments);
152153
final SourceSupplier sourceSupplier = () -> {
153154
final String ts = randomDateForInterval(config.getInterval(), startTime);
154155
double counterValue = DATE_FORMATTER.parseMillis(ts);

x-pack/plugin/downsample/src/test/java/org/elasticsearch/xpack/downsample/DownsampleActionSingleNodeTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ public void setup() throws IOException {
270270
}
271271

272272
public void testDownsampleIndex() throws Exception {
273-
DownsampleConfig config = new DownsampleConfig(randomInterval(), null);
273+
Integer forceMergeMaxNumSegments = randomBoolean() ? null : randomIntBetween(-1, 128);
274+
DownsampleConfig config = new DownsampleConfig(randomInterval(), forceMergeMaxNumSegments);
274275
SourceSupplier sourceSupplier = () -> {
275276
String ts = randomDateForInterval(config.getInterval());
276277
double labelDoubleValue = DATE_FORMATTER.parseMillis(ts);
@@ -329,7 +330,8 @@ public void testDownsampleIndex() throws Exception {
329330
}
330331

331332
public void testDownsampleIndexWithFlattenedAndMultiFieldDimensions() throws Exception {
332-
DownsampleConfig config = new DownsampleConfig(randomInterval(), null);
333+
Integer forceMergeMaxNumSegments = randomBoolean() ? null : randomIntBetween(-1, 128);
334+
DownsampleConfig config = new DownsampleConfig(randomInterval(), forceMergeMaxNumSegments);
333335
SourceSupplier sourceSupplier = () -> {
334336
String ts = randomDateForInterval(config.getInterval());
335337
double labelDoubleValue = DATE_FORMATTER.parseMillis(ts);
@@ -366,7 +368,8 @@ public void testDownsampleIndexWithFlattenedAndMultiFieldDimensions() throws Exc
366368

367369
public void testDownsampleOfDownsample() throws Exception {
368370
int intervalMinutes = randomIntBetween(10, 120);
369-
DownsampleConfig config = new DownsampleConfig(DateHistogramInterval.minutes(intervalMinutes), null);
371+
Integer forceMergeMaxNumSegments = randomBoolean() ? null : randomIntBetween(-1, 128);
372+
DownsampleConfig config = new DownsampleConfig(DateHistogramInterval.minutes(intervalMinutes), forceMergeMaxNumSegments);
370373
SourceSupplier sourceSupplier = () -> {
371374
String ts = randomDateForInterval(config.getInterval());
372375
double labelDoubleValue = DATE_FORMATTER.parseMillis(ts);

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,11 @@ public static class SystemDataStreamWithDownsamplingConfigurationPlugin extends
417417
List.of(
418418
new DataStreamLifecycle.Downsampling.Round(
419419
TimeValue.timeValueMillis(0),
420-
new DownsampleConfig(new DateHistogramInterval("5m"))
420+
new DownsampleConfig(new DateHistogramInterval("5m"), null)
421421
),
422422
new DataStreamLifecycle.Downsampling.Round(
423423
TimeValue.timeValueSeconds(10),
424-
new DownsampleConfig(new DateHistogramInterval("10m"))
424+
new DownsampleConfig(new DateHistogramInterval("10m"), null)
425425
)
426426
)
427427
)

0 commit comments

Comments
 (0)