[
https://issues.apache.org/jira/browse/HADOOP-18294?focusedWorklogId=789095&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-789095
]
ASF GitHub Bot logged work on HADOOP-18294:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jul/22 17:37
Start Date: 08/Jul/22 17:37
Worklog Time Spent: 10m
Work Description: aajisaka commented on code in PR #4446:
URL: https://github.com/apache/hadoop/pull/4446#discussion_r917019810
##########
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())`.
Issue Time Tracking
-------------------
Worklog Id: (was: 789095)
Time Spent: 1.5h (was: 1h 20m)
> 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: 1.5h
> 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]