Skip to content

Commit cabc28a

Browse files
committed
Add @experimentalapi annotation
Signed-off-by: Rishabh Maurya <[email protected]>
1 parent c519b63 commit cabc28a

File tree

10 files changed

+22
-6
lines changed

10 files changed

+22
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3838
- Add support for Combined Fields query ([#18724](https://github.com/opensearch-project/OpenSearch/pull/18724))
3939
- Added approximation support for range queries with now in date field ([#18511](https://github.com/opensearch-project/OpenSearch/pull/18511))
4040
- Streaming transport and new stream based search action ([#18722](https://github.com/opensearch-project/OpenSearch/pull/18722))
41+
- Upgrade to protobufs 0.6.0 and clean up deprecated TermQueryProtoUtils code ([#18880](https://github.com/opensearch-project/OpenSearch/pull/18880))
42+
- APIs for stream transport and new stream-based search api action ([#18722](https://github.com/opensearch-project/OpenSearch/pull/18722))
4143

4244
### Changed
4345
- Update Subject interface to use CheckedRunnable ([#18570](https://github.com/opensearch-project/OpenSearch/issues/18570))

server/src/main/java/org/opensearch/action/search/StreamSearchTransportService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
/**
3838
* Search transport service for streaming search
39+
*
40+
* @opensearch.internal
3941
*/
4042
public class StreamSearchTransportService extends SearchTransportService {
4143
private final StreamTransportService transportService;

server/src/main/java/org/opensearch/action/support/StreamChannelActionListener.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package org.opensearch.action.support;
1010

11+
import org.opensearch.common.annotation.ExperimentalApi;
1112
import org.opensearch.core.action.ActionListener;
1213
import org.opensearch.core.transport.TransportResponse;
1314
import org.opensearch.transport.TransportChannel;
@@ -18,8 +19,8 @@
1819
/**
1920
* A listener that sends the response back to the channel in streaming fashion
2021
*
21-
* @opensearch.internal
2222
*/
23+
@ExperimentalApi
2324
public class StreamChannelActionListener<Response extends TransportResponse, Request extends TransportRequest>
2425
implements
2526
ActionListener<Response> {

server/src/main/java/org/opensearch/transport/StreamTransportResponseHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
package org.opensearch.transport;
1010

11-
import org.opensearch.common.annotation.PublicApi;
11+
import org.opensearch.common.annotation.ExperimentalApi;
1212
import org.opensearch.core.transport.TransportResponse;
1313
import org.opensearch.transport.stream.StreamTransportResponse;
1414

@@ -44,7 +44,7 @@
4444
*
4545
* @opensearch.api
4646
*/
47-
@PublicApi(since = "1.0.0")
47+
@ExperimentalApi
4848
public interface StreamTransportResponseHandler<T extends TransportResponse> extends TransportResponseHandler<T> {
4949

5050
/**

server/src/main/java/org/opensearch/transport/TransportChannel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.apache.logging.log4j.Logger;
3737
import org.apache.logging.log4j.message.ParameterizedMessage;
3838
import org.opensearch.Version;
39+
import org.opensearch.common.annotation.ExperimentalApi;
3940
import org.opensearch.common.annotation.PublicApi;
4041
import org.opensearch.core.transport.TransportResponse;
4142
import org.opensearch.transport.stream.StreamErrorCode;
@@ -68,6 +69,7 @@ public interface TransportChannel {
6869
* @throws StreamException with {@link StreamErrorCode#CANCELLED} if the stream has been canceled.
6970
* Do not call this method again or completeStream() once canceled.
7071
*/
72+
@ExperimentalApi
7173
default void sendResponseBatch(TransportResponse response) {
7274
throw new UnsupportedOperationException();
7375
}
@@ -76,6 +78,7 @@ default void sendResponseBatch(TransportResponse response) {
7678
* Call this method on a successful completion the streaming response.
7779
* Note: not calling this method on success will result in a memory leak
7880
*/
81+
@ExperimentalApi
7982
default void completeStream() {
8083
throw new UnsupportedOperationException();
8184
}

server/src/main/java/org/opensearch/transport/TransportMessageListener.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package org.opensearch.transport;
3333

3434
import org.opensearch.cluster.node.DiscoveryNode;
35+
import org.opensearch.common.annotation.ExperimentalApi;
3536
import org.opensearch.common.annotation.PublicApi;
3637
import org.opensearch.core.transport.TransportResponse;
3738
import org.opensearch.transport.stream.StreamTransportResponse;
@@ -63,6 +64,7 @@ default void onRequestReceived(long requestId, String action) {}
6364
*/
6465
default void onResponseSent(long requestId, String action, TransportResponse response) {}
6566

67+
@ExperimentalApi
6668
default void onStreamResponseSent(long requestId, String action, StreamTransportResponse response) {}
6769

6870
/***

server/src/main/java/org/opensearch/transport/TransportResponseHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
package org.opensearch.transport;
3434

35+
import org.opensearch.common.annotation.ExperimentalApi;
3536
import org.opensearch.common.annotation.PublicApi;
3637
import org.opensearch.core.common.io.stream.StreamInput;
3738
import org.opensearch.core.common.io.stream.Writeable;
@@ -85,6 +86,7 @@ public interface TransportResponseHandler<T extends TransportResponse> extends W
8586
*
8687
* @param response the streaming response, which must be closed by the handler
8788
*/
89+
@ExperimentalApi
8890
default void handleStreamResponse(StreamTransportResponse<T> response) {
8991
throw new UnsupportedOperationException("Streaming responses not supported by this handler");
9092
}

server/src/main/java/org/opensearch/transport/stream/StreamErrorCode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
package org.opensearch.transport.stream;
1010

11+
import org.opensearch.common.annotation.ExperimentalApi;
12+
1113
/**
1214
* Error codes for streaming transport operations, inspired by gRPC and Arrow Flight error codes.
1315
* These codes provide standardized error categories for stream-based transports
1416
* like Arrow Flight RPC.
1517
*
16-
* @opensearch.internal
1718
*/
19+
@ExperimentalApi
1820
public enum StreamErrorCode {
1921
/**
2022
* Operation completed successfully.

server/src/main/java/org/opensearch/transport/stream/StreamException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package org.opensearch.transport.stream;
1010

11+
import org.opensearch.common.annotation.ExperimentalApi;
1112
import org.opensearch.core.common.io.stream.StreamInput;
1213
import org.opensearch.core.common.io.stream.StreamOutput;
1314
import org.opensearch.transport.TransportException;
@@ -19,8 +20,8 @@
1920
* Exception for streaming transport operations with standardized error codes.
2021
* This provides a consistent error model for stream-based transports like Arrow Flight RPC.
2122
*
22-
* @opensearch.internal
2323
*/
24+
@ExperimentalApi
2425
public class StreamException extends TransportException {
2526

2627
private final StreamErrorCode errorCode;

server/src/main/java/org/opensearch/transport/stream/StreamingTransportChannel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package org.opensearch.transport.stream;
1010

11+
import org.opensearch.common.annotation.ExperimentalApi;
1112
import org.opensearch.core.transport.TransportResponse;
1213
import org.opensearch.transport.TransportChannel;
1314

@@ -22,8 +23,8 @@
2223
* {@link StreamErrorCode#CANCELLED}.
2324
* At this point, no action is needed as the underlying channel is already closed and call to
2425
* completeStream() will fail.
25-
* @opensearch.internal
2626
*/
27+
@ExperimentalApi
2728
public interface StreamingTransportChannel extends TransportChannel {
2829

2930
// TODO: introduce a way to poll for cancellation in addition to current way of detection i.e. depending on channel

0 commit comments

Comments
 (0)