Geode makes nearly 300 references to the JVM working directory. Tests make an additional 1200 references.
Implementing this proposal requires changing nearly all of these references so that, instead of resolving relative pathnames against the JVM's working directory, they resolve against the configured working directory. There are several ways in which Geode and its tests reference the JVM's working directory: 1. Use of the "user.dir" system property. 2. Use of a File or Path with pathname "." or "". 3. Calls to methods that convert a possibly relative pathname to an absolute one: - file.getAbsoluteFile() - file.getAbsolutePath() - file.getCanonicalFile() - file.getCanonicalPath() - path.toAbsolutePath() - IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(file) - IOUtils.tryGetCanonicalPathElseGetAbsolutePath(file) Changing these references involves varying degress of difficulty, depending on whether there is an object is in scope that can identify the configured working directory. Some references have ready access to a DistributionConfig, or to a cache from which it can retrieve the configuration. Many references are in contexts in which no configuration object is readily available. In a small number of cases, it is appropriate to resolve relative pathnames against the JVM's working directory. These few references would not have to change. See the attached PDF file for an inventory of how different modules reference the JVM's working directory. Cheers, Dale On 10/6/20, 12:12 PM, "Dale Emery" <dem...@vmware.com> wrote: Hi all, I have submitted an RFC to make Geode’s working directory configurable: https://cwiki.apache.org/confluence/display/GEODE/Make+Geode%27s+Working+Directory+Configurable Please review it and comment by Oct 26. Cheers, Dale