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

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

                Author: ASF GitHub Bot
            Created on: 11/Jul/22 01:14
            Start Date: 11/Jul/22 01:14
    Worklog Time Spent: 10m 
      Work Description: ashutoshcipher commented on code in PR #4446:
URL: https://github.com/apache/hadoop/pull/4446#discussion_r917478820


##########
hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocRunner.java:
##########
@@ -172,6 +172,10 @@ private long computeChecksum(File file) throws IOException 
{
 
     public void writeChecksums() throws IOException {
       ObjectMapper mapper = new ObjectMapper();
+      boolean folderCreated = checksumFile.getParentFile().mkdirs();
+      if (!folderCreated) {
+        throw new IOException("Unable to create path");
+      }

Review Comment:
   > I prefer to use NIO.2 library 
`Files.createDirectories(checksumFiles.getParentFile().toPath())`.
   
   Thanks for your suggestion. I have made the changes, can you please review 
it again.





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

    Worklog Id:     (was: 789347)
    Time Spent: 1h 50m  (was: 1h 40m)

> Ensure build folder exists before writing checksum 
> file.ProtocRunner#writeChecksums
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-18294
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18294
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 3.3.3
>            Reporter: Ashutosh Gupta
>            Assignee: Ashutosh Gupta
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Ensure build folder exists before writing checksum 
> file.ProtocRunner#writeChecksums



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to