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

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

We should aim towards a robust impl which contains your bullets above and spin 
off some less important follow-up JIRAs which can be done later. 

Ideally we'd be able to introduce support for new format in a 7.x minor version 
and at the same time keep full support for the old configs. That way people can 
try it in 7.x if they want. If the back-compat support is good enough we could 
even deprecate old configs in a 7.x minor version and make the new config the 
only one in 8.0.

Please go ahead making the steps you plan, seeking feedback as you go.

*Question:* My current code parses both {{.in.sh}}, {{.in.cmd}} and {{.conf}} 
into a key-value hashmap which is then used to generate a platform-dependent 
string which can be EVAL'ed. While this would in theory allow someone to use a 
{{.in.sh}} config on Windows and vice versa, that is not an important feature 
going forward. Is this just complicating things? Could we replace all of this 
with a simpler logic? Perhaps a two-step rocket: 
# Call {{SolrCliConfig --locate}} to locate the correct config file, return 
type absolute config file path as string
# If new format then call {{SolrCliConfig --parse}} and EVAL the result as the 
patch does now
# But if old format, simply source the file {{. "$ABS_PATH"}} in the shell/cmd 
as we do today - this gives better back-compat
I initially intended to move much more decision logic over to SolrCliConfig, 
such as setting defaults for SSL variables if not configured etc. But that 
could still be done as a separate step-3 invocation, e.g. {{SolrCliConfig 
--setDefaults}}?

> 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
>         Attachments: SOLR-7871.patch, 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.4.14#64029)

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

Reply via email to