File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
service_configuration_lib Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 76
76
]
77
77
78
78
SUPPORTED_CLUSTER_MANAGERS = ['kubernetes' , 'local' ]
79
- DEFAULT_SPARK_RUN_CONFIG = '/nail/srv/configs/spark.yaml'
80
79
TICKET_NOT_REQUIRED_USERS = {
81
80
'batch' , # non-human spark-run from batch boxes
82
81
'TRON' , # tronjobs that run commands like paasta mark-for-deployment
Original file line number Diff line number Diff line change 3
3
import errno
4
4
import hashlib
5
5
import logging
6
+ import os
6
7
import random
7
8
import string
8
9
import uuid
@@ -45,8 +46,10 @@ def load_spark_srv_conf(preset_values=None) -> Tuple[
45
46
]:
46
47
if preset_values is None :
47
48
preset_values = dict ()
49
+
50
+ config_path = os .environ .get ('SPARK_RUN_CONFIG_PATH' , DEFAULT_SPARK_RUN_CONFIG )
48
51
try :
49
- with open (DEFAULT_SPARK_RUN_CONFIG , 'r' ) as fp :
52
+ with open (config_path , 'r' ) as fp :
50
53
loaded_values = yaml .safe_load (fp .read ())
51
54
spark_srv_conf = {** preset_values , ** loaded_values }
52
55
spark_constants = spark_srv_conf ['spark_constants' ]
@@ -58,7 +61,7 @@ def load_spark_srv_conf(preset_values=None) -> Tuple[
58
61
mandatory_default_spark_srv_conf , spark_costs ,
59
62
)
60
63
except Exception as e :
61
- log .warning (f'Failed to load { DEFAULT_SPARK_RUN_CONFIG } : { e } ' )
64
+ log .warning (f'Failed to load { config_path } : { e } ' )
62
65
raise e
63
66
64
67
You can’t perform that action at this time.
0 commit comments