ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/params.py [67:110]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
                                                      + ':' + dolphin_env_map['dolphin.database.port'] \
                                                      + '/dolphinscheduler'

# application-alert.properties
dolphin_alert_map = {}
wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
wechat_team_send_msg = '{\"toparty\":\"$toParty\",\"agentid\":\"$agentId\",\"msgtype\":\"text\",\"text\":{\"content\":\"$msg\"},\"safe\":\"0\"}'
wechat_user_send_msg = '{\"touser\":\"$toUser\",\"agentid\":\"$agentId\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"$msg\"}}'

dolphin_alert_config_map = config['configurations']['dolphin-alert']

if dolphin_alert_config_map['enterprise.wechat.enable']:
    dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
    dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
    dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
    dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg

dolphin_alert_map.update(dolphin_alert_config_map)

# application-api.properties
dolphin_app_api_map = {}
dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])

# common.properties
dolphin_common_map = {}

if 'yarn-site' in config['configurations'] and \
        'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
    yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
    yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
    dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address

rmHosts = default("/clusterHostInfo/rm_host", [])
if len(rmHosts) > 1:
    dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
else:
    dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''

dolphin_common_map_tmp = config['configurations']['dolphin-common']
data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
dolphin_common_map.update(config['configurations']['dolphin-common'])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/params.py [65:108]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
                                                      + ':' + dolphin_env_map['dolphin.database.port'] \
                                                      + '/dolphinscheduler'

# application-alert.properties
dolphin_alert_map = {}
wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
wechat_team_send_msg = '{\"toparty\":\"$toParty\",\"agentid\":\"$agentId\",\"msgtype\":\"text\",\"text\":{\"content\":\"$msg\"},\"safe\":\"0\"}'
wechat_user_send_msg = '{\"touser\":\"$toUser\",\"agentid\":\"$agentId\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"$msg\"}}'

dolphin_alert_config_map = config['configurations']['dolphin-alert']

if dolphin_alert_config_map['enterprise.wechat.enable']:
    dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
    dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
    dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
    dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg

dolphin_alert_map.update(dolphin_alert_config_map)

# application-api.properties
dolphin_app_api_map = {}
dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])

# common.properties
dolphin_common_map = {}

if 'yarn-site' in config['configurations'] and \
        'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
    yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
    yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
    dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address

rmHosts = default("/clusterHostInfo/rm_host", [])
if len(rmHosts) > 1:
    dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
else:
    dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''

dolphin_common_map_tmp = config['configurations']['dolphin-common']
data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
dolphin_common_map.update(config['configurations']['dolphin-common'])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



