Merge pull request elastic/elasticsearch#1428 from nik9000/trask_status

Support task status

Original commit: elastic/x-pack-elasticsearch@9e2ca22b4a
This commit is contained in:
Nik Everett 2016-02-03 18:30:22 -05:00
commit 3ebe266d13
3 changed files with 14 additions and 6 deletions

View File

@ -7,6 +7,7 @@ package org.elasticsearch.shield.transport;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.Transport;
@ -22,8 +23,9 @@ public class ShieldClientTransportService extends TransportService {
private final ClientTransportFilter clientFilter;
@Inject
public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool, ClientTransportFilter clientFilter) {
super(settings, transport, threadPool);
public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool, ClientTransportFilter clientFilter,
NamedWriteableRegistry namedWriteableRegistry) {
super(settings, transport, threadPool, namedWriteableRegistry);
this.clientFilter = clientFilter;
}

View File

@ -7,6 +7,7 @@ package org.elasticsearch.shield.transport;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.shield.action.ShieldActionMapper;
@ -62,8 +63,9 @@ public class ShieldServerTransportService extends TransportService {
AuthorizationService authzService,
ShieldActionMapper actionMapper,
ClientTransportFilter clientTransportFilter,
ShieldLicenseState licenseState) {
super(settings, transport, threadPool);
ShieldLicenseState licenseState,
NamedWriteableRegistry namedWriteableRegistry) {
super(settings, transport, threadPool, namedWriteableRegistry);
this.authcService = authcService;
this.authzService = authzService;
this.actionMapper = actionMapper;

View File

@ -10,6 +10,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.network.NetworkModule;
@ -300,8 +301,11 @@ public class TransportFilterTests extends ESIntegTestCase {
}
@Inject
public InternalPluginServerTransportService(Settings settings, Transport transport, ThreadPool threadPool, AuthenticationService authcService, AuthorizationService authzService, ShieldActionMapper actionMapper, ClientTransportFilter clientTransportFilter) {
super(settings, transport, threadPool, authcService, authzService, actionMapper, clientTransportFilter, mock(ShieldLicenseState.class));
public InternalPluginServerTransportService(Settings settings, Transport transport, ThreadPool threadPool,
AuthenticationService authcService, AuthorizationService authzService, ShieldActionMapper actionMapper,
ClientTransportFilter clientTransportFilter, NamedWriteableRegistry namedWriteableRegistry) {
super(settings, transport, threadPool, authcService, authzService, actionMapper, clientTransportFilter,
mock(ShieldLicenseState.class), namedWriteableRegistry);
when(licenseState.securityEnabled()).thenReturn(true);
}