incubator-crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Herbet <lionel.her...@gmail.com>
Subject [Scrunch] implicit PTypeH value on parallelDo method
Date Thu, 14 Feb 2013 10:29:21 GMT
Hi,

I'm currently testing scrunch after few MR Job implementation on crunch.
I was wondering if it would be possible to have implicit PTypeH parameter
in PcollectionLike scala trait methods ?
PCollection scala class already has implicit PtypeH parameter for map
method.

For example in PcollectionLike scala Trait we could add the method

def parallelDo[T](fn: DoFn[S, T])(implicit pt: PTypeH[T]) = {
        new PCollection[T](native.parallelDo(fn, pt.get(getTypeFamily())))
    }

This method is equivalent to the existing one but with an implicit value
for PTypeH depending on [T] class type.

def parallelDo[T](fn: DoFn[S, T], ptype: PType[T]) = {
    new PCollection[T](native.parallelDo(fn, ptype))
  }

What do you think ?

Lionel

Mime
View raw message