Re: partition an empty RDD

2016-04-07 Thread Tenghuan He
Thanks for your response Owen:) Yes, I define K as ClassTag type and it works. Sorry for bothering. On Thu, Apr 7, 2016 at 4:07 PM, Sean Owen wrote: > It means pretty much what it says. Your code does not have runtime > class info about K at this point in your code, and it is required. > > On Th

Re: partition an empty RDD

2016-04-07 Thread Sean Owen
It means pretty much what it says. Your code does not have runtime class info about K at this point in your code, and it is required. On Thu, Apr 7, 2016 at 5:52 AM, Tenghuan He wrote: > Hi all, > > I want to create an empty rdd and partition it > > val buffer: RDD[(K, (V, Int))] = base.context.

partition an empty RDD

2016-04-06 Thread Tenghuan He
Hi all, I want to create an empty rdd and partition it val buffer: RDD[(K, (V, Int))] = base.context.emptyRDD[(K, (V, Int))].partitionBy(new HashPartitioner(5)) but got Error: No ClassTag available for K scala needs at runtime to have information about K , but how to solve this? Thanks in adva