spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: No suitable Constructor found while compiling
Date Sun, 18 Oct 2015 14:18:05 GMT
I see two argument ctor. e.g.

  /** Construct an RDD with just a one-to-one dependency on one parent */
  def this(@transient oneParent: RDD[_]) =
    this(oneParent.context , List(new OneToOneDependency(oneParent)))

Looks like Tuple in your code is T in the following:

abstract class RDD[T: ClassTag](
    @transient private var _sc: SparkContext,
    @transient private var deps: Seq[Dependency[_]]

FYI

On Sun, Oct 18, 2015 at 6:39 AM, VJ Anand <vjanand@sankia.com> wrote:

> I am trying to extend RDD in java, and when I call the parent constructor,
> it gives the error: no suitable constructor found for RDD (SparkContext,
> Seq, ClassTag<Object>).
>
>  Here is the snippet of the code:
>
> class QueryShard extends RDD<Tuple> {
>
> ----
>
> sc (sc, (Seq)new ArrayBuffer<Dependency<?>>,
> ClassTag$.MODULE$.apply(Tuple.class);
>
> }
>
> Compiler error: no suitable constructor found for RDD (SparkContext, Seq,
> ClassTag<Object>)
>
> Any thoughts? pointers..
>
> Thanks
> VJ
>
>
>

Mime
View raw message