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

Shawn Heisey commented on SOLR-7871:
------------------------------------

I cringe a little when someone suggests yaml.

This has nothing to do with the format.  It's a fine format.  What I find 
problematic is introducing ANOTHER config file format to an environment that is 
using too many formats already.  We should be _reducing_ the number of formats, 
not increasing it.  So if consensus is to use yaml, we should plan on using it 
for everything, or not use it at all.  And maybe we do that in phases ... 
introduce the new format and then begin eliminating the others.  I think we do 
have some parts of an abstraction for configs, but I don't know if it is 
complete, and I doubt it is used everywhere.

If yaml supports the ability to add comments (which I think it does) then it 
could be a candidate for us to use everywhere.  That is the blocker for using 
JSON in my mind ... pretty sure the official json standard does not have 
comments, even though many json parsers do support them.

We could write a small java program that parses the platform-independent config 
proposed here and converts it into a temp file in the appropriate script format 
that sets environment variables, which the solr script can then call and 
delete.  Or we can write a small java program that parses the config file and 
runs solr directly, no complicated scripts.  bin/solr would become a lot 
simpler – locate java and run the small java program, which would then handle 
everything.  I really like the second idea.  It would be a lot of work, and I 
would be willing to do anything that's in my skillset to support it.

If we do change config file formats, then we should have something that can 
convert an existing install to the new format.

 

> 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
>            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: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to