Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merging from opendistro-1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkrg committed Jul 24, 2019
2 parents 5458300 + d08b3ec commit 5bb0567
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ dependencyLicenses.doFirst {
integTestRunner {
// add "-Dtests.security.manager=false" to VM options if you want to run integ tests in IntelliJ
systemProperty 'tests.security.manager', 'false'
ifNoTests 'ignore'
}

bundlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,23 @@
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.ActionFilters;
import org.elasticsearch.action.support.HandledTransportAction;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.tasks.Task;

public class TransportWhoAmIAction extends HandledTransportAction<WhoAmIRequest, WhoAmIResponse> {

@Inject
public TransportWhoAmIAction(final Settings settings, final ThreadPool threadPool,
final TransportService transportService, final ActionFilters actionFilters,
final IndexNameExpressionResolver indexNameExpressionResolver, final IndicesService indicesService) {
super(settings, WhoAmIAction.NAME, threadPool, transportService, actionFilters, indexNameExpressionResolver, WhoAmIRequest::new);
public TransportWhoAmIAction(final TransportService transportService,
final ActionFilters actionFilters,
final IndicesService indicesService) {
super(WhoAmIAction.NAME, transportService, actionFilters, WhoAmIRequest::new);
ESResources.INSTANCE.setIndicesService(indicesService);
}

@Override
protected void doExecute(WhoAmIRequest request, ActionListener<WhoAmIResponse> listener) {
protected void doExecute(Task task, WhoAmIRequest request, ActionListener<WhoAmIResponse> listener) {
listener.onResponse(new WhoAmIResponse());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
package com.amazon.opendistro.elasticsearch.performanceanalyzer.http_action.whoami;

import org.elasticsearch.action.Action;
import org.elasticsearch.client.ElasticsearchClient;

public class WhoAmIAction extends Action<WhoAmIRequest, WhoAmIResponse, WhoAmIRequestBuilder> {
public class WhoAmIAction extends Action<WhoAmIResponse> {

public static final WhoAmIAction INSTANCE = new WhoAmIAction();
public static final String NAME = "cluster:admin/performanceanalyzer/whoami";
Expand All @@ -27,14 +26,8 @@ protected WhoAmIAction() {
super(NAME);
}

@Override
public WhoAmIRequestBuilder newRequestBuilder(final ElasticsearchClient client) {
return new WhoAmIRequestBuilder(client, this);
}

@Override
public WhoAmIResponse newResponse() {
return new WhoAmIResponse();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.elasticsearch.client.ClusterAdminClient;
import org.elasticsearch.client.ElasticsearchClient;

public class WhoAmIRequestBuilder extends ActionRequestBuilder<WhoAmIRequest, WhoAmIResponse, WhoAmIRequestBuilder> {
public class WhoAmIRequestBuilder extends ActionRequestBuilder<WhoAmIRequest, WhoAmIResponse> {
public WhoAmIRequestBuilder(final ClusterAdminClient client) {
this(client, WhoAmIAction.INSTANCE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,4 @@ private TransportChannel getShardBulkChannel(T request, TransportChannel channel

return performanceanalyzerChannel;
}

@Override
public void messageReceived(T request, TransportChannel channel) throws Exception {
messageReceived(request, channel, null);
}
}

0 comments on commit 5bb0567

Please sign in to comment.