Skip to content

Commit bec57ff

Browse files
committed
rename analytics, ccr actions
1 parent 9d71ac2 commit bec57ff

File tree

12 files changed

+40
-40
lines changed

12 files changed

+40
-40
lines changed

x-pack/plugin/analytics/src/main/java/org/elasticsearch/xpack/analytics/AnalyticsPlugin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import org.elasticsearch.plugins.Plugin;
1515
import org.elasticsearch.plugins.SearchPlugin;
1616
import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry;
17-
import org.elasticsearch.xpack.analytics.action.AnalyticsInfoTransportAction;
18-
import org.elasticsearch.xpack.analytics.action.AnalyticsUsageTransportAction;
17+
import org.elasticsearch.xpack.analytics.action.TransportAnalyticsInfoAction;
18+
import org.elasticsearch.xpack.analytics.action.TransportAnalyticsUsageAction;
1919
import org.elasticsearch.xpack.analytics.action.TransportAnalyticsStatsAction;
2020
import org.elasticsearch.xpack.analytics.aggregations.AnalyticsAggregatorFactory;
2121
import org.elasticsearch.xpack.analytics.boxplot.BoxplotAggregationBuilder;
@@ -127,8 +127,8 @@ private AggregationSpec rateAggregation() {
127127
@Override
128128
public List<ActionPlugin.ActionHandler> getActions() {
129129
return List.of(
130-
new ActionHandler(XPackUsageFeatureAction.ANALYTICS, AnalyticsUsageTransportAction.class),
131-
new ActionHandler(XPackInfoFeatureAction.ANALYTICS, AnalyticsInfoTransportAction.class),
130+
new ActionHandler(XPackUsageFeatureAction.ANALYTICS, TransportAnalyticsUsageAction.class),
131+
new ActionHandler(XPackInfoFeatureAction.ANALYTICS, TransportAnalyticsInfoAction.class),
132132
new ActionHandler(AnalyticsStatsAction.INSTANCE, TransportAnalyticsStatsAction.class)
133133
);
134134
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
1414
import org.elasticsearch.xpack.core.action.XPackInfoFeatureTransportAction;
1515

16-
public class AnalyticsInfoTransportAction extends XPackInfoFeatureTransportAction {
16+
public class TransportAnalyticsInfoAction extends XPackInfoFeatureTransportAction {
1717

1818
@Inject
19-
public AnalyticsInfoTransportAction(TransportService transportService, ActionFilters actionFilters) {
19+
public TransportAnalyticsInfoAction(TransportService transportService, ActionFilters actionFilters) {
2020
super(XPackInfoFeatureAction.ANALYTICS.name(), transportService, actionFilters);
2121
}
2222

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
import org.elasticsearch.xpack.core.analytics.AnalyticsFeatureSetUsage;
2323
import org.elasticsearch.xpack.core.analytics.action.AnalyticsStatsAction;
2424

25-
public class AnalyticsUsageTransportAction extends XPackUsageFeatureTransportAction {
25+
public class TransportAnalyticsUsageAction extends XPackUsageFeatureTransportAction {
2626
private final Client client;
2727

2828
@Inject
29-
public AnalyticsUsageTransportAction(
29+
public TransportAnalyticsUsageAction(
3030
TransportService transportService,
3131
ClusterService clusterService,
3232
ThreadPool threadPool,
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import static org.mockito.Mockito.verifyNoMoreInteractions;
4040
import static org.mockito.Mockito.when;
4141

42-
public class AnalyticsInfoTransportActionTests extends ESTestCase {
42+
public class TransportAnalyticsInfoActionTests extends ESTestCase {
4343

4444
private Task task;
4545
private ClusterService clusterService;
@@ -62,10 +62,10 @@ public void init() {
6262
public void testAvailable() throws Exception {
6363
ThreadPool threadPool = mock(ThreadPool.class);
6464
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor(threadPool);
65-
AnalyticsInfoTransportAction featureSet = new AnalyticsInfoTransportAction(transportService, mock(ActionFilters.class));
65+
TransportAnalyticsInfoAction featureSet = new TransportAnalyticsInfoAction(transportService, mock(ActionFilters.class));
6666
assertThat(featureSet.available(), is(true));
6767
Client client = mockClient();
68-
AnalyticsUsageTransportAction usageAction = new AnalyticsUsageTransportAction(
68+
TransportAnalyticsUsageAction usageAction = new TransportAnalyticsUsageAction(
6969
transportService,
7070
clusterService,
7171
threadPool,
@@ -88,11 +88,11 @@ public void testAvailable() throws Exception {
8888
public void testEnabled() throws Exception {
8989
ThreadPool threadPool = mock(ThreadPool.class);
9090
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor(threadPool);
91-
AnalyticsInfoTransportAction featureSet = new AnalyticsInfoTransportAction(transportService, mock(ActionFilters.class));
91+
TransportAnalyticsInfoAction featureSet = new TransportAnalyticsInfoAction(transportService, mock(ActionFilters.class));
9292
assertThat(featureSet.enabled(), is(true));
9393
assertTrue(featureSet.enabled());
9494
Client client = mockClient();
95-
AnalyticsUsageTransportAction usageAction = new AnalyticsUsageTransportAction(
95+
TransportAnalyticsUsageAction usageAction = new TransportAnalyticsUsageAction(
9696
transportService,
9797
clusterService,
9898
threadPool,

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/Ccr.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ public List<PersistentTasksExecutor<?>> getPersistentTasksExecutor(
210210
}
211211

212212
public List<ActionHandler> getActions() {
213-
var usageAction = new ActionHandler(XPackUsageFeatureAction.CCR, CCRUsageTransportAction.class);
214-
var infoAction = new ActionHandler(XPackInfoFeatureAction.CCR, CCRInfoTransportAction.class);
213+
var usageAction = new ActionHandler(XPackUsageFeatureAction.CCR, TransportCCRUsageAction.class);
214+
var infoAction = new ActionHandler(XPackInfoFeatureAction.CCR, TransportCCRInfoAction.class);
215215
if (enabled == false) {
216216
return Arrays.asList(usageAction, infoAction);
217217
}
@@ -304,7 +304,7 @@ public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
304304
),
305305

306306
// usage api
307-
new NamedWriteableRegistry.Entry(XPackFeatureUsage.class, XPackField.CCR, CCRInfoTransportAction.Usage::new)
307+
new NamedWriteableRegistry.Entry(XPackFeatureUsage.class, XPackField.CCR, TransportCCRInfoAction.Usage::new)
308308
);
309309
}
310310

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/CCRInfoTransportAction.java renamed to x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/TransportCCRInfoAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import java.io.IOException;
2727
import java.util.Objects;
2828

29-
public class CCRInfoTransportAction extends XPackInfoFeatureTransportAction {
29+
public class TransportCCRInfoAction extends XPackInfoFeatureTransportAction {
3030

3131
private final boolean enabled;
3232
private final XPackLicenseState licenseState;
3333

3434
@Inject
35-
public CCRInfoTransportAction(
35+
public TransportCCRInfoAction(
3636
TransportService transportService,
3737
ActionFilters actionFilters,
3838
Settings settings,
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828

2929
import java.time.Instant;
3030

31-
public class CCRUsageTransportAction extends XPackUsageFeatureTransportAction {
31+
public class TransportCCRUsageAction extends XPackUsageFeatureTransportAction {
3232

3333
private final Settings settings;
3434
private final XPackLicenseState licenseState;
3535
private final ProjectResolver projectResolver;
3636

3737
@Inject
38-
public CCRUsageTransportAction(
38+
public TransportCCRUsageAction(
3939
TransportService transportService,
4040
ClusterService clusterService,
4141
ThreadPool threadPool,
@@ -80,7 +80,7 @@ protected void localClusterStateOperation(
8080
lastFollowTimeInMillis = Math.max(0, Instant.now().toEpochMilli() - lastFollowerIndexCreationDate);
8181
}
8282

83-
CCRInfoTransportAction.Usage usage = new CCRInfoTransportAction.Usage(
83+
TransportCCRInfoAction.Usage usage = new TransportCCRInfoAction.Usage(
8484
CcrConstants.CCR_FEATURE.checkWithoutTracking(licenseState),
8585
XPackSettings.CCR_ENABLED_SETTING.get(settings),
8686
numberOfFollowerIndices,

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/CCRFeatureSetUsageTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import org.elasticsearch.common.io.stream.Writeable;
1111
import org.elasticsearch.test.AbstractWireSerializingTestCase;
1212

13-
public class CCRFeatureSetUsageTests extends AbstractWireSerializingTestCase<CCRInfoTransportAction.Usage> {
13+
public class CCRFeatureSetUsageTests extends AbstractWireSerializingTestCase<TransportCCRInfoAction.Usage> {
1414

1515
@Override
16-
protected CCRInfoTransportAction.Usage createTestInstance() {
17-
return new CCRInfoTransportAction.Usage(
16+
protected TransportCCRInfoAction.Usage createTestInstance() {
17+
return new TransportCCRInfoAction.Usage(
1818
randomBoolean(),
1919
randomBoolean(),
2020
randomIntBetween(0, Integer.MAX_VALUE),
@@ -24,12 +24,12 @@ protected CCRInfoTransportAction.Usage createTestInstance() {
2424
}
2525

2626
@Override
27-
protected CCRInfoTransportAction.Usage mutateInstance(CCRInfoTransportAction.Usage instance) {
27+
protected TransportCCRInfoAction.Usage mutateInstance(TransportCCRInfoAction.Usage instance) {
2828
return null;// TODO implement https://github.com/elastic/elasticsearch/issues/25929
2929
}
3030

3131
@Override
32-
protected Writeable.Reader<CCRInfoTransportAction.Usage> instanceReader() {
33-
return CCRInfoTransportAction.Usage::new;
32+
protected Writeable.Reader<TransportCCRInfoAction.Usage> instanceReader() {
33+
return TransportCCRInfoAction.Usage::new;
3434
}
3535
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import static org.mockito.Mockito.mock;
3939
import static org.mockito.Mockito.when;
4040

41-
public class CCRInfoTransportActionTests extends ESTestCase {
41+
public class TransportCCRInfoActionTests extends ESTestCase {
4242

4343
private MockLicenseState licenseState;
4444
private ClusterService clusterService;
@@ -51,7 +51,7 @@ public void init() {
5151

5252
public void testAvailable() {
5353
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor();
54-
CCRInfoTransportAction featureSet = new CCRInfoTransportAction(
54+
TransportCCRInfoAction featureSet = new TransportCCRInfoAction(
5555
transportService,
5656
mock(ActionFilters.class),
5757
Settings.EMPTY,
@@ -68,7 +68,7 @@ public void testAvailable() {
6868
public void testEnabled() {
6969
Settings.Builder settings = Settings.builder().put("xpack.ccr.enabled", false);
7070
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor();
71-
CCRInfoTransportAction featureSet = new CCRInfoTransportAction(
71+
TransportCCRInfoAction featureSet = new TransportCCRInfoAction(
7272
transportService,
7373
mock(ActionFilters.class),
7474
settings.build(),
@@ -77,13 +77,13 @@ public void testEnabled() {
7777
assertThat(featureSet.enabled(), equalTo(false));
7878

7979
settings = Settings.builder().put("xpack.ccr.enabled", true);
80-
featureSet = new CCRInfoTransportAction(transportService, mock(ActionFilters.class), settings.build(), licenseState);
80+
featureSet = new TransportCCRInfoAction(transportService, mock(ActionFilters.class), settings.build(), licenseState);
8181
assertThat(featureSet.enabled(), equalTo(true));
8282
}
8383

8484
public void testName() {
8585
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor();
86-
CCRInfoTransportAction featureSet = new CCRInfoTransportAction(
86+
TransportCCRInfoAction featureSet = new TransportCCRInfoAction(
8787
transportService,
8888
mock(ActionFilters.class),
8989
Settings.EMPTY,
@@ -145,7 +145,7 @@ public void testUsageStats() throws Exception {
145145

146146
ThreadPool threadPool = mock(ThreadPool.class);
147147
TransportService transportService = MockUtils.setupTransportServiceWithThreadpoolExecutor(threadPool);
148-
var usageAction = new CCRUsageTransportAction(
148+
var usageAction = new TransportCCRUsageAction(
149149
transportService,
150150
null,
151151
threadPool,
@@ -156,7 +156,7 @@ public void testUsageStats() throws Exception {
156156
);
157157
PlainActionFuture<XPackUsageFeatureResponse> future = new PlainActionFuture<>();
158158
usageAction.localClusterStateOperation(null, null, clusterState, future);
159-
CCRInfoTransportAction.Usage ccrUsage = (CCRInfoTransportAction.Usage) future.get().getUsage();
159+
TransportCCRInfoAction.Usage ccrUsage = (TransportCCRInfoAction.Usage) future.get().getUsage();
160160
assertThat(ccrUsage.enabled(), equalTo(true));
161161
assertThat(ccrUsage.available(), equalTo(false));
162162

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
/**
2626
* This action provides telemetry of the cluster's health api usage.
2727
*/
28-
public class HealthApiUsageTransportAction extends XPackUsageFeatureTransportAction {
28+
public class TransportHealthApiUsageAction extends XPackUsageFeatureTransportAction {
2929

3030
private final Client client;
3131

3232
@Inject
33-
public HealthApiUsageTransportAction(
33+
public TransportHealthApiUsageAction(
3434
TransportService transportService,
3535
ClusterService clusterService,
3636
ThreadPool threadPool,

0 commit comments

Comments
 (0)