janhoy commented on a change in pull request #525:
URL: https://github.com/apache/solr/pull/525#discussion_r785211424



##########
File path: solr/core/src/java/org/apache/solr/core/NodeConfig.java
##########
@@ -206,7 +208,16 @@ public Path getSolrDataHome() {
     return solrDataHome;
   }
 
-  /** 
+  /**
+   * Obtain the path of solr's binary installation directory, e.g. 
<code>/opt/solr</code>
+   * @return path to install dir, or null if property 'solr.install.dir' has 
not been initialized
+   */
+  public Path getSolrInstallDir() {
+    String prop = 
System.getProperty(SolrDispatchFilter.SOLR_INSTALL_DIR_ATTRIBUTE);
+    return prop != null ? Paths.get(prop) : null;

Review comment:
       DispatchFilter has six different sysprop constants defined already. I 
think perhaps instead of spreading them all around we should factor out a new 
class `SolrSystemProperties` to keep all sysprop contants in one place? But 
that is a refactoring for another day.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to