Skip to content

Instantly share code, notes, and snippets.

@baybatu
Created February 25, 2020 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baybatu/49bde7d4730994e451def1d4f3bd0416 to your computer and use it in GitHub Desktop.
Save baybatu/49bde7d4730994e451def1d4f3bd0416 to your computer and use it in GitHub Desktop.
Create spark session using hive metastore on local
SparkSession spark = SparkSession
.builder()
.appName("com.baybatu.sparkApp")
.master("local[*]")
.enableHiveSupport()
.config("dfs.nameservices", "nameService01")
.config("hive.metastore.uris", "thrift://10.20.30.40:8093")
.getOrCreate();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment