GitHub user sanjaydasgupta opened a pull request: https://github.com/apache/zeppelin/pull/3000
[ZEPPELIN-3467] two-step, atomic configuration file ### What is this PR for? This PR continues the discussion and implementation in [PR-2978](https://github.com/apache/zeppelin/pull/2978) which had to be closed earlier. This PR prevents the total loss of configuration information that happens when zeppelin attempts to write out modified configuration information into an already full file-system. The approach taken here is to first write the modified information to a temporary file (in the same directory), and then to rename the successfully written file to its eventual name. The rename operation is not attempted if there is an error while writing the temporary file, thus leaving the pre-existing configuration file untouched. ### What type of PR is it? [Improvement] ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-3467 ### How should this be tested? CI Pass ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/sanjaydasgupta/zeppelin zepp-3467-atomic-config-file-writes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/3000.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3000 ---- commit be19e63283894e80e11174137405601cdbf08e53 Author: Sanjay Dasgupta <sanjay.dasgupta@...> Date: 2018-06-01T13:46:08Z zepp-3467-atomic-config-file-writes: Initial updates ---- ---