Commit 642514a4 authored by 高雅喆's avatar 高雅喆

change spark context

parent 10d6fed4
...@@ -87,8 +87,9 @@ object Main { ...@@ -87,8 +87,9 @@ object Main {
//1. get the input and node2vec //1. get the input and node2vec
GmeiConfig.setup(param) GmeiConfig.setup(param)
val context = GmeiConfig.getSparkSession()._1 val spark_env = GmeiConfig.getSparkSession()
val sc = GmeiConfig.getSparkSession()._2 val context = spark_env._1
val sc = spark_env._2
val ti = new TiContext(sc) val ti = new TiContext(sc)
ti.tidbMapTable(dbName = GmeiConfig.config.getString("tidb.database"),tableName = "nd_data_meigou_cid") ti.tidbMapTable(dbName = GmeiConfig.config.getString("tidb.database"),tableName = "nd_data_meigou_cid")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment