File tree Expand file tree Collapse file tree 6 files changed +16
-18
lines changed
main/java/org/elasticsearch
test/java/org/elasticsearch
qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql
internalClusterTest/java/org/elasticsearch/xpack/esql/action
main/java/org/elasticsearch/xpack/esql/plugin Expand file tree Collapse file tree 6 files changed +16
-18
lines changed Original file line number Diff line number Diff line change 1616import org .apache .lucene .store .LockObtainFailedException ;
1717import org .elasticsearch .action .bulk .IndexDocFailureStoreStatus ;
1818import org .elasticsearch .action .support .replication .ReplicationOperation ;
19- import org .elasticsearch .cluster .RemoteComputeException ;
19+ import org .elasticsearch .cluster .RemoteException ;
2020import org .elasticsearch .cluster .action .shard .ShardStateAction ;
2121import org .elasticsearch .common .io .stream .NotSerializableExceptionWrapper ;
2222import org .elasticsearch .common .io .stream .StreamInput ;
@@ -1984,8 +1984,8 @@ private enum ElasticsearchExceptionHandle {
19841984 TransportVersions .V_8_16_0
19851985 ),
19861986 REMOTE_COMPUTE_EXCEPTION (
1987- RemoteComputeException .class ,
1988- RemoteComputeException ::new ,
1987+ RemoteException .class ,
1988+ RemoteException ::new ,
19891989 184 ,
19901990 TransportVersions .REMOTE_COMPUTE_EXCEPTION
19911991 );
Original file line number Diff line number Diff line change 2121 * Represents an error that occurred on a remote node.
2222 * It allows capturing some context such as the cluster alias that encountered the error.
2323 */
24- public class RemoteComputeException extends ElasticsearchException {
24+ public class RemoteException extends ElasticsearchException {
2525
2626 /**
2727 * @param clusterAlias Name of the cluster.
2828 * @param cause Error that was encountered.
2929 */
30- public RemoteComputeException (String clusterAlias , Throwable cause ) {
30+ public RemoteException (String clusterAlias , Throwable cause ) {
3131 super ("Remote [" + clusterAlias + "] encountered an error" , cause );
3232 Objects .requireNonNull (cause );
3333 }
3434
35- public RemoteComputeException (StreamInput in ) throws IOException {
35+ public RemoteException (StreamInput in ) throws IOException {
3636 super (in );
3737 }
3838
Original file line number Diff line number Diff line change 2121import org .elasticsearch .action .search .ShardSearchFailure ;
2222import org .elasticsearch .action .support .replication .ReplicationOperation ;
2323import org .elasticsearch .client .internal .AbstractClientHeadersTestCase ;
24- import org .elasticsearch .cluster .RemoteComputeException ;
24+ import org .elasticsearch .cluster .RemoteException ;
2525import org .elasticsearch .cluster .action .shard .ShardStateAction ;
2626import org .elasticsearch .cluster .block .ClusterBlockException ;
2727import org .elasticsearch .cluster .coordination .CoordinationStateRejectedException ;
@@ -841,7 +841,7 @@ public void testIds() {
841841 ids .put (181 , ResourceAlreadyUploadedException .class );
842842 ids .put (182 , IngestPipelineException .class );
843843 ids .put (183 , IndexDocFailureStoreStatus .ExceptionWithFailureStoreStatus .class );
844- ids .put (184 , RemoteComputeException .class );
844+ ids .put (184 , RemoteException .class );
845845
846846 Map <Class <? extends ElasticsearchException >, Integer > reverse = new HashMap <>();
847847 for (Map .Entry <Integer , Class <? extends ElasticsearchException >> entry : ids .entrySet ()) {
Original file line number Diff line number Diff line change 1111import org .apache .lucene .sandbox .document .HalfFloatPoint ;
1212import org .apache .lucene .util .BytesRef ;
1313import org .elasticsearch .ExceptionsHelper ;
14- import org .elasticsearch .cluster .RemoteComputeException ;
14+ import org .elasticsearch .cluster .RemoteException ;
1515import org .elasticsearch .cluster .metadata .IndexNameExpressionResolver ;
1616import org .elasticsearch .cluster .service .ClusterService ;
1717import org .elasticsearch .common .Strings ;
@@ -867,7 +867,7 @@ public static <T> T singleValue(Collection<T> collection) {
867867 * @return Cause of RemoteComputeException, else the error itself.
868868 */
869869 public static Exception unwrapIfWrappedInRemoteComputeException (Exception e ) {
870- if (e instanceof RemoteComputeException rce ) {
870+ if (e instanceof RemoteException rce ) {
871871 return (Exception ) rce .getCause ();
872872 } else {
873873 return e ;
Original file line number Diff line number Diff line change 77
88package org .elasticsearch .xpack .esql .action ;
99
10- import org .elasticsearch .cluster .RemoteComputeException ;
10+ import org .elasticsearch .cluster .RemoteException ;
1111import org .elasticsearch .compute .operator .exchange .ExchangeService ;
1212import org .elasticsearch .test .transport .MockTransportService ;
1313import org .elasticsearch .transport .TransportService ;
@@ -34,8 +34,8 @@ public void testThatRemoteErrorsAreWrapped() throws Exception {
3434 );
3535 }
3636
37- RemoteComputeException wrappedError = expectThrows (
38- RemoteComputeException .class ,
37+ RemoteException wrappedError = expectThrows (
38+ RemoteException .class ,
3939 () -> runQuery ("FROM " + REMOTE_CLUSTER_1 + ":*," + REMOTE_CLUSTER_2 + ":* | LIMIT 100" , false )
4040 );
4141 assertThat (wrappedError .getMessage (), is ("Remote [cluster-a] encountered an error" ));
Original file line number Diff line number Diff line change 1111import org .elasticsearch .action .OriginalIndices ;
1212import org .elasticsearch .action .search .SearchRequest ;
1313import org .elasticsearch .action .search .ShardSearchFailure ;
14- import org .elasticsearch .cluster .RemoteComputeException ;
14+ import org .elasticsearch .cluster .RemoteException ;
1515import org .elasticsearch .cluster .service .ClusterService ;
1616import org .elasticsearch .common .util .BigArrays ;
1717import org .elasticsearch .common .util .concurrent .RunOnce ;
@@ -352,11 +352,9 @@ public void execute(
352352 * wrapped.
353353 */
354354 if (ex instanceof TransportException te ) {
355- l .onFailure (
356- new RemoteComputeException (cluster .clusterAlias (), FailureCollector .unwrapTransportException (te ))
357- );
355+ l .onFailure (new RemoteException (cluster .clusterAlias (), FailureCollector .unwrapTransportException (te )));
358356 } else {
359- l .onFailure (new RemoteComputeException (cluster .clusterAlias (), ex ));
357+ l .onFailure (new RemoteException (cluster .clusterAlias (), ex ));
360358 }
361359 })
362360 );
You can’t perform that action at this time.
0 commit comments