[ 
https://issues.apache.org/jira/browse/SOLR-9280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363601#comment-15363601
 ] 

Keith Laban commented on SOLR-9280:
-----------------------------------

I started working on this. The approach I am looking is this:
1) Add nodeName as a solr.xml property
2) in ZkController when starting if nodeName property is set use this one 
otherwise fall back to the genericNodeName <host>:<port>_<context> convention
3) change live nodes to have data in each ephemeral node such that the path 
name is nodeName and the data is genericNodeName. Essentially building a 
nodeName -> genericNodeName mapping.
4) in ZkStateReader change liveNodes from a Set<String> to a 
Map<String,String>. This can be done without having to change any public 
interfaces or anything external to the class
5) the major problem here is the method {{getBaseUrlForNodeName}} which takes a 
nodeName and returns a baseUrl. The method assumes that input nodeName is going 
to be in the genericNodeName format and there are tests which validate this. 
What i'm working on doing is creating a new method called 
{{getBaseUrlForGenericNodeName}} which basically does what 
{{getBaseUrlForNodeName}} did the updated version of {{getBaseUrlForNodeName}} 
will do the lookup for genericNodeName in the liveNodes map and then do the 
generic -> baseUrl conversion. Past that I'm just working on tracking down what 
uses the original method to see if there will be any issues anywhere. So far it 
doesn't look like it, but I haven't run the full test suite yet. 

Doing some manual testing with the changes i'm able to start two nodes with 
custom node names and use admin api for creating/modifying/deleting collections 
and replicas.

Overall this approach is pretty self contained with not a whole lot of code 
modification. Also, without addition code if you try to start a second node 
with the same name it will block the instance from starting and timeout and die 
eventually, which is the desired behavior. 
I hope to have a patch up sometime this week

> make nodeName a configurable parameter in solr.xml
> --------------------------------------------------
>
>                 Key: SOLR-9280
>                 URL: https://issues.apache.org/jira/browse/SOLR-9280
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Keith Laban
>
> Originally node name is automatically generated based on 
> {{<host>:<port>_<context>}}. Instead it should be configurable in solr.xml



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to