Found this -
@Override protected void doStart() throws ElasticsearchException {
add(localNodeMasterListeners); this.clusterState = ClusterState.
builder(clusterState).blocks(initialBlocks).build(); this.updateTasksExecutor
= EsExecutors.newSinglePrioritizing(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);
DiscoveryNode localNode = new DiscoveryNode(settings.get("name"), nodeId,
transportService.boundAddress().publishAddress(), nodeAttributes, version);
DiscoveryNodes.Builder nodeBuilder = DiscoveryNodes.builder().put(localNode)
.localNodeId(localNode.id()); this.clusterState = ClusterState.
builder(clusterState).nodes(nodeBuilder).blocks(initialBlocks).build(); }
On Monday, March 9, 2015 at 1:23:03 PM UTC-7, Daniel Li wrote:
>
> Hi,
>
> I noticed a nodeid is always reassigned after the node is shutdown and
> started again (restart). Is this by design? This caused master has to
> remove the old node and add the new node, whenever the node is crashed and
> restarted.
>
> Is there a way to have the node to keep the same id after restart?
>
> thanks
> Daniel
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/36950376-ae35-42a4-9c86-a2b39c4aea9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.