コード例 #1
0
def setup_stack_symlinks():
    """
  Invokes <stack-selector-tool> set all against a calculated fully-qualified, "normalized" version based on a
  stack version, such as "2.3". This should always be called after a component has been
  installed to ensure that all HDP pointers are correct. The stack upgrade logic does not
  interact with this since it's done via a custom command and will not trigger this hook.
  :return:
  """
    import params
    if params.stack_version_formatted != "" and compare_versions(
            params.stack_version_formatted, '2.2') >= 0:
        # try using the exact version first, falling back in just the stack if it's not defined
        # which would only be during an intial cluster installation
        version = params.current_version if params.current_version is not None else params.stack_version_unformatted

        if not params.upgrade_suspended:
            if params.host_sys_prepped:
                Logger.warning(
                    "Skipping running stack-selector-tool for stack {0} as its a sys_prepped host. This may cause symlink pointers not to be created for HDP componets installed later on top of an already sys_prepped host."
                    .format(version))
                return
            # On parallel command execution this should be executed by a single process at a time.
            with FcntlBasedProcessLock(
                    params.stack_select_lock_file,
                    enabled=params.is_parallel_execution_enabled,
                    skip_fcntl_failures=True):
                stack_select.select_all(version)
コード例 #2
0
def setup_stack_symlinks():
    """
  Invokes <stack-selector-tool> set all against a calculated fully-qualified, "normalized" version based on a
  stack version, such as "2.3". This should always be called after a component has been
  installed to ensure that all HDP pointers are correct. The stack upgrade logic does not
  interact with this since it's done via a custom command and will not trigger this hook.
  :return:
  """
    import params
    if params.stack_version_formatted != "" and compare_versions(
            params.stack_version_formatted, '2.2') >= 0:
        # try using the exact version first, falling back in just the stack if it's not defined
        # which would only be during an intial cluster installation
        version = params.current_version if params.current_version is not None else params.stack_version_unformatted
        stack_select.select_all(version)
コード例 #3
0
def setup_stack_symlinks():
    """
  Invokes <stack-selector-tool> set all against a calculated fully-qualified, "normalized" version based on a
  stack version, such as "4.1". This should always be called after a component has been
  installed to ensure that all IOP pointers are correct. The stack upgrade logic does not
  interact with this since it's done via a custom command and will not trigger this hook.
  :return:
  """
    import params
    if params.stack_version_formatted != "" and compare_versions(
            params.stack_version_formatted, '4.0') >= 0:
        # try using the exact version first, falling back in just the stack if it's not defined
        # which would only be during an intial cluster installation
        version = params.current_version if params.current_version is not None else params.stack_version_unformatted

        if not params.upgrade_suspended:
            # On parallel command execution this should be executed by a single process at a time.
            with FcntlBasedProcessLock(
                    params.stack_select_lock_file,
                    enabled=params.is_parallel_execution_enabled,
                    skip_fcntl_failures=True):
                stack_select.select_all(version)