crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Lewi <jer...@lewi.us>
Subject Re: How to create in memory collection of iterable?
Date Sun, 12 Jan 2014 03:26:44 GMT
I ended up just creating a PTable<String, BowtieMapping> and then invoking
groupByKey on the table.

J


On Sat, Jan 11, 2014 at 6:20 PM, Jeremy Lewi <jeremy@lewi.us> wrote:

> Lets try again,
>
> How do I create an in memory collection of iterable avro specific types? I
> can't seem to figure out how to create a PType for the iterable type.
>
> Here's what I'm trying:
>     ArrayList<BowtieMapping> mappings = new ArrayList<BowtieMapping>();
>     PCollection<Iterable<BowtieMapping>> example4 =
>         MemPipeline.typedCollectionOf(
>             Avros.collections(mappings.getClass()),
>             mappings);
>
> In this case BowtieMapping is the class for my avro specific type.
>
> I'm trying to write a unit test for a DoFn.
>
> Thanks
> J
>
>
>
> On Sat, Jan 11, 2014 at 6:16 PM, Jeremy Lewi <jeremy@lewi.us> wrote:
>
>> Hi Crunch Users,
>>
>> Ho
>>
>
>

Mime
View raw message