[
https://issues.apache.org/jira/browse/KAFKA-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15535633#comment-15535633
]
ASF GitHub Bot commented on KAFKA-4233:
---------------------------------------
GitHub user dguy opened a pull request:
https://github.com/apache/kafka/pull/1942
KAFKA-4233: StateDirectory fails to create directory if any parent
directory does not exist
Change the creation of the directories, in the StateDirectory constructor,
to use mkdirs so any parents get created. Throw an exception if the directory
doesn't exist and couldn't be created
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dguy/kafka kafka-4233
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1942.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 #1942
----
commit 0c4696a6ceaac1598fe612004c1ccb827bbbaffd
Author: Damian Guy <[email protected]>
Date: 2016-09-30T10:21:40Z
create parent dirs and check dir was created
----
> StateDirectory fails to create directory if any parent directory does not
> exist
> -------------------------------------------------------------------------------
>
> Key: KAFKA-4233
> URL: https://issues.apache.org/jira/browse/KAFKA-4233
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 0.10.1.0
> Reporter: Ryan Worsley
> Assignee: Damian Guy
> Fix For: 0.10.1.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The method {{directoryForTask}} attempts to create a task directory but will
> silently fail to do so as it calls {{taskDir.mkdir();}} which will only
> create the leaf directory.
> Calling {{taskDir.mkdirs();}} (note the 's') will create the entire path if
> any parent directory is missing.
> The constructor also attempts to create a bunch of directories using the
> former method and should be reviewed as part of any fix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)