[ https://issues.apache.org/jira/browse/OOZIE-2858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150361#comment-16150361 ]
Peter Bacsko commented on OOZIE-2858: ------------------------------------- I realized it's even easier to create a temp file. Just invoke {{TemporaryFolder.newFile()}}. It will be automatically deleted after the testcase. > HiveMain, ShellMain and SparkMain should not overwrite properties and config > files locally > ------------------------------------------------------------------------------------------ > > Key: OOZIE-2858 > URL: https://issues.apache.org/jira/browse/OOZIE-2858 > Project: Oozie > Issue Type: Bug > Reporter: Peter Cseh > Assignee: Peter Cseh > Attachments: OOZIE-2858-001.patch, OOZIE-2858-002.patch, > OOZIE-2858-003.patch, OOZIE-2858-004.patch, OOZIE-2858-005.patch > > > We're generating files on the fly in many of our *Main classes. > These are usually log4j.properties and hive-site.xml files (there may be > others, but these are the ones I managed to find). > We should check if these files are there in advance and don't overwrite them > if they are present. We could log a warning in this case or merge the > contents of the files with the things we want to write into it. There is an > example for this in PigMain and log4j.properties. -- This message was sent by Atlassian JIRA (v6.4.14#64029)