You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Yan Xu (JIRA)" <ji...@apache.org> on 2016/04/05 06:45:25 UTC

[jira] [Created] (MESOS-5119) Support directory structure in CommandInfo.URI.filename in fetcher

Yan Xu created MESOS-5119:
-----------------------------

             Summary: 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)