@Override protected void doStart() throws ElasticSearchException { Map<String, String> nodeAttributes = discoveryNodeService.buildAttributes(); // note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling String nodeId = UUID.randomBase64UUID(); localNode = new DiscoveryNode(settings.get("name"), nodeId, transportService.boundAddress().publishAddress(), nodeAttributes); tracker.open(); }
@Inject public AwsEc2Service(Settings settings, SettingsFilter settingsFilter, NetworkService networkService, DiscoveryNodeService discoveryNodeService) { super(settings); settingsFilter.addFilter(new AwsSettingsFilter()); // add specific ec2 name resolver networkService.addCustomNameResolver(new Ec2NameResolver(settings)); discoveryNodeService.addCustomAttributeProvider(new Ec2CustomNodeAttributes(settings)); }
@Override protected void doStart() throws ElasticsearchException { logger.debug("Starting FabricDiscovery"); Map<String, String> nodeAttributes = discoveryNodeService.buildAttributes(); // note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling String nodeId = UUID.randomUUID().toString(); String host = settings.get("discovery.publish.host"); String port = settings.get("discovery.publish.port"); if (host != null && port != null) { TransportAddress address = new InetSocketTransportAddress(host, Integer.parseInt(port)); localNode = new DiscoveryNode(settings.get("name"), nodeId, address, nodeAttributes, Version.CURRENT); } else { localNode = new DiscoveryNode(settings.get("name"), nodeId, transportService.boundAddress().publishAddress(), nodeAttributes, Version.CURRENT); } tracker.open(); logger.debug("FabricDiscovery started"); }
@Override protected void doStart() throws ElasticsearchException { logger.debug("Starting FabricDiscovery"); Map<String, String> nodeAttributes = discoveryNodeService.buildAttributes(); // note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling String nodeId = UUID.randomUUID().toString(); String host = settings.get("discovery.publish.host"); String port = settings.get("discovery.publish.port"); if (host != null && port != null) { TransportAddress address = new InetSocketTransportAddress(host, Integer.parseInt(port)); localNode = new DiscoveryNode(settings.get("name"), nodeId, address, nodeAttributes, Version.CURRENT); } else { localNode = new DiscoveryNode(settings.get("name"), nodeId, transportService.boundAddress().publishAddress(), nodeAttributes, Version.CURRENT); } tracker.open(); logger.debug("FabricDiscovery started"); }
@Override protected void doStart() throws ElasticsearchException { logger.debug("Starting FabricDiscovery"); Map<String, String> nodeAttributes = discoveryNodeService.buildAttributes(); // note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling String nodeId = UUID.randomUUID().toString(); String host = settings.get("discovery.publish.host"); String port = settings.get("discovery.publish.port"); if (host != null && port != null) { TransportAddress address = new InetSocketTransportAddress(host, Integer.parseInt(port)); localNode = new DiscoveryNode(settings.get("name"), nodeId, address, nodeAttributes, Version.CURRENT); } else { localNode = new DiscoveryNode(settings.get("name"), nodeId, transportService.boundAddress().publishAddress(), nodeAttributes, Version.CURRENT); } tracker.open(); logger.debug("FabricDiscovery started"); }
@Override protected void doStart() { add(localNodeMasterListeners); add(taskManager); this.clusterState = ClusterState.builder(clusterState).blocks(initialBlocks).build(); this.updateTasksExecutor = EsExecutors.newSinglePrioritizing(UPDATE_THREAD_NAME, daemonThreadFactory(settings, UPDATE_THREAD_NAME)); this.reconnectToNodes = threadPool.schedule(reconnectInterval, ThreadPool.Names.GENERIC, new ReconnectToNodes()); Map<String, String> nodeAttributes = discoveryNodeService.buildAttributes(); // note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling final String nodeId = DiscoveryService.generateNodeId(settings); final TransportAddress publishAddress = transportService.boundAddress().publishAddress(); DiscoveryNode localNode = new DiscoveryNode(settings.get("name"), nodeId, publishAddress, nodeAttributes, version); DiscoveryNodes.Builder nodeBuilder = DiscoveryNodes.builder().put(localNode).localNodeId(localNode.id()); this.clusterState = ClusterState.builder(clusterState).nodes(nodeBuilder).blocks(initialBlocks).build(); this.transportService.setLocalNode(localNode); }