From f9341317d680c25bfb0c64133f07dc5cba2e978e Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Wed, 25 Sep 2024 15:48:45 +0200 Subject: [PATCH] Mark spooling SPI as experimental to allow it's evolution --- core/trino-spi/pom.xml | 36 +++++++++++++++++++ .../trino/spi/protocol/SpooledLocation.java | 2 ++ .../spi/protocol/SpooledSegmentHandle.java | 2 ++ .../trino/spi/protocol/SpoolingContext.java | 2 ++ .../trino/spi/protocol/SpoolingManager.java | 2 ++ .../spi/protocol/SpoolingManagerContext.java | 2 ++ .../spi/protocol/SpoolingManagerFactory.java | 3 ++ 7 files changed, 49 insertions(+) diff --git a/core/trino-spi/pom.xml b/core/trino-spi/pom.xml index 0a445f669615..b3a02ccb685f 100644 --- a/core/trino-spi/pom.xml +++ b/core/trino-spi/pom.xml @@ -229,6 +229,42 @@ method long io.trino.spi.protocol.SpoolingContext::rowCount() Align better when naming in other places + + true + java.class.removed + interface io.trino.spi.protocol.SpooledLocation + Spooling SPI marked as experimental + + + true + java.class.removed + interface io.trino.spi.protocol.SpooledSegmentHandle + Spooling SPI marked as experimental + + + true + java.class.removed + class io.trino.spi.protocol.SpoolingContext + Spooling SPI marked as experimental + + + true + java.class.removed + interface io.trino.spi.protocol.SpoolingManager + Spooling SPI marked as experimental + + + true + java.class.removed + interface io.trino.spi.protocol.SpoolingManagerContext + Spooling SPI marked as experimental + + + true + java.class.removed + interface io.trino.spi.protocol.SpoolingManagerFactory + Spooling SPI marked as experimental + diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledLocation.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledLocation.java index 224c3f2a5a49..a5d37cedb8f5 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledLocation.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledLocation.java @@ -14,6 +14,7 @@ package io.trino.spi.protocol; import io.airlift.slice.Slice; +import io.trino.spi.Experimental; import java.net.URI; import java.util.List; @@ -21,6 +22,7 @@ import static java.util.Objects.requireNonNull; +@Experimental(eta = "2025-05-31") public sealed interface SpooledLocation { Map> headers(); diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledSegmentHandle.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledSegmentHandle.java index fe8a4d7f1ebd..5a2d539ae877 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledSegmentHandle.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpooledSegmentHandle.java @@ -13,6 +13,7 @@ */ package io.trino.spi.protocol; +import io.trino.spi.Experimental; import io.trino.spi.QueryId; import java.time.Instant; @@ -20,6 +21,7 @@ /** * SpooledSegmentHandle is used to uniquely identify a spooled segment and to manage its lifecycle. */ +@Experimental(eta = "2025-05-31") public interface SpooledSegmentHandle { QueryId queryId(); diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingContext.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingContext.java index d0988365d3e8..e664c360d2be 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingContext.java @@ -13,10 +13,12 @@ */ package io.trino.spi.protocol; +import io.trino.spi.Experimental; import io.trino.spi.QueryId; import static java.util.Objects.requireNonNull; +@Experimental(eta = "2025-05-31") public record SpoolingContext(String encoding, QueryId queryId, long rows, long size) { public SpoolingContext diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManager.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManager.java index 701841dbcf83..6550b4b14baf 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManager.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManager.java @@ -13,6 +13,7 @@ */ package io.trino.spi.protocol; +import io.trino.spi.Experimental; import io.trino.spi.protocol.SpooledLocation.DirectLocation; import java.io.IOException; @@ -20,6 +21,7 @@ import java.io.OutputStream; import java.util.Optional; +@Experimental(eta = "2025-05-31") public interface SpoolingManager { SpooledSegmentHandle create(SpoolingContext context); diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerContext.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerContext.java index 6d0edb4c46fe..8451594a32d1 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerContext.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerContext.java @@ -15,7 +15,9 @@ import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.trace.Tracer; +import io.trino.spi.Experimental; +@Experimental(eta = "2025-05-31") public interface SpoolingManagerContext { default OpenTelemetry getOpenTelemetry() diff --git a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerFactory.java b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerFactory.java index 0c151015f107..1061b556375c 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerFactory.java +++ b/core/trino-spi/src/main/java/io/trino/spi/protocol/SpoolingManagerFactory.java @@ -13,8 +13,11 @@ */ package io.trino.spi.protocol; +import io.trino.spi.Experimental; + import java.util.Map; +@Experimental(eta = "2025-05-31") public interface SpoolingManagerFactory { String getName();