Hi,
I have the following code snippet. It works fine on spark-shell but in a
standalone app it reports "No TypeTag available for MySchema” at compile time
when calling hc.createScheamaRdd(rdd). Anybody knows what might be missing?
Thanks,
Du
------
Import org.apache.spark.sql.hive.HiveContext
case class MySchema(key: Int, value: String)
val rdd = sc.parallelize((1 to 10).map(i => MySchema(i, s"val$i")))
val schemaRDD = hc.createSchemaRDD(rdd)
schemaRDD.registerTempTable("data")
val rows = hc.sql("select * from data")
rows.collect.foreach(println)