本文整理汇总了Python中resource_management.libraries.script.script.Script.is_hdp_stack_greater方法的典型用法代码示例。如果您正苦于以下问题:Python Script.is_hdp_stack_greater方法的具体用法?Python Script.is_hdp_stack_greater怎么用?Python Script.is_hdp_stack_greater使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类resource_management.libraries.script.script.Script
的用法示例。
在下文中一共展示了Script.is_hdp_stack_greater方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from resource_management.libraries.script.script import Script [as 别名]
# 或者: from resource_management.libraries.script.script.Script import is_hdp_stack_greater [as 别名]
stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
hdp_stack_version = format_hdp_stack_version(stack_version_unformatted)
# This is the version whose state is CURRENT. During an RU, this is the source version.
# DO NOT format it since we need the build number too.
upgrade_from_version = default("/hostLevelParams/current_version", None)
# server configurations
# Default value used in HDP 2.3.0.0 and earlier.
knox_data_dir = '/var/lib/knox/data'
# Important, it has to be strictly greater than 2.3.0.0!!!
if stack_name and stack_name.upper() == "HDP":
Logger.info(format("HDP version to use is {version_formatted}"))
if Script.is_hdp_stack_greater(version_formatted, "2.3.0.0"):
# This is the current version. In the case of a Rolling Upgrade, it will be the newer version.
# In the case of a Downgrade, it will be the version downgrading to.
# This is always going to be a symlink to /var/lib/knox/data_${version}
knox_data_dir = format('/usr/hdp/{version}/knox/data')
Logger.info(format("Detected HDP with stack version {version}, will use knox_data_dir = {knox_data_dir}"))
knox_master_secret_path = format('{knox_data_dir}/security/master')
knox_cert_store_path = format('{knox_data_dir}/security/keystores/gateway.jks')
knox_user = default("/configurations/knox-env/knox_user", "knox")
# server configurations
knox_data_dir = '/var/lib/knox/data'
knox_logs_dir = '/var/log/knox'