客快物流大数据项目(四十七):Spark操作Kudu Native RDD

2022-02-24 15:09:55 浏览数 (1)

目录

Spark操作Kudu Native RDD

Spark操作Kudu Native RDD

Spark与Kudu的集成同时提供了kudu RDD

  • 代码示例
代码语言:javascript复制
val columnsList = List("id", "name", "age", "sex")
val rowRDD: RDD[Row] = kuduContext.kuduRDD(sc, TABLE_NAME, columnsList)
rowRDD.foreach(println(_))
sc.stop()
//session.read.options(kuduOptions).kudu.show()

0 人点赞