Пример #1
0
    def configure(self, env, upgrade_type=None):
        import params

        # The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary
        if upgrade_type is None:
            upgrade_type = Script.get_upgrade_type(
                default("/commandParams/upgrade_type", ""))

        if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
            Logger.info(
                format(
                    "Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"
                ))
            if params.version and check_stack_feature(
                    StackFeature.ROLLING_UPGRADE, params.version):
                # In order for the "<stack-root>/current/oozie-<client/server>" point to the new version of
                # oozie, we need to create the symlinks both for server and client.
                # This is required as both need to be pointing to new installed oozie version.

                # Sets the symlink : eg: <stack-root>/current/oozie-client -> <stack-root>/a.b.c.d-<version>/oozie
                stack_select.select("oozie-client", params.version)
                # Sets the symlink : eg: <stack-root>/current/oozie-server -> <stack-root>/a.b.c.d-<version>/oozie
                stack_select.select("oozie-server", params.version)

            if params.version and check_stack_feature(
                    StackFeature.CONFIG_VERSIONING, params.version):
                conf_select.select(params.stack_name, "oozie", params.version)

        env.set_params(params)
        oozie(is_server=True, upgrade_type=upgrade_type)
Пример #2
0
  def configure(self, env, upgrade_type=None):
    import params

    # The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary
    if upgrade_type is None:
      restart_type = default("/commandParams/restart_type", "")
      if restart_type.lower() == "rolling_upgrade":
        upgrade_type = UPGRADE_TYPE_ROLLING
      elif restart_type.lower() == "nonrolling_upgrade":
        upgrade_type = UPGRADE_TYPE_NON_ROLLING

    if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
      Logger.info(format("Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"))
      if compare_versions(format_stack_version(params.version), '2.2.0.0') >= 0:
        # In order for the "/usr/hdp/current/oozie-<client/server>" point to the new version of
        # oozie, we need to create the symlinks both for server and client.
        # This is required as both need to be pointing to new installed oozie version.

        # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie
        stack_select.select("oozie-client", params.version)
        # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie
        stack_select.select("oozie-server", params.version)

      if compare_versions(format_stack_version(params.version), '2.3.0.0') >= 0:
        conf_select.select(params.stack_name, "oozie", params.version)

    env.set_params(params)
    oozie(is_server=True)
Пример #3
0
  def configure(self, env, upgrade_type=None):
    import params

    # The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary
    if upgrade_type is None:
      restart_type = default("/commandParams/restart_type", "")
      if restart_type.lower() == "rolling_upgrade":
        upgrade_type = UPGRADE_TYPE_ROLLING
      elif restart_type.lower() == "nonrolling_upgrade":
        upgrade_type = UPGRADE_TYPE_NON_ROLLING

    if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
      Logger.info(format("Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"))
      if compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
        # In order for the "/usr/hdp/current/oozie-<client/server>" point to the new version of
        # oozie, we need to create the symlinks both for server and client.
        # This is required as both need to be pointing to new installed oozie version.

        # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie
        hdp_select.select("oozie-client", params.version)
        # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie
        hdp_select.select("oozie-server", params.version)

      if compare_versions(format_hdp_stack_version(params.version), '2.3.0.0') >= 0:
        conf_select.select(params.stack_name, "oozie", params.version)

    env.set_params(params)
    oozie(is_server=True)
Пример #4
0
    def configure(self, env, upgrade_type=None):
        import params

        #TODO: needed?
        if upgrade_type == "nonrolling" and params.upgrade_direction == Direction.UPGRADE and \
                params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0:
            # In order for the "/usr/hdp/current/oozie-<client/server>" point to the new version of
            # oozie, we need to create the symlinks both for server and client.
            # This is required as both need to be pointing to new installed oozie version.

            # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie
            # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie
            stack_select.select_packages(params.version)

        env.set_params(params)
        oozie(is_server=True)
Пример #5
0
    def configure(self, env, upgrade_type=None):
        import params

        # The configure command doesn't actually receive the upgrade_type from Script.py, so get it from the config dictionary
        if upgrade_type is None:
            upgrade_type = Script.get_upgrade_type(
                default("/commandParams/upgrade_type", ""))

        if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
            Logger.info(
                format(
                    "Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"
                ))
            if params.version and check_stack_feature(
                    StackFeature.ROLLING_UPGRADE, params.version):
                stack_select.select_packages(params.version)

        env.set_params(params)
        oozie(is_server=True, upgrade_type=upgrade_type)
Пример #6
0
 def configure(self, env):
     import params
     env.set_params(params)
     oozie()
Пример #7
0
 def configure(self, env):
   oozie()
Пример #8
0
 def configure(self, env):
     import params
     env.set_params(params)
     oozie(action='config', is_server=True)
Пример #9
0
 def start(self, env):
   import params
   env.set_params(params)
   self.configure(env)
   oozie(action='start')
Пример #10
0
 def configure(self, env):
   import params
   env.set_params(params)
   oozie(action='config',is_server=True)
Пример #11
0
 def install(self, env):
   self.install_packages(env)
   oozie(action='install')     
Пример #12
0
 def status(self, env):
     import params
     env.set_params(params)
     oozie(action='status')
Пример #13
0
 def stop(self, env):
     import params
     env.set_params(params)
     oozie(action='stop')
Пример #14
0
 def start(self, env):
     import params
     env.set_params(params)
     self.configure(env)
     oozie(action='start')
Пример #15
0
  def configure(self, env):
    import params
    env.set_params(params)

    oozie(is_server=False)
Пример #16
0
 def configure(self, env):
   import params
   env.set_params(params)
   oozie()
Пример #17
0
 def stop(self, env):
   import params
   env.set_params(params)
   oozie(action='stop')
Пример #18
0
 def status(self, env):
   import params
   env.set_params(params)
   oozie(action='status')
Пример #19
0
 def configure(self, env, upgrade_type=None):
     import params
     env.set_params(params)
     oozie(is_server=True)
Пример #20
0
    def configure(self, env):
        import params
        env.set_params(params)

        oozie(is_server=False)
Пример #21
0
 def install(self, env):
     self.install_packages(env)
     oozie(action='install')