Jast blog Jast blog
首页
  • 《Ambari自定义开发教程》笔记
  • 《CDH教程》笔记
  • 《ClickHouse教程》笔记
  • 《HDFS教程》笔记
  • 《DolphinScheduler教程》笔记
  • 《Hbase教程》笔记
  • 《Iceberg教程》笔记
  • 《Hive教程》笔记
  • 《Flume教程》笔记
  • 《Kafka教程》笔记
  • 《Impala教程》笔记
  • 《Hue教程》笔记
  • 《Spark教程》笔记
  • 《Flink教程》笔记
  • 《Phoenix教程》笔记
  • 《ElasticSearch教程》笔记
  • 《Kylin教程》笔记
  • 《Storm教程》笔记
  • 《Yarn教程》笔记
  • 《Presto教程》笔记
  • 《图数据库教程》笔记
  • 《Kerberos教程》笔记
  • 《Maxwell教程》笔记
  • 《MinIO教程》笔记
  • 《DataX教程》笔记
  • 《Superset教程》笔记
  • 《IOTDB教程》笔记
  • 《大数据相关》笔记
  • 《PaddleNLP教程》笔记
  • 《Nginx教程》笔记
  • 《Java技术文档》
  • 《Maven教程》笔记
  • 《IDEA使用教程》
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
关于
收藏
  • 分类
  • 标签
  • 归档

Jast-zsh

如果你知道你要去哪里,全世界都会给你让路。
首页
  • 《Ambari自定义开发教程》笔记
  • 《CDH教程》笔记
  • 《ClickHouse教程》笔记
  • 《HDFS教程》笔记
  • 《DolphinScheduler教程》笔记
  • 《Hbase教程》笔记
  • 《Iceberg教程》笔记
  • 《Hive教程》笔记
  • 《Flume教程》笔记
  • 《Kafka教程》笔记
  • 《Impala教程》笔记
  • 《Hue教程》笔记
  • 《Spark教程》笔记
  • 《Flink教程》笔记
  • 《Phoenix教程》笔记
  • 《ElasticSearch教程》笔记
  • 《Kylin教程》笔记
  • 《Storm教程》笔记
  • 《Yarn教程》笔记
  • 《Presto教程》笔记
  • 《图数据库教程》笔记
  • 《Kerberos教程》笔记
  • 《Maxwell教程》笔记
  • 《MinIO教程》笔记
  • 《DataX教程》笔记
  • 《Superset教程》笔记
  • 《IOTDB教程》笔记
  • 《大数据相关》笔记
  • 《PaddleNLP教程》笔记
  • 《Nginx教程》笔记
  • 《Java技术文档》
  • 《Maven教程》笔记
  • 《IDEA使用教程》
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
关于
收藏
  • 分类
  • 标签
  • 归档
  • Ambari自定义服务开发-项目初始化
  • Ambari自定义服务开发-组件安装启动停止卸载介绍
  • Ambari自定义服务开发-自定义服务配置文件在Ambari中的设置方法
  • Ambari自定义服务开发-自定义服务配置文件生成
  • Ambari自定义服务开发-代码如何获取配置参数
  • Ambari自定义服务开发-修改配置文件提示服务重启
  • Ambari自定义服务开发-自定义告警
  • Ambari自定义服务开发-查看历史版本配置
  • Ambari自定义服务开发-调试方法
  • Ambari自定义服务开发-执行Shell命令
  • Ambari自定义服务开发-快捷访问链接生成
  • Ambari自定义服务开发-服务组件启动顺序设置
  • Ambari自定义服务开发-服务组件安装依赖另外一个组件设置
  • Ambari自定义服务开发-监控指标Metrics介绍
  • Ambari自定义服务开发-使用客户端下载配置文件
  • Ambari自定义服务开发-美化(增强型)配置参数设置
    • 在metainfo.xml中添加主题
    • theme.json主题文件配置
      • layouts UI布局配置
      • 参数说明
      • layout下参数
      • sections下参数
      • subsections下参数
      • placement 参数与页面对应关系
      • 参数说明
      • configuration-layout
      • configs下参数
      • widgets 参数的展示样式
      • 参数说明
      • 控制时间间隔选择器 time-interval-spinner
      • 开关按钮 toggle
      • 下拉选择 combo
      • 滑块选择 slider
      • 普通文本框 text-field
      • 密码框 - passowrd
    • 高级使用
      • 两个属性联动显示
    • 增强型参数配置应用
    • 调试步骤
    • 参考资料
    • 相关演示代码
  • Ambari自定义服务开发-自定义开发安装包整合到Ambari-Server中
  • Ambari自定义服务开发-自定义脚本运行
  • Ambari自定义服务开发-常用函数
  • Ambari自定义服务开发问题处理-中文乱码
  • Ambari自定义服务开发问题处理-告警项UNKWN
  • Ambari自定义服务开发问题处理-Agent安装服务报错unknown
  • Ambari自定义服务开发问题处理-修改源码配置,服务重启后未生效
  • 《Ambari自定义开发教程》笔记
Jast-zsh
2024-04-08
目录

Ambari自定义服务开发-美化(增强型)配置参数设置

[toc]

增强型主题参数配置即更好看的进行参数配置,如下图所示:

image-20240304134201303

我们能通过较为好看的UI进行参数配置

# 在metainfo.xml中添加主题

在<themes>下设置配置参数使用主题文件

tip:

  1. <themes>在 services -> service 层级下
  2. 可以指定多个<theme>
      <!--设置主题配置-->
      <themes>
        <theme>
          <!--可选字段。用于告诉 Ambari Server 在哪里加载 xxx.json 文件。如果我们希望服务使用默认的 themes 目录,则可以跳过它。-->
          <!--<themes-dir></themes-dir>-->
          <!--json 文件,指定的主题文件名称-->
          <fileName>theme.json</fileName>
          <!--一般为 true-->
          <default>true</default>
        </theme>
        <theme>
          <fileName>directories.json</fileName>
          <default>true</default>
        </theme>
      </themes>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# theme.json主题文件配置

包含 layouts、placement、widgets 三个属性,整体数据格式:

{
  "name": "default",
  "description": "Default theme for Doris service",
  "configuration": {
    "layouts": [
      ... 可视化配置整体UI布局,包括:section、subsection
    ],
    "placement": {
      ... 具体配置文件+参数对应的subsection
    },
    "widgets": [
      ... 具体每个配置文件+参数的展示样式
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  • layouts:可视化配置整体UI布局,包括:section、subsection
  • placement:具体配置文件+参数对应的subsection
  • widgets:具体每个配置文件+参数的展示样式

# layouts UI布局配置

参数样例:

{
        "name": "default",
        "tabs": [
          {
            "name": "settings",
            "display-name": "Settings",
            "layout": {
              "tab-columns": "3",
              "tab-rows": "3",
              "sections": [
                {
                  "name": "timeout-doris",
                  "display-name": "Timeout",
                  "row-index": "0",
                  "column-index": "0",
                  "row-span": "1",
                  "column-span": "2",
                  "section-columns": "2",
                  "section-rows": "1",
                  "subsections": [
                    {
                      "name": "timeout-doris-col1",
                      "row-index": "0",
                      "column-index": "0",
                      "row-span": "1",
                      "column-span": "1"
                    },
                    {
                      "name": "timeout-doris-col2",
                      "row-index": "0",
                      "column-index": "1",
                      "row-span": "1",
                      "column-span": "1"
                    }
                  ]
                },
                {
                  "name": "meta-doris",
                  "display-name": "Meta",
                  "row-index": "0",
                  "column-index": "2",
                  "row-span": "1",
                  "column-span": "1",
                  "section-columns": "1",
                  "section-rows": "1",
                  "subsections": [
                    {
                      "name": "meta-doris-col1",
                      "row-index": "0",
                      "column-index": "0",
                      "row-span": "1",
                      "column-span": "1"
                    }
                  ]
                },
                {
                  "name": "doris-checkpoint",
                  "display-name": "CheckPoint",
                  "row-index": "1",
                  "column-index": "0",
                  "row-span": "1",
                  "column-span": "3",
                  "section-columns": "3",
                  "section-rows": "1",
                  "subsections": [
                    {
                      "name": "doris-checkpoint-col1",
                      "row-index": "0",
                      "column-index": "0",
                      "row-span": "1",
                      "column-span": "1"
                    },
                    {
                      "name": "doris-checkpoint-col2",
                      "row-index": "0",
                      "column-index": "1",
                      "row-span": "1",
                      "column-span": "1"
                    },
                    {
                      "name": "doris-checkpoint-col3",
                      "row-index": "0",
                      "column-index": "2",
                      "row-span": "1",
                      "column-span": "1"
                    }
                  ]
                }
              ]
            }
          }
        ]
      }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

# 参数说明

# layout下参数
参数 说明
tab-columns 整个仪表盘占用的宽度(列数量)
tab-rows 整个仪表盘占用的高度(行数量)
sections 按照配置类型分类,每个类型占用一部分,比如:按照Server/Client这种分类可以将配置分为多个section
# sections下参数
参数 说明 对应页面显示位置
name 控件的名称,唯一。 无
display-name 控件在页面上显示的名称。
row-index 和 column-index 定义坐标位置。分别表示行的顺序和列的顺序,从0开始。
row-span 和 column-span 定义占用大小。分别表示该部分占整个布局的高度和宽度。
section-rows 和 section-columns 定义子控件subsection的网格布局。占几行、几列。比如值为1和2,就代表占1行2列。
subsections 用来描述子控件的基本信息。
# subsections下参数
参数 说明
name 控件的名称,唯一。
row-index 和 column-index 定义坐标位置。分别表示行的顺序和列的顺序,从0开始。
row-span 和 column-span 定义占用大小。分别表示该部分占整个布局的高度和宽度。

# placement 参数与页面对应关系

这个配置主要是将我们配置参数与显示位置进行一个关联。

{
    "configuration-layout": "default",
    "configs": [
        {
            "config": "fe/catalog_try_lock_timeout_ms",
            "subsection-name": "timeout-doris-col1"
        },
        {
            "config": "fe/bdbje_replica_ack_timeout_second",
            "subsection-name": "timeout-doris-col1"
        },
        {
            "config": "fe/bdbje_lock_timeout_second",
            "subsection-name": "timeout-doris-col1"
        },
        {
            "config": "fe/bdbje_heartbeat_timeout_second",
            "subsection-name": "timeout-doris-col2"
        },
        {
            "config": "fe/thrift_client_timeout_ms",
            "subsection-name": "timeout-doris-col2"
        },
        {
            "config": "fe/broker_timeout_ms",
            "subsection-name": "timeout-doris-col2"
        },
        {
            "config": "fe/metadata_failure_recovery",
            "subsection-name": "meta-doris-col1"
        },
        {
            "config": "fe/ignore_meta_check",
            "subsection-name": "meta-doris-col1"
        },
        {
            "config": "fe/meta_delay_toleration_second",
            "subsection-name": "meta-doris-col1"
        },
        {
            "config": "fe/metadata_checkpoint_memory_threshold",
            "subsection-name": "doris-checkpoint-col1"
        },
        {
            "config": "fe/force_do_metadata_checkpoint",
            "subsection-name": "doris-checkpoint-col2"
        },
        {
            "config": "fe/doris_test_password",
            "subsection-name": "doris-checkpoint-col2"
        },
        {
            "config": "fe/doris_test_text_field",
            "subsection-name": "doris-checkpoint-col2"
        },
        {
            "config": "fe/doris_test_slider",
            "subsection-name": "doris-checkpoint-col2"
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

# 参数说明

# configuration-layout

对应 configuration.layouts.name 字段,一般默认为default

# configs下参数
参数 说明
config 需要配置的参数,如:fe/doris_test_slider,取fe.xml配置文件的doris_test_slider参数。
subsection-name 取layout下subsection.name值,config配置的参数对应layout中的显示的具体位置

# widgets 参数的展示样式

{
        "config": "fe/catalog_try_lock_timeout_ms",
        "widget": {
          "type":"xxx"
          ... 可配置多种类型
        }
}
1
2
3
4
5
6
7

# 参数说明

参数 说明
config 需要配置的参数,如:fe/doris_test_slider,取fe.xml配置文件的doris_test_slider参数。
widget 展示的样式
- type 具体展示的样式配置,常用的参数有:
控制时间间隔选择器 - time-interval-spinner
开关按钮 - toggle
下拉选择 - combo
滑块选择 - slider
普通文本框 - text-field
密码框 - passowrd
、directories(目录文本框)等

下面我们具体介绍详细配置

# 控制时间间隔选择器 time-interval-spinner

在页面显示样例

image-20240305115453525

配置样例

{
    "config": "fe/catalog_try_lock_timeout_ms",
    "widget": {
        "type": "time-interval-spinner",
        "units": [
            {
                "unit-name": "days,hours,minutes,seconds" # 对应上图第一个配置
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11

配置说明

参数 说明
unit-name 取值:days,hours,minutes,seconds

tip:

注意一下,unit-name这里最少选择两个连续值,如果只选择一个,比如单独选择seconds可能会存在一些问题,可能是bug

对应fe.xml中的参数也需要配置

<property>
        <name>catalog_try_lock_timeout_ms</name>
        <value>10000</value>
        <description>元数据锁的 tryLock 超时配置。 通常它不需要改变,除非你需要测试一些东西。</description>
        <display-name>元数据锁超时配置</display-name>
        <value-attributes>
            <type>int</type>
            <minimum>10000</minimum>
            <maximum>180000</maximum>
            <unit>milliseconds</unit>
            <increment-step>10000</increment-step>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
</property>
1
2
3
4
5
6
7
8
9
10
11
12
13
14

说明:

参数 说明
minimum 建议的最小值,小于最小值也可以设置,但是会提示警告
maximum 建议的最大值,小于最小值也可以设置,但是会提示警告
unit 最终配置获取到的时间单位
increment-step 每次点击新增或减少的步长,单位为<unit>设置的
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
# 开关按钮 toggle

在页面显示样例

image-20240305134131502

配置样例

{
    "config": "fe/metadata_failure_recovery",
    "widget": {
        "type": "toggle"
    }
}
1
2
3
4
5
6

对应fe.xml中的参数也需要配置

 <property>
        <name>metadata_failure_recovery</name>
        <value>false</value>
        <description>如果为 true,FE 将重置 bdbje 复制组(即删除所有可选节点信息)并应该作为 Master 启动。
            如果所有可选节点都无法启动,我们可以将元数据复制到另一个节点并将此配置设置为 true 以尝试重新启动 FE。
        </description>
        <display-name>metadata_failure_recovery</display-name>
        <value-attributes>
            <type>value-list</type>
            <entries>
                <entry>
                    <value>true</value>
                    <label>Enabled</label>
                </entry>
                <entry>
                    <value>false</value>
                    <label>Disabled</label>
                </entry>
            </entries>
            <selection-cardinality>1</selection-cardinality>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
    </property>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

说明:

参数 说明
entries.entry 显示Enabled时为true,显示Disabled为false。
entries.entry.label可以自定义配置,该值为在页面显示的内容
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
<selection-cardinality>1</selection-cardinality> 用户必须选择一个且仅一个选项。这通常用于那些必须要有一个明确选择的设置,比如启用或禁用某个功能,或者从一组互斥的选项中选择一个。
# 下拉选择 combo

在页面显示样例

image-20240305140405239

配置样例

{
    "config": "fe/metadata_checkpoint_memory_threshold",
    "widget": {
        "type": "combo"
    }
}
1
2
3
4
5
6

对应fe.xml中的参数也需要配置

<property>
        <name>metadata_checkpoint_memory_threshold</name>
        <value>60%</value>
        <description>如果 jvm 内存使用百分比(堆或旧内存池)超过此阈值,则检查点线程将无法工作以避免 OOM</description>
        <display-name>元数据超时时间</display-name>
        <value-attributes>
            <type>value-list</type>
            <entries>
                <entry>
                    <value>50%</value>
                    <label>50%</label>
                </entry>
                <entry>
                    <value>60%</value>
                    <label>60%</label>
                </entry>
                <entry>
                    <value>70%</value>
                    <label>70%</label>
                </entry>
            </entries>
            <selection-cardinality>1</selection-cardinality>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
    </property>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

说明:

参数 说明
entries.entry entries.entry.label 自定义显示的配置
entries.entry.value 对应的value值
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
<selection-cardinality>1</selection-cardinality> 用户必须选择一个且仅一个选项。这通常用于那些必须要有一个明确选择的设置,比如启用或禁用某个功能,或者从一组互斥的选项中选择一个。
# 滑块选择 slider

在页面显示样例

image-20240305140857077

配置样例

{
    "config": "fe/doris_test_slider",
    "widget": {
        "type": "slider",
        "units": [
            {
                "unit-name": "percent"
            }
        ]
    }
}
1
2
3
4
5
6
7
8
9
10
11

配置说明

参数 说明
unit-name 取值范围:percent、GB、MB、minutes,seconds、days,hours等

对应fe.xml中的参数也需要配置

<property>
        <name>doris_test_slider</name>
        <value>5</value>
        <description>测试文本类型</description>
        <display-name>测试文本类型</display-name>
        <value-attributes>
            <type>int</type>
            <minimum>0</minimum>
            <maximum>10</maximum>
            <increment-step>2</increment-step>
        </value-attributes>
    </property>
1
2
3
4
5
6
7
8
9
10
11
12

说明:

参数 说明
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
value-attributes.type 文本类型
value-attributes.minimum 显示的最小值
value-attributes.maximum 显示的最大值
value-attributes.increment-step 步长,比如上面描述的说明,取值范围为0-10,步长为2,则只能选择0,2,4,6,8,10。(当然,可以编辑手动填写1,3,5)
# 普通文本框 text-field

在页面显示样例

image-20240305141602839

配置样例

{
    "config": "fe/doris_test_text_field",
    "widget": {
        "type": "text-field"
    }
}
1
2
3
4
5
6

对应fe.xml中的参数也需要配置

<property>
        <name>doris_test_text_field</name>
        <value>default</value>
        <description>测试文本类型</description>
        <display-name>测试文本类型</display-name>
</property>
1
2
3
4
5
6

说明:

参数 说明
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
# 密码框 - passowrd

在页面显示样例

image-20240305141900569

配置样例

{
    "config": "fe/doris_test_password",
    "widget": {
        "type": "password"
    }
}
1
2
3
4
5
6

对应fe.xml中的参数也需要配置

<property>
        <name>doris_test_password</name>
        <value></value>
        <description>测试密码类型</description>
        <display-name>测试密码类型</display-name>
        <value-attributes>
            <type>password</type>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
    </property>
1
2
3
4
5
6
7
8
9
10

说明:

参数 说明
display-name 在UI中显示的名称
description 描述,在报错时会显示这个提示
value 默认值
name 配置参数名称
value-attributes.type 类型:password

# 高级使用

# 两个属性联动显示

应用场景:当A设置了True,B选项才需要设置。 实现效果如下图

iShot_2024-03-05_14.41.40

配置 layout

layout.sections 下的内容

{
    "name": "doris-ssl-1",
    "display-name": "SSL",
    "row-index": "2",
    "column-index": "0",
    "row-span": "2",
    "column-span": "3",
    "section-columns": "3",
    "section-rows": "2",
    "subsections": [
        {
            "name": "doris-ssl-col1",
            "row-index": "0",
            "column-index": "0",
            "row-span": "1",
            "column-span": "1"
        },
        {
            "name": "doris-ssl-col2",
            "row-index": "0",
            "column-index": "1",
            "row-span": "1",
            "column-span": "1",
            "depends-on": [
                {
                    "configs": [
                        "fe/doris_ssl"
                    ],
                    "if": "${fe/doris_ssl}",
                    "then": {
                        "property_value_attributes": {
                            "visible": true
                        }
                    },
                    "else": {
                        "property_value_attributes": {
                            "visible": false
                        }
                    }
                }
            ]
        },
        {
            "name": "doris-ssl-col3",
            "row-index": "1",
            "column-index": "0",
            "row-span": "1",
            "column-span": "1",
            "depends-on": [
                {
                    "configs": [
                        "fe/doris_ssl"
                    ],
                    "if": "${fe/doris_ssl}",
                    "then": {
                        "property_value_attributes": {
                            "visible": true
                        }
                    },
                    "else": {
                        "property_value_attributes": {
                            "visible": false
                        }
                    }
                }
            ]
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

配置 placement

在 placement.configs下

{
  "config": "fe/doris_ssl",
  "subsection-name": "doris-ssl-col1"
},
{
  "config": "fe/doris_ssl_username",
  "subsection-name": "doris-ssl-col2"
},
{
  "config": "fe/doris_ssl_password",
  "subsection-name": "doris-ssl-col3"
}
1
2
3
4
5
6
7
8
9
10
11
12

配置 widgets

{
  "config": "fe/doris_ssl",
  "widget": {
    "type": "toggle"
  }
},
{
  "config": "fe/doris_ssl_username",
  "widget": {
    "type": "text-field"
  }
},
{
  "config": "fe/doris_ssl_password",
  "widget": {
    "type": "password"
  }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

配置 fe.xml

配置文件在configuration/fe.xml

    <property>
        <name>doris_ssl</name>
        <value>false</value>
        <description>是否启用SSL</description>
        <display-name>是否启用SSL</display-name>
        <value-attributes>
            <type>value-list</type>
            <entries>
                <entry>
                    <value>true</value>
                    <label>True</label>
                </entry>
                <entry>
                    <value>false</value>
                    <label>False</label>
                </entry>
            </entries>
            <selection-cardinality>1</selection-cardinality>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
    </property>
    <property>
        <name>doris_ssl_username</name>
        <value>admin</value>
        <description>用户名</description>
        <display-name>用户名</display-name>
    </property>
    <property>
        <name>doris_ssl_password</name>
        <value></value>
        <description>密码</description>
        <display-name>密码</display-name>
        <value-attributes>
            <type>password</type>
        </value-attributes>
        <on-ambari-upgrade add="false"/>
    </property>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

主要实现逻辑都是通过layout中的depends-on参数控制,其他的和正常配置一致,拿上面的例子进行说明

{
    "name": "doris-ssl-col2",
    "row-index": "0",
    "column-index": "1",
    "row-span": "1",
    "column-span": "1",
    "depends-on": [
        {
            "configs": [
                "fe/doris_ssl"
            ],
            "if": "${fe/doris_ssl}", # 判断fe.xml配置文件中的doris_ssl字段
            "then": { # 如果为true则显示
                "property_value_attributes": {
                    "visible": true
                }
            },
            "else": { # 如果为false则不显示
                "property_value_attributes": {
                    "visible": false
                }
            }
        }
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# 增强型参数配置应用

参数应用和普通参数应用就一样了,通过在params.py中引用就可以了

# 调试步骤

  1. 卸载安装的服务

  2. 重启 ambari-server 服务

  3. 再安装该服务,这时的 configuration/xxx.xml & metainfo.xml 文件才会生效。

tip:

如未生效可参考文章:《Ambari自定义服务开发-修改源码配置服务重启后未生效》

# 参考资料

https://cwiki.apache.org/confluence/display/AMBARI/Enhanced+Configs

# 相关演示代码

https://download.csdn.net/download/zhangshenghang/88912488 (opens new window)

上次更新: 2024/05/11, 16:24:52
Ambari自定义服务开发-使用客户端下载配置文件
Ambari自定义服务开发-自定义开发安装包整合到Ambari-Server中

← Ambari自定义服务开发-使用客户端下载配置文件 Ambari自定义服务开发-自定义开发安装包整合到Ambari-Server中→

最近更新
01
Linux可视化监控
02-26
02
Maven私服搭建
02-26
03
当ElasticSearch时间字段设置多个格式到底是用的哪个?
01-19
更多文章>
Theme by Vdoing | Copyright © 2016-2025 Jast-zsh | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式