Beispiel #1
0
  def pre_rolling_restart(self, env):
    """
    Performs the tasks surrounding the Oozie startup when a rolling upgrade
    is in progress. This includes backing up the configuration, updating
    the database, preparing the WAR, and installing the sharelib in HDFS.
    :param env:
    :return:
    """
    import params
    env.set_params(params)

    # this function should not execute if the version can't be determined or
    # is not at least HDP 2.2.0.0
    if not params.version or compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') < 0:
      return

    Logger.info("Executing Oozie Server Rolling Upgrade pre-restart")

    oozie_server_upgrade.backup_configuration()

    conf_select.select(params.stack_name, "oozie", params.version)
    hdp_select.select("oozie-server", params.version)

    oozie_server_upgrade.restore_configuration()
    oozie_server_upgrade.prepare_libext_directory()
    oozie_server_upgrade.upgrade_oozie()
Beispiel #2
0
    def pre_upgrade_restart(self, env, upgrade_type=None):
        """
    Performs the tasks surrounding the Oozie startup when a rolling upgrade
    is in progress. This includes backing up the configuration, updating
    the database, preparing the WAR, and installing the sharelib in HDFS.
    :param env:
    :return:
    """
        import params
        env.set_params(params)

        # this function should not execute if the version can't be determined or
        # is not at least IOP 4.0.0.0
        if not params.version or compare_versions(
                format_stack_version(params.version), '4.0.0.0') < 0:
            return

        Logger.info("Executing Oozie Server Rolling Upgrade pre-restart")

        oozie_server_upgrade.backup_configuration()

        stack_select.select_packages(params.version)
        #Execute(format("iop-select set oozie-server {version}"))

        oozie_server_upgrade.restore_configuration()
        #oozie_server_upgrade.prepare_libext_directory()
        oozie_server_upgrade.upgrade_oozie()
Beispiel #3
0
  def pre_rolling_restart(self, env):
    """
    Performs the tasks surrounding the Oozie startup when a rolling upgrade
    is in progress. This includes backing up the configuration, updating
    the database, preparing the WAR, and installing the sharelib in HDFS.
    :param env:
    :return:
    """
    import params
    env.set_params(params)

    # this function should not execute if the version can't be determined or
    # is not at least HDP 2.2.0.0
    if not params.version or compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') < 0:
      return

    Logger.info("Executing Oozie Server Rolling Upgrade pre-restart")

    oozie_server_upgrade.backup_configuration()

    Execute(format("hdp-select set oozie-server {version}"))

    oozie_server_upgrade.restore_configuration()
    oozie_server_upgrade.prepare_libext_directory()
    oozie_server_upgrade.upgrade_oozie()