import sys import base64 from hdijupyterutils.constants import EVENTS_HANDLER_CLASS_NAME, LOGGING_CONFIG_CLASS_NAME from hdijupyterutils.utils import join_paths from hdijupyterutils.configuration import override as _override from hdijupyterutils.configuration import override_all as _override_all from hdijupyterutils.configuration import with_override from .constants import HOME_PATH, CONFIG_FILE, MAGICS_LOGGER_NAME, LIVY_KIND_PARAM, \ LANG_SCALA, LANG_PYTHON, LANG_PYTHON3, LANG_R, \ SESSION_KIND_SPARKR, SESSION_KIND_SPARK, SESSION_KIND_PYSPARK, SESSION_KIND_PYSPARK3, CONFIGURABLE_RETRY from sparkmagic.livyclientlib.exceptions import BadUserConfigurationException import sparkmagic.utils.constants as constants d = {} path = join_paths(HOME_PATH, CONFIG_FILE) def override(config, value): _override(d, path, config, value) def override_all(obj): _override_all(d, obj) _with_override = with_override(d, path) # Helpers
import copy import sys import base64 from hdijupyterutils.constants import EVENTS_HANDLER_CLASS_NAME, LOGGING_CONFIG_CLASS_NAME from hdijupyterutils.utils import join_paths from hdijupyterutils.configuration import override as _override from hdijupyterutils.configuration import override_all as _override_all from hdijupyterutils.configuration import with_override from .constants import HOME_PATH, CONFIG_FILE, MAGICS_LOGGER_NAME, LIVY_KIND_PARAM from .utils import get_livy_kind from sparkmagic.livyclientlib.exceptions import BadUserConfigurationException d = {} path = join_paths(HOME_PATH, CONFIG_FILE) def override(config, value): _override(d, path, config, value) def override_all(obj): _override_all(d, obj) _with_override = with_override(d, path) # Configs