[ 
https://issues.apache.org/jira/browse/HADOOP-17653?focusedWorklogId=586655&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-586655
 ]

ASF GitHub Bot logged work on HADOOP-17653:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Apr/21 15:15
            Start Date: 21/Apr/21 15:15
    Worklog Time Spent: 10m 
      Work Description: virajjasani commented on a change in pull request #2945:
URL: https://github.com/apache/hadoop/pull/2945#discussion_r617639135



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/impl/StateStoreFileImpl.java
##########
@@ -88,7 +88,16 @@ protected String getRootDir() {
     if (this.rootDirectory == null) {
       String dir = getConf().get(FEDERATION_STORE_FILE_DIRECTORY);
       if (dir == null) {
-        File tempDir = Files.createTempDir();
+        File tempDirBase =
+            new File(System.getProperty("java.io.tmpdir"));
+        File tempDir = null;
+        try {
+          tempDir = java.nio.file.Files.createTempDirectory(
+              tempDirBase.toPath(), System.currentTimeMillis() + "-").toFile();
+        } catch (IOException e) {
+          // fallback to the base upon exception.

Review comment:
       Maybe a debug log would be good since this is rare anyways?




-- 
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.

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 586655)
    Time Spent: 20m  (was: 10m)

> Do not use guava's Files.createTempDir()
> ----------------------------------------
>
>                 Key: HADOOP-17653
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17653
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 3.4.0
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to