Commit f597205d by Hervé Rousseau

Change global definition

parent f8824bde
Showing with 1 additions and 4 deletions
......@@ -8,9 +8,7 @@ from pyspark.streaming.kafka import KafkaUtils
import utils
config_dic = {}
global config_dic
def get_row(msg, keys):
"""
......@@ -107,7 +105,6 @@ def createContext():
return ssc
if __name__ == "__main__":
global config_dic
config_dic = utils.parse_config("config.conf")
ssc = StreamingContext.getOrCreate(
config_dic['checkpoint_dir'], createContext
......
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 sign in to comment