зеркало из https://github.com/Azure/aztk.git
Fix typo load_aztk_screts -> load_aztk_secrets (#421)
This commit is contained in:
Родитель
c724d9403f
Коммит
6827181a34
|
@ -13,7 +13,7 @@ from aztk.spark.models import (
|
|||
)
|
||||
from aztk.models.plugins.internal import PluginReference
|
||||
|
||||
def load_aztk_screts() -> SecretsConfiguration:
|
||||
def load_aztk_secrets() -> SecretsConfiguration:
|
||||
"""
|
||||
Loads aztk from .aztk/secrets.yaml files(local and global)
|
||||
"""
|
||||
|
|
|
@ -20,7 +20,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
log.info('-------------------------------------------')
|
||||
log.info('spark cluster id: {}'.format(args.cluster_id))
|
||||
|
|
|
@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
if args.tail:
|
||||
utils.stream_logs(client=spark_client, cluster_id=args.cluster_id, application_name=args.app_name)
|
||||
|
|
|
@ -17,7 +17,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
spark_client.cluster_copy(
|
||||
cluster_id=args.cluster_id,
|
||||
|
|
|
@ -34,7 +34,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
cluster_conf = ClusterConfiguration()
|
||||
cluster_conf.spark_configuration = load_aztk_spark_config()
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
cluster_id = args.cluster_id
|
||||
|
||||
if not args.force:
|
||||
|
|
|
@ -17,7 +17,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
cluster_id = args.cluster_id
|
||||
cluster = spark_client.get_cluster(cluster_id)
|
||||
utils.print_cluster(spark_client, cluster)
|
||||
|
|
|
@ -10,6 +10,6 @@ def setup_parser(_: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(_: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
clusters = spark_client.list_clusters()
|
||||
utils.print_clusters(clusters)
|
||||
|
|
|
@ -12,6 +12,6 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
help='The command to run on your spark cluster')
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
result = spark_client.cluster_run(args.cluster_id, args.command)
|
||||
#TODO: pretty print result
|
||||
|
|
|
@ -32,7 +32,7 @@ http_prefix = 'http://localhost:'
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
cluster = spark_client.get_cluster(args.cluster_id)
|
||||
cluster_config = utils.helpers.read_cluster_config(args.cluster_id, spark_client.blob_client)
|
||||
ssh_conf = SshConfig()
|
||||
|
|
|
@ -72,7 +72,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
jars = []
|
||||
py_files = []
|
||||
files = []
|
||||
|
|
|
@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
job_id = args.job_id
|
||||
|
||||
if not args.force:
|
||||
|
|
|
@ -13,6 +13,6 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
utils.print_job(spark_client, spark_client.get_job(args.job_id))
|
||||
|
|
|
@ -17,6 +17,6 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
utils.print_application(spark_client.get_application(args.job_id, args.app_name))
|
||||
|
|
|
@ -15,6 +15,6 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
app_logs = spark_client.get_job_application_log(args.job_id, args.app_name)
|
||||
print(app_logs.log)
|
||||
|
|
|
@ -10,6 +10,6 @@ def setup_parser(_: argparse.ArgumentParser):
|
|||
pass
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
utils.print_jobs(spark_client.list_jobs())
|
||||
|
|
|
@ -12,5 +12,5 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
utils.print_applications(spark_client.list_applications(args.job_id))
|
||||
|
|
|
@ -13,6 +13,6 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
spark_client.stop_job(args.job_id)
|
||||
print("Stopped Job {0}".format(args.job_id))
|
||||
|
|
|
@ -19,7 +19,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
if spark_client.stop_job_app(args.job_id, args.app_name):
|
||||
log.info("Stopped app {0}".format(args.app_name))
|
||||
|
|
|
@ -18,7 +18,7 @@ def setup_parser(parser: argparse.ArgumentParser):
|
|||
|
||||
|
||||
def execute(args: typing.NamedTuple):
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
job_conf = JobConfig()
|
||||
|
||||
job_conf.merge(args.job_id, args.job_conf)
|
||||
|
|
|
@ -19,7 +19,7 @@ base_cluster_id = "cluster-{}".format(current_time)
|
|||
|
||||
# load secrets
|
||||
# note: this assumes secrets are set up in .aztk/secrets
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
|
||||
# helper method
|
||||
|
|
|
@ -14,7 +14,7 @@ base_job_id = "job-{}".format(time)
|
|||
|
||||
# load secrets
|
||||
# note: this assumes secrets are set up in .aztk/secrets
|
||||
spark_client = aztk.spark.Client(config.load_aztk_screts())
|
||||
spark_client = aztk.spark.Client(config.load_aztk_secrets())
|
||||
|
||||
|
||||
def test_submit_job():
|
||||
|
@ -281,4 +281,4 @@ def test_delete_job():
|
|||
try:
|
||||
spark_client.delete_job(job_configuration.id)
|
||||
except Exception:
|
||||
pass
|
||||
pass
|
||||
|
|
Загрузка…
Ссылка в новой задаче