0

I have been playing with use classes but I am continuously getting the error above when I try to implement them. This is my code:

import org.apache.spark.graphx._
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

class EdgeProperties()
case class WriterWriterProperties(weight: String, edgeType: String) extends EdgeProperties
object GraphXAnalysis2 {

val edgeWeightedWriterWriterCollaborated = "in/Graphs/Graph4_WriterWriter/EdgesWeightedWriterWriter_writerscollaborated.csv"
    val vertexWriterWriter = "in/Graphs/Graph4_WriterWriter/Vertices.csv"
    val conf = new SparkConf().setAppName("Music Graph Application").setMaster("local[1]")
    val sc = new SparkContext(conf)

 val WriterWriter: RDD[(VertexId, String)] = sc.textFile(vertexWriterWriter).map {
      line =>
        val row = line.split(",")
        (row(0).toLong, row(2))
    }

val edgesWriterWriterCollaborated: RDD[Edge[EdgeProperties]] = sc.textFile(edgeWeightedWriterWriterCollaborated).map {
      line =>
        val row = line.split(",")
        Edge(row(0).toLong, row(1).toLong, WriterWriterProperties(row(2), row(3)): EdgeProperties)
    }

val graph4 = Graph(WriterWriter, edgesWriterWriterCollaborated)

Am I declaring the class wrongly, using it wrong or putting it in the wrong position? Thank you so much as I am completely new to this.

Shaido
  • 27,497
  • 23
  • 70
  • 73
gannina
  • 173
  • 1
  • 8
  • 1
    Possible duplicate of [Exception in thread "main" java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)](https://stackoverflow.com/questions/46293697/exception-in-thread-main-java-lang-nosuchmethoderror-scala-product-initlsc) – Shaido Jun 07 '18 at 09:47
  • Possible duplicate of [Resolving dependency problems in Apache Spark](https://stackoverflow.com/questions/41383460/resolving-dependency-problems-in-apache-spark) – Alper t. Turker Jun 07 '18 at 09:57

0 Answers0