[
https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Gerlowski updated SOLR-7871:
----------------------------------
Attachment: SOLR-7871.patch
Attached patch adds in the Java code to read in a
{{solr/server/solr-defaults.conf}} file. Turned out nicely.
As I started to move values from {{bin/solr}} etc into the defaults file
though, I noticed that many values _could_ be in the defaults file if not for
tiny bits of logic involved in their initialization. Examples:
- {{SOLR_PORT}}, {{STOP_PORT}}, and {{RMI_PORT}} could all be set in a
properties file, but they are supposed to track together. (Usually, STOP_PORT
is SOLR_PORT - 1000; RMI_PORT is SOLR_PORT + 1000)
- {{SOLR_URL_SCHEME}} relies on {{SOLR_SSL_ENABLED}}, as do many of the other
SSL options.
- {{SOLR_PID_DIR}}, {{SOLR_LOGS_DIR}}, {{DEFAULT_SERVER_DIR}} all rely on the
value of {{SOLR_TIP}}.
Anyway, I guess the point I'm working up to is that we might be able to pull
out more "defaults" if they live in a Java constants file. It's less standard,
but has some advantages. I could go either way on it, just wanted to get some
opinions.
(If we still go with a properties/conf file, there _are_ other defaults I can
pull out. I just stopped for the night when I ran into the pattern described
above.)
> 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,
> 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]