add a default port for the history server (#213)

* add a default port for the history server

* use default ssh ports in contructor and fix ssh output strings
This commit is contained in:
Pablo Selem 2017-11-13 09:55:53 -08:00 коммит произвёл GitHub
Родитель 65a56dd657
Коммит dfd73960c3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 17 добавлений и 10 удалений

Просмотреть файл

@ -180,13 +180,16 @@ class SshConfig:
def __init__(self):
self.username = None
self.cluster_id = None
self.job_ui_port = None
self.job_history_ui_port = None
self.web_ui_port = None
self.jupyter_port = None
self.host = False
self.connect = True
# Set up ports with default values
self.job_ui_port = '4040'
self.job_history_ui_port = '18080'
self.web_ui_port = '8080'
self.jupyter_port = '8888'
def _read_config_file(self, path: str = aztk_sdk.utils.constants.DEFAULT_SSH_CONFIG_PATH):
"""
Reads the config file in the .aztk/ directory (.aztk/cluster.yaml)

Просмотреть файл

@ -47,12 +47,13 @@ def execute(args: typing.NamedTuple):
connect=args.connect
)
http_prefix = 'http://localhost:'
log.info("-------------------------------------------")
log.info("spark cluster id: %s", ssh_conf.cluster_id)
log.info("open webui: %s", ssh_conf.web_ui_port)
log.info("open jobui: %s", ssh_conf.job_ui_port)
log.info("open jobhistoryui: %s", ssh_conf.job_history_ui_port)
log.info("open jupyter: %s", ssh_conf.jupyter_port)
log.info("open webui: %s%s", http_prefix, ssh_conf.web_ui_port)
log.info("open jobui: %s%s", http_prefix, ssh_conf.job_ui_port)
log.info("open jobhistoryui: %s%s", http_prefix, ssh_conf.job_history_ui_port)
log.info("open jupyter: %s%s", http_prefix, ssh_conf.jupyter_port)
log.info("ssh username: %s", ssh_conf.username)
log.info("connect: %s", ssh_conf.connect)
log.info("-------------------------------------------")

Просмотреть файл

@ -8,11 +8,14 @@ username: spark
# job_ui_port: <local port where the job ui is forwarded to>
job_ui_port: 4040
# job_history_ui_port: <local port where the job history ui is forwarded to>
job_history_ui_port: 18080
# web_ui_port: <local port where the spark master web ui is forwarded to>
web_ui_port: 8080
# jupyter_port: <local port which where jupyter is forwarded to>
jupyter_port: 8888
# connect: <true/false, connect to spark master or print connection string (--no-connect)>
connect: true
# connect: <true/false, connect to spark master or print connection string (--no-connect)>
connect: true