[ https://issues.apache.org/jira/browse/MESOS-5119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15227288#comment-15227288 ]
Michael Browning commented on MESOS-5119: ----------------------------------------- Great, I'd be happy to add this functionality. I'll add you as shepherd. Thanks! > Support directory structure in CommandInfo.URI.filename in fetcher > ------------------------------------------------------------------ > > Key: MESOS-5119 > URL: https://issues.apache.org/jira/browse/MESOS-5119 > Project: Mesos > Issue Type: Improvement > Components: fetcher > Reporter: Yan Xu > > In MESOS-4735, {{CommandInfo.URI.filename}} is added but there is no > validation to make sure it's a simple basename, so people can actually > specify the filename to be something like {{path/to/file}} but the validation > [won't catch it|https://reviews.apache.org/r/45046/#comment190155]. The fetch > will fail later in {{download()}} because it cannot open a destination file > without its parent directory. > Instead of fixing this by disallowing such output filename, we could actually > support this behavior. There are use cases where multiple fetch targets have > the same basename but they are organized by a directory hierarchy. > {noformat:title=} > root/app.dat > root/parent/app.dat > root/parent/child/app.dat > {noformat} > It looks to me that supporting this is straightforward and we just need to 1) > make sure the output path is within the sandbox and 2) recursively mkdirs for > the parent dirs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)