-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.py
24 lines (21 loc) · 935 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
import sys
from spark_controler.emr_controller import *
deployer = EMRController()
deployer.profile_name = 'default'
deployer.subnet_id = 'subnet-50c2a327'
deployer.key_name = 'EMR_Key'
deployer.s3_bucket = 'emr-related-files'
deployer.master_instance_type = 'm4.xlarge'
deployer.slave_instance_type = 'm4.2xlarge'
deployer.worker_instance_count = 2
deployer.set_maxmimum_allocation = True
deployer.number_of_executors_per_node = 1
deployer.run('create')
# deployer.job_flow_id = 'j-LHWGJEIQ9NOI'
deployer.path_script = os.path.dirname( __file__ )
deployer.file_to_run = 'spark_main.py'
# Use this if you want to spark submit on the server manually
# spark-submit --packages ai.h2o:sparkling-water-core_2.11:2.1.9 --conf spark.dynamicAllocation.enabled=false
deployer.additional_job_args = ['--packages', 'ai.h2o:sparkling-water-core_2.11:2.1.9', '--conf', 'spark.dynamicAllocation.enabled=false']
deployer.run('run_job')