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

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

[~elyograg] Are you still planning for that new Java tool to output a String 
that can be Eval'ed in bin/solr?

What bin/solr does now is basically to parse ALL cli arguments, ENV vars 
(including from solr.in.sh) and construct the correct {{"ENV=foo java 
[jvm-flags] -jar start.jar }}{{[solr sysprops] }}{{[solr args]"}} command to 
execute. So if you think of it like that, it makes sense to offload all of that 
logic to some Java code and return whatever command needed to run.

I also think we could scrap the -e <examplename> feature of bin/solr and 
instead have some bin/solr-example <examplename> script for that, since it is 
so different and never meant for production anyway.

Love to see some spikes in this area.

PS: Remember that Java will not pick up ENV vars that are not exported, which 
is part of the reason we need to process env vars in bin/solr and convert them 
into sysprops. However I hope the new shell script can explicitly pick up all 
ENV vars with prefix "SOLR_*" and pass them to the Solr java process in some 
way. Then on the Solr-java side I hope we can do some unified processing of all 
SOLR_* ENVs along with solr.* sysprops so we don't need boilerplate code 
everywhere to look for both variants.

> 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
>            Priority: Major
>              Labels: bin/solr
>         Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, 
> SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, 
> SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, 
> SOLR-7871.patch, 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
(v8.20.10#820010)

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

Reply via email to