java - SparkSession Exception in Eclipse -
i want use sparksession in eclipse, let supports hive, exception.
public static void main(string[] args) { string warehouselocation = new file("spark-warehouse").getabsolutepath(); sparksession sparksession = sparksession.builder() .master("local[*]") .appname("testhive") .config("spark.sql.warehouse.dir", warehouselocation) .enablehivesupport() .getorcreate(); sparksession.sql("create table if not exists src (key int, value string) using hive").show(); sparksession.sql("load data local inpath 'examples/src/main/resources/kv1.txt' table src"); sparksession.close(); }
and displays exception:
Comments
Post a Comment