@@ -37,7 +37,7 @@ def setup_parser(parser: argparse.ArgumentParser):
3737def execute (args : typing .NamedTuple ):
3838 spark_client = aztk .spark .Client (config .load_aztk_secrets ())
3939 cluster = spark_client .cluster .get (args .cluster_id )
40- cluster_config = spark_client .cluster .get_cluster_config (args .cluster_id )
40+ cluster_configuration = spark_client .cluster .get_configuration (args .cluster_id )
4141 ssh_conf = SshConfig ()
4242
4343 ssh_conf .merge (
@@ -55,21 +55,21 @@ def execute(args: typing.NamedTuple):
5555 utils .log_property ("open webui" , "{0}{1}" .format (http_prefix , ssh_conf .web_ui_port ))
5656 utils .log_property ("open jobui" , "{0}{1}" .format (http_prefix , ssh_conf .job_ui_port ))
5757 utils .log_property ("open jobhistoryui" , "{0}{1}" .format (http_prefix , ssh_conf .job_history_ui_port ))
58- print_plugin_ports (cluster_config )
58+ print_plugin_ports (cluster_configuration )
5959 utils .log_property ("ssh username" , ssh_conf .username )
6060 utils .log_property ("connect" , ssh_conf .connect )
6161 log .info ("-------------------------------------------" )
6262
6363 try :
64- shell_out_ssh (spark_client , ssh_conf )
64+ shell_out_ssh (spark_client , cluster_configuration , ssh_conf )
6565 except OSError :
6666 # no ssh client is found, falling back to pure python
67- native_python_ssh_into_master (spark_client , cluster , ssh_conf , args .password )
67+ native_python_ssh_into_master (spark_client , cluster , cluster_configuration , ssh_conf , args .password )
6868
6969
70- def print_plugin_ports (cluster_config : ClusterConfiguration ):
71- if cluster_config and cluster_config .plugins :
72- plugins = cluster_config .plugins
70+ def print_plugin_ports (cluster_configuration : ClusterConfiguration ):
71+ if cluster_configuration and cluster_configuration .plugins :
72+ plugins = cluster_configuration .plugins
7373 has_ports = False
7474 plugin_ports = {}
7575 for plugin in plugins :
@@ -93,12 +93,12 @@ def print_plugin_ports(cluster_config: ClusterConfiguration):
9393 utils .log_property (label , url )
9494
9595
96- def native_python_ssh_into_master (spark_client , cluster , ssh_conf , password ):
96+ def native_python_ssh_into_master (spark_client , cluster , cluster_configuration , ssh_conf , password ):
9797 if not ssh_conf .connect :
9898 log .warning ("No ssh client found, using pure python connection." )
9999 return
100100
101- configuration = spark_client .cluster .get_cluster_config (cluster .id )
101+ configuration = spark_client .cluster .get_configuration (cluster .id )
102102 plugin_ports = []
103103 if configuration and configuration .plugins :
104104 ports = [
@@ -124,11 +124,12 @@ def native_python_ssh_into_master(spark_client, cluster, ssh_conf, password):
124124 internal = ssh_conf .internal )
125125
126126
127- def shell_out_ssh (spark_client , ssh_conf ):
127+ def shell_out_ssh (spark_client , cluster_configuration , ssh_conf ):
128128 try :
129129 ssh_cmd = utils .ssh_in_master (
130130 client = spark_client ,
131131 cluster_id = ssh_conf .cluster_id ,
132+ cluster_configuration = cluster_configuration ,
132133 webui = ssh_conf .web_ui_port ,
133134 jobui = ssh_conf .job_ui_port ,
134135 jobhistoryui = ssh_conf .job_history_ui_port ,
0 commit comments