You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crunch.apache.org by "Adric Eckstein (JIRA)" <ji...@apache.org> on 2015/10/15 20:57:05 UTC

[jira] [Reopened] (CRUNCH-543) AvroPathPerKeyTarget copy nested subdirectories

     [ https://issues.apache.org/jira/browse/CRUNCH-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adric Eckstein reopened CRUNCH-543:
-----------------------------------

Seems that this actually fixes half of the directories, but only if its an even number of subdirectories.  Missed it in my tests first time around.

> AvroPathPerKeyTarget copy nested subdirectories
> -----------------------------------------------
>
>                 Key: CRUNCH-543
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-543
>             Project: Crunch
>          Issue Type: Improvement
>          Components: IO
>            Reporter: Adric Eckstein
>            Assignee: Josh Wills
>             Fix For: 0.13.0
>
>         Attachments: CRUNCH-543.patch
>
>
> When using AvroPathPerKeyTarget to write out a subpath in the output directory using a String key, the key might indicate multiple subfolders:
> Pair<String, String> kv = new Pair<String, String>("foo/bar", "value");
> PTable<String, String> kvs = pipeline.create(Arrays.asList(kv),Avros.tableOf(Avros.strings(), Avros.strings()));
> PTables.asPTable(kvs).write(new AvroPathPerKeyTarget("output"));
> This throws the error:
> java.io.IOException: java.lang.IllegalArgumentException: Reducer output name 'bar' cannot be parsed
> 	at org.apache.crunch.impl.mr.exec.CrunchJobHooks$CompletionHook.handleMultiPaths(CrunchJobHooks.java:92)
> ...
> In AvroPathPerKeyTarget the handleOutputs method would need to recursively copy subfolders (currently only checks first level in output directory) to enable keys that define multiple sub folders.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)