Skip to content

Commit 95b1acc

Browse files
authored
Move MountSearchableActionRequest and Action to xpack/core (#53394)
This moves the classes needed to invoke the mount snapshot request to the xpack/core module such that clients aiming to invoke the mount api don't need to add a dependency on the xpack/searchable-snapshots module.
1 parent 71237a1 commit 95b1acc

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
package org.elasticsearch.xpack.searchablesnapshots.action;
7+
package org.elasticsearch.xpack.core.searchablesnapshots;
88

99
import org.elasticsearch.action.ActionType;
1010
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
package org.elasticsearch.xpack.searchablesnapshots.action;
7+
package org.elasticsearch.xpack.core.searchablesnapshots;
88

99
import org.elasticsearch.action.ActionRequestValidationException;
1010
import org.elasticsearch.action.support.master.MasterNodeRequest;
@@ -77,7 +77,7 @@ public MountSearchableSnapshotRequest(String mountedIndexName, String repository
7777
this.waitForCompletion = waitForCompletion;
7878
}
7979

80-
MountSearchableSnapshotRequest(StreamInput in) throws IOException {
80+
public MountSearchableSnapshotRequest(StreamInput in) throws IOException {
8181
super(in);
8282
this.mountedIndexName = in.readString();
8383
this.repositoryName = in.readString();

x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/SearchableSnapshots.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.elasticsearch.threadpool.ThreadPool;
4040
import org.elasticsearch.watcher.ResourceWatcherService;
4141
import org.elasticsearch.xpack.searchablesnapshots.action.ClearSearchableSnapshotsCacheAction;
42-
import org.elasticsearch.xpack.searchablesnapshots.action.MountSearchableSnapshotAction;
42+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotAction;
4343
import org.elasticsearch.xpack.searchablesnapshots.action.SearchableSnapshotsStatsAction;
4444
import org.elasticsearch.xpack.searchablesnapshots.action.TransportClearSearchableSnapshotsCacheAction;
4545
import org.elasticsearch.xpack.searchablesnapshots.action.TransportMountSearchableSnapshotAction;

x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/action/TransportMountSearchableSnapshotAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import org.elasticsearch.tasks.Task;
3232
import org.elasticsearch.threadpool.ThreadPool;
3333
import org.elasticsearch.transport.TransportService;
34+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotAction;
35+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotRequest;
3436
import org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshots;
3537

3638
import java.io.IOException;

x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/rest/RestMountSearchableSnapshotAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import org.elasticsearch.rest.BaseRestHandler;
1212
import org.elasticsearch.rest.RestRequest;
1313
import org.elasticsearch.rest.action.RestToXContentListener;
14-
import org.elasticsearch.xpack.searchablesnapshots.action.MountSearchableSnapshotAction;
15-
import org.elasticsearch.xpack.searchablesnapshots.action.MountSearchableSnapshotRequest;
14+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotAction;
15+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotRequest;
1616

1717
import java.io.IOException;
1818
import java.util.Collections;

x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/SearchableSnapshotsIntegTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import org.elasticsearch.snapshots.SnapshotInfo;
2828
import org.elasticsearch.test.ESIntegTestCase;
2929
import org.elasticsearch.xpack.core.searchablesnapshots.SearchableSnapshotShardStats;
30-
import org.elasticsearch.xpack.searchablesnapshots.action.MountSearchableSnapshotAction;
31-
import org.elasticsearch.xpack.searchablesnapshots.action.MountSearchableSnapshotRequest;
30+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotAction;
31+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotRequest;
3232
import org.elasticsearch.xpack.searchablesnapshots.action.SearchableSnapshotsStatsAction;
3333
import org.elasticsearch.xpack.searchablesnapshots.action.SearchableSnapshotsStatsRequest;
3434
import org.elasticsearch.xpack.searchablesnapshots.action.SearchableSnapshotsStatsResponse;

x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/xpack/searchablesnapshots/action/MountSearchableSnapshotRequestTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.elasticsearch.common.settings.Settings;
1212
import org.elasticsearch.common.unit.TimeValue;
1313
import org.elasticsearch.test.AbstractWireSerializingTestCase;
14+
import org.elasticsearch.xpack.core.searchablesnapshots.MountSearchableSnapshotRequest;
1415

1516
import java.util.Arrays;
1617

0 commit comments

Comments
 (0)