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?
@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?
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?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.