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

Jan Høydahl commented on SOLR-7871:
-----------------------------------

Should the keys of the new file be UPPERCASE_UNDERSCORE_DELIMITED as before, or 
should we use dot.separated, or allow both i.e. {{SOLR_HOME}} vs {{solr.home}}. 
I see a benefit of keeping keys equal to the env vars to make it easier to 
lookup what vars can be set, and easier to document. Also easier to migrate 
from custom solr.in.sh

Now that {{solr.conf}} is not a script anymore, should we barf and exit at 
unknown keys? We could easily build a list of all supported ones.

What about {{SOLR_OPTS}} that we have today? The current parser understands 
{{SOLR_OPTS = $SOLR_OPTS -Dfoo}} so we could continue to allow that syntax. But 
since it is no longer bash or CMD.exe that will parse the file, we may choose 
to support specifying SysProps directly as keys, e.g. 
{noformat}
SOLR_HOME=/opt/solr
-Dsolr.autoSoftCommit.maxTime=3000
{noformat}
Of course once we spit it back out as a string to be eval'ed, all these need to 
be concatenated into the {{SOLR_OPTS}} var again...

Letting {{SolrCliConfig.java}} handle all the logic of resolving location, 
parsing config, deciding override rules between ENV and config etc is very 
nice, but I'm not sure how robust the roundtrip back to a string which is 
eval'ed is. The reasoning is that over time we'll continue with SOLR-7043 and 
make {{bin/solr}} smaller and smaller as we move logic over to 
{{SolrCLI.java}}. Then at the end of the day, SolrCLI will be able to interact 
with the {{SolrCliConfig}} object directly for much of the decision logic.

> Platform independent config file instead of solr.in.sh and solr.in.cmd
> ----------------------------------------------------------------------
>
>                 Key: SOLR-7871
>                 URL: https://issues.apache.org/jira/browse/SOLR-7871
>             Project: Solr
>          Issue Type: Improvement
>          Components: scripts and tools
>    Affects Versions: 5.2.1
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>              Labels: bin/solr
>             Fix For: master (7.0)
>
>         Attachments: SOLR-7871.patch, SOLR-7871.patch
>
>
> Spinoff from SOLR-7043
> The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable 
> batch files, but all they do is to set environment variables for the start 
> scripts on the format {{key=value}}
> Suggest to instead have one central platform independent config file e.g. 
> {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by 
> {{SolrCLI.java}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to