Not at all sure. I'm open to suggestions.
I'm not yet sure myself. My main concern is that whatever this host property gets assigned ends up matching what hdfs returns as the host. This seems tricky to ensure offhand.
I saw the property in solr.xml, but could not figure out how to access it. A pointer here would be helpful.
It's SolrXmlConfig or something along those lines, accessible at the CoreContainer level. I've been noodling how you might make this CoreContainer level scope rather than static scope so you have access to that host config. Again, looks a bit tricky.
I guess there could be a JMX call happening while a new shard is being created? Do I need to plan for multiple concurrent JMX calls?
Right, SolrCores can be created at any time and will use new directories. I'm not so worried about staleness, but gets on a hashmap with concurrent get/updates can also hang or other bad stuff. Prob best to just use a ConcurrentHashMap.