parent
2c618a11de
commit
6b4699fbf7
|
@ -238,10 +238,8 @@ public class Node implements Releasable {
|
|||
|
||||
ESLogger logger = Loggers.getLogger(Node.class, settings.get("name"));
|
||||
logger.info("starting ...");
|
||||
|
||||
// hack around dependency injection problem (for now...)
|
||||
injector.getInstance(Discovery.class).setRoutingService(injector.getInstance(RoutingService.class));
|
||||
|
||||
for (Class<? extends LifecycleComponent> plugin : pluginsService.nodeServices()) {
|
||||
injector.getInstance(plugin).start();
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.elasticsearch.common.logging.Loggers;
|
|||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.DiscoveryModule;
|
||||
import org.elasticsearch.discovery.azure.AzureDiscovery;
|
||||
import org.elasticsearch.discovery.azure.AzureUnicastHostsProvider;
|
||||
import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository;
|
||||
import org.elasticsearch.index.store.IndexStoreModule;
|
||||
import org.elasticsearch.index.store.smbmmapfs.SmbMmapFsIndexStore;
|
||||
|
@ -79,7 +80,10 @@ public class CloudAzurePlugin extends Plugin {
|
|||
}
|
||||
|
||||
public void onModule(DiscoveryModule discoveryModule) {
|
||||
discoveryModule.addDiscoveryType("azure", AzureDiscovery.class);
|
||||
if (AzureModule.isDiscoveryReady(settings, logger)) {
|
||||
discoveryModule.addDiscoveryType("azure", AzureDiscovery.class);
|
||||
discoveryModule.addUnicastHostProvider(AzureUnicastHostsProvider.class);
|
||||
}
|
||||
}
|
||||
|
||||
public void onModule(IndexStoreModule storeModule) {
|
||||
|
|
Loading…
Reference in New Issue