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)
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)
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)
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)
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)
def configure(self, env): import params env.set_params(params) oozie()
def configure(self, env): oozie()
def configure(self, env): import params env.set_params(params) oozie(action='config', is_server=True)
def start(self, env): import params env.set_params(params) self.configure(env) oozie(action='start')
def configure(self, env): import params env.set_params(params) oozie(action='config',is_server=True)
def install(self, env): self.install_packages(env) oozie(action='install')
def status(self, env): import params env.set_params(params) oozie(action='status')
def stop(self, env): import params env.set_params(params) oozie(action='stop')
def configure(self, env): import params env.set_params(params) oozie(is_server=False)
def configure(self, env, upgrade_type=None): import params env.set_params(params) oozie(is_server=True)