janhoy commented on code in PR #3312: URL: https://github.com/apache/solr/pull/3312#discussion_r2135670969
########## solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java: ########## @@ -32,28 +33,47 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import org.apache.solr.common.SolrException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Provides convenient access to System Properties for Solr. It also converts 'SOLR_FOO' env vars to * system properties 'solr.foo', which is done on first access of this class. All Solr code should * use this in lieu of JDK equivalents. */ public class EnvUtils { + private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + /** Maps ENV keys to sys prop keys for special/custom mappings */ private static final Map<String, String> CUSTOM_MAPPINGS = new HashMap<>(); + /** Maps deprecated sys prop keys to current sys prop keys with special/custom mappings */ + private static final Map<String, String> DEPRECATED_MAPPINGS = new HashMap<>(); + private static final Map<String, String> camelCaseToDotsMap = new ConcurrentHashMap<>(); static { try { Properties props = new Properties(); + Properties deprecatedProps = new Properties(); try (InputStream stream = - EnvUtils.class.getClassLoader().getResourceAsStream("EnvToSyspropMappings.properties")) { + EnvUtils.class + .getClassLoader() + .getResourceAsStream("EnvToSyspropMappings.properties"); + InputStream stream2 = + EnvUtils.class + .getClassLoader() + .getResourceAsStream("EnvToSyspropDeprecatedMappings.properties")) { Review Comment: More meaninful variable names than `stream` and `stream2`. The file name `EnvToSyspropDeprecatedMappings.properties` gives impression that this file maps env.variables to sys props, but the file itself says it maps sys props to sys props? Q: Would it be possible to add deprecations as a section in the existing properties file, perhaps with a prefix `deprecated.*` to keep it in one place? ########## solr/core/src/java/org/apache/solr/core/CoreContainer.java: ########## @@ -1766,7 +1766,7 @@ private SolrCore createFromDescriptor( // this mostly happens when the core is deleted when this node is down // but it can also happen if connecting to the wrong zookeeper final boolean deleteUnknownCores = - Boolean.parseBoolean(System.getProperty("solr.deleteUnknownCores", "false")); + Boolean.parseBoolean(System.getProperty("solr.delete.unknown.cores", "false")); Review Comment: `solr.cloud.startup.delete.unknown.cores.enabled`? ########## solr/core/src/java/org/apache/solr/cli/PackageTool.java: ########## @@ -334,7 +334,7 @@ public String getHeader() { "Note: (a) Please add '--solr-url http://host:port' parameter if needed (usually on Windows)."); format( sb, - " (b) Please make sure that all Solr nodes are started with '-Denable.packages=true' parameter."); + " (b) Please make sure that all Solr nodes are started with '-Dsolr.enable.packages=true' parameter."); Review Comment: `solr.packages.enabled` ? ########## solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java: ########## @@ -114,8 +114,8 @@ public SolrRequestParsers(SolrConfig globalConfig) { formUploadLimitKB = globalConfig.getFormUploadLimitKB(); // security risks; disabled by default - enableRemoteStreams = Boolean.getBoolean("solr.enableRemoteStreaming"); - enableStreamBody = Boolean.getBoolean("solr.enableStreamBody"); + enableRemoteStreams = Boolean.getBoolean("solr.enable.remote.streaming"); + enableStreamBody = Boolean.getBoolean("solr.enable.stream.body"); Review Comment: `solr.requests.streaming.remote.enabled` and `solr.requests.streaming.body.enabled` ? ########## solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java: ########## @@ -39,9 +39,9 @@ */ public final class LoadAdminUiServlet extends HttpServlet { - // check system properties for whether or not admin UI is disabled, default is false + // check system properties for whether the admin UI is disabled, default is false private static final boolean disabled = - Boolean.parseBoolean(System.getProperty("disableAdminUI", "false")); + Boolean.parseBoolean(System.getProperty("solr.admin.ui.disabled", "false")); Review Comment: `solr.ui.disabled` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org