You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ji...@apache.org on 2026/10/10 09:25:12 UTC
(ambari-mpacks) 28/35: AMBARI-26663: Expose Trino native property documents as content
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ambari-mpacks.git
commit 45e4478fc8bf8c0bda3e9e9c027df61f8d4c5bb8
Author: jialiang <ji...@gmail.com>
AuthorDate: Mon Sep 28 17:46:37 2026 +0800
AMBARI-26663: Expose Trino native property documents as content
---
.../TRINO/configuration/trino-catalogs.xml | 2 +-
.../services/TRINO/configuration/trino-config.xml | 79 ++-----
.../1.0/services/TRINO/configuration/trino-jvm.xml | 2 +-
.../1.0/services/TRINO/configuration/trino-log.xml | 14 +-
.../services/TRINO/configuration/trino-node.xml | 14 +-
.../1.0/services/TRINO/package/scripts/runtime.py | 3 +
.../TRINO/1.0/services/TRINO/themes/theme.json | 234 +++++++--------------
7 files changed, 114 insertions(+), 234 deletions(-)
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-catalogs.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-catalogs.xml
index f63324b..e795acf 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-catalogs.xml
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-catalogs.xml
@@ -16,7 +16,7 @@ limitations under the License.
<configuration supports_adding_forbidden="true">
<property>
<name>content</name>
- <display-name>trino-catalogs file contents</display-name>
+ <display-name>Catalog files (JSON)</display-name>
<value>{
"tpch": {
"connector.name": "tpch"
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-config.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-config.xml
index c76208c..5308031 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-config.xml
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-config.xml
@@ -13,69 +13,22 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration>
- <property>
- <name>query.max-memory</name>
- <display-name>query.max-memory</display-name>
- <value>512MB</value>
- <description>Maximum distributed user memory per query. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>query.max-memory-per-node</name>
- <display-name>query.max-memory-per-node</display-name>
- <value>256MB</value>
- <description>Maximum user memory per query per node. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>query.max-history</name>
- <display-name>query.max-history</display-name>
- <value>100</value>
- <description>Completed queries retained in memory. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>int</type><minimum>0</minimum></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>query.max-length</name>
- <display-name>query.max-length</display-name>
- <value>1000000</value>
- <description>Maximum query text length in characters. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>int</type><minimum>0</minimum></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>query.max-stage-count</name>
- <display-name>query.max-stage-count</display-name>
- <value>150</value>
- <description>Maximum stages per query. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>int</type><minimum>0</minimum></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>query.max-run-time</name>
- <display-name>query.max-run-time</display-name>
- <value>100d</value>
- <description>Maximum elapsed query time, including queueing. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>task.concurrency</name>
- <display-name>task.concurrency</display-name>
- <value>4</value>
- <description>Local parallelism per task; must be a power of two. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>int</type><minimum>0</minimum></value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
- <name>node-scheduler.include-coordinator</name>
- <display-name>node-scheduler.include-coordinator</display-name>
- <value>true</value>
- <description>Allow the coordinator to execute tasks. Applies to the coordinator only. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>boolean</type></value-attributes>
+<configuration supports_adding_forbidden="true">
+ <property>
+ <name>content</name>
+ <display-name>config.properties</display-name>
+ <value># Edit the native configuration below. Save a version and restart to apply.
+query.max-memory=512MB
+query.max-memory-per-node=256MB
+query.max-history=100
+query.max-length=1000000
+query.max-stage-count=150
+query.max-run-time=100d
+task.concurrency=4
+node-scheduler.include-coordinator=true
+</value>
+ <description>Complete properties configuration. Existing scalar properties are converted using their current values when opening the current configuration version. Management identity and listener settings remain in Basic Settings.</description>
+ <value-attributes><type>content</type><empty-value-valid>true</empty-value-valid><property-file-name>config.properties</property-file-name><property-file-type>properties</property-file-type></value-attributes>
<on-ambari-upgrade add="true"/>
</property>
</configuration>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-jvm.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-jvm.xml
index ed86974..f3747ce 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-jvm.xml
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-jvm.xml
@@ -16,7 +16,7 @@ limitations under the License.
<configuration supports_adding_forbidden="true">
<property>
<name>content</name>
- <display-name>trino-jvm file contents</display-name>
+ <display-name>jvm.config</display-name>
<value>-server
-XX:+UseG1GC
-XX:+ExitOnOutOfMemoryError
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-log.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-log.xml
index c82c277..55baa6d 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-log.xml
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-log.xml
@@ -13,13 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration>
+<configuration supports_adding_forbidden="true">
<property>
- <name>io.trino</name>
- <display-name>io.trino</display-name>
- <value>INFO</value>
- <description>Log level for Trino. Add package names as custom properties. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
+ <name>content</name>
+ <display-name>log.properties</display-name>
+ <value># Edit the native configuration below. Save a version and restart to apply.
+io.trino=INFO
+</value>
+ <description>Complete properties configuration. Existing scalar properties are converted using their current values when opening the current configuration version. Management identity and listener settings remain in Basic Settings.</description>
+ <value-attributes><type>content</type><empty-value-valid>true</empty-value-valid><property-file-name>log.properties</property-file-name><property-file-type>properties</property-file-type></value-attributes>
<on-ambari-upgrade add="true"/>
</property>
</configuration>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-node.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-node.xml
index 1faf225..9d08596 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-node.xml
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-node.xml
@@ -13,13 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration>
+<configuration supports_adding_forbidden="true">
<property>
- <name>node.internal-address-source</name>
- <display-name>node.internal-address-source</display-name>
- <value>IP</value>
- <description>How Trino determines its internal address. Identity, data path and environment remain in basic settings. Restart the service to apply changes. Additional native properties can be added in Advanced.</description>
- <value-attributes><type>string</type></value-attributes>
+ <name>content</name>
+ <display-name>node.properties</display-name>
+ <value># Edit the native configuration below. Save a version and restart to apply.
+node.internal-address-source=IP
+</value>
+ <description>Complete properties configuration. Existing scalar properties are converted using their current values when opening the current configuration version. Management identity and listener settings remain in Basic Settings.</description>
+ <value-attributes><type>content</type><empty-value-valid>true</empty-value-valid><property-file-name>node.properties</property-file-name><property-file-type>properties</property-file-type></value-attributes>
<on-ambari-upgrade add="true"/>
</property>
</configuration>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py
index 138614f..e5e690e 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py
@@ -82,6 +82,9 @@ def configure(parameters):
reserved=("http-server.authentication.", "http-server.https.", "internal-communication."))
if role == "worker":
options.pop("node-scheduler.include-coordinator", None)
+ if hasattr(options, "source"):
+ from content_formats import without_properties
+ options.source = without_properties(options.source, {"node-scheduler.include-coordinator"})
jvm = ["-Xmx" + heap] + jvm_options(parameters, "trino-jvm",
"-server\n-XX:+UseG1GC\n-XX:+ExitOnOutOfMemoryError\n--add-modules=jdk.incubator.vector\n")
catalog_files = catalogs(parameters)
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/themes/theme.json b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/themes/theme.json
index 791e9e4..a70d4bf 100644
--- a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/themes/theme.json
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/themes/theme.json
@@ -1,57 +1,47 @@
{
"$comment": "Licensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements. See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License. You may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicab [...]
"name": "default",
- "description": "Basic settings, native tuning and complete configuration files. Custom properties remain available in Advanced.",
+ "description": "Edit complete native configuration files; Basic Settings retains managed topology and credentials.",
"configuration": {
"layouts": [
{
"name": "default",
"tabs": [
{
- "name": "basic",
- "display-name": "Basic Settings",
+ "name": "files",
+ "display-name": "Configuration Files",
"layout": {
"tab-columns": 1,
- "tab-rows": 1,
+ "tab-rows": 5,
"sections": [
{
- "name": "trino-env",
- "display-name": "trino-env",
+ "name": "trino-catalogs",
+ "display-name": "trino-catalogs",
"row-index": 0,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
- "name": "trino-env-fields",
+ "name": "trino-catalogs-fields",
"row-index": 0,
"column-index": 0,
"row-span": 1,
"column-span": 1
}
]
- }
- ]
- }
- },
- {
- "name": "tuning",
- "display-name": "Native Settings",
- "layout": {
- "tab-columns": 1,
- "tab-rows": 3,
- "sections": [
+ },
{
"name": "trino-config",
"display-name": "trino-config",
- "row-index": 0,
+ "row-index": 1,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
"name": "trino-config-fields",
@@ -62,15 +52,34 @@
}
]
},
+ {
+ "name": "trino-jvm",
+ "display-name": "trino-jvm",
+ "row-index": 2,
+ "column-index": 0,
+ "row-span": 1,
+ "column-span": 1,
+ "section-rows": 1,
+ "section-columns": 1,
+ "subsections": [
+ {
+ "name": "trino-jvm-fields",
+ "row-index": 0,
+ "column-index": 0,
+ "row-span": 1,
+ "column-span": 1
+ }
+ ]
+ },
{
"name": "trino-log",
"display-name": "trino-log",
- "row-index": 1,
+ "row-index": 3,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
"name": "trino-log-fields",
@@ -84,12 +93,12 @@
{
"name": "trino-node",
"display-name": "trino-node",
- "row-index": 2,
+ "row-index": 4,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
+ "section-columns": 1,
"subsections": [
{
"name": "trino-node-fields",
@@ -104,43 +113,24 @@
}
},
{
- "name": "files",
- "display-name": "Configuration Files",
+ "name": "basic",
+ "display-name": "Basic Settings",
"layout": {
"tab-columns": 1,
- "tab-rows": 2,
+ "tab-rows": 1,
"sections": [
{
- "name": "trino-catalogs",
- "display-name": "trino-catalogs",
+ "name": "trino-env",
+ "display-name": "trino-env",
"row-index": 0,
"column-index": 0,
"row-span": 1,
"column-span": 1,
- "section-columns": 1,
"section-rows": 1,
- "subsections": [
- {
- "name": "trino-catalogs-fields",
- "row-index": 0,
- "column-index": 0,
- "row-span": 1,
- "column-span": 1
- }
- ]
- },
- {
- "name": "trino-jvm",
- "display-name": "trino-jvm",
- "row-index": 1,
- "column-index": 0,
- "row-span": 1,
- "column-span": 1,
"section-columns": 1,
- "section-rows": 1,
"subsections": [
{
- "name": "trino-jvm-fields",
+ "name": "trino-env-fields",
"row-index": 0,
"column-index": 0,
"row-span": 1,
@@ -157,6 +147,26 @@
"placement": {
"configuration-layout": "default",
"configs": [
+ {
+ "config": "trino-catalogs/content",
+ "subsection-name": "trino-catalogs-fields"
+ },
+ {
+ "config": "trino-config/content",
+ "subsection-name": "trino-config-fields"
+ },
+ {
+ "config": "trino-jvm/content",
+ "subsection-name": "trino-jvm-fields"
+ },
+ {
+ "config": "trino-log/content",
+ "subsection-name": "trino-log-fields"
+ },
+ {
+ "config": "trino-node/content",
+ "subsection-name": "trino-node-fields"
+ },
{
"config": "trino-env/coordinator_host",
"subsection-name": "trino-env-fields"
@@ -184,171 +194,81 @@
{
"config": "trino-env/binary_url",
"subsection-name": "trino-env-fields"
- },
- {
- "config": "trino-config/query.max-memory",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/query.max-memory-per-node",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/query.max-history",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/query.max-length",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/query.max-stage-count",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/query.max-run-time",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/task.concurrency",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-config/node-scheduler.include-coordinator",
- "subsection-name": "trino-config-fields"
- },
- {
- "config": "trino-log/io.trino",
- "subsection-name": "trino-log-fields"
- },
- {
- "config": "trino-node/node.internal-address-source",
- "subsection-name": "trino-node-fields"
- },
- {
- "config": "trino-catalogs/content",
- "subsection-name": "trino-catalogs-fields"
- },
- {
- "config": "trino-jvm/content",
- "subsection-name": "trino-jvm-fields"
}
]
},
"widgets": [
{
- "config": "trino-env/coordinator_host",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "trino-env/worker_hosts",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "trino-env/http_port",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "trino-env/java_home",
- "widget": {
- "type": "text-field"
- }
- },
- {
- "config": "trino-env/heap_size",
+ "config": "trino-catalogs/content",
"widget": {
- "type": "text-field"
+ "type": "text-area"
}
},
{
- "config": "trino-env/node_environment",
+ "config": "trino-config/content",
"widget": {
- "type": "text-field"
+ "type": "text-area"
}
},
{
- "config": "trino-env/binary_url",
+ "config": "trino-jvm/content",
"widget": {
- "type": "text-field"
+ "type": "text-area"
}
},
{
- "config": "trino-config/query.max-memory",
+ "config": "trino-log/content",
"widget": {
- "type": "text-field"
+ "type": "text-area"
}
},
{
- "config": "trino-config/query.max-memory-per-node",
+ "config": "trino-node/content",
"widget": {
- "type": "text-field"
+ "type": "text-area"
}
},
{
- "config": "trino-config/query.max-history",
+ "config": "trino-env/coordinator_host",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-config/query.max-length",
+ "config": "trino-env/worker_hosts",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-config/query.max-stage-count",
+ "config": "trino-env/http_port",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-config/query.max-run-time",
+ "config": "trino-env/java_home",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-config/task.concurrency",
+ "config": "trino-env/heap_size",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-config/node-scheduler.include-coordinator",
- "widget": {
- "type": "toggle"
- }
- },
- {
- "config": "trino-log/io.trino",
+ "config": "trino-env/node_environment",
"widget": {
"type": "text-field"
}
},
{
- "config": "trino-node/node.internal-address-source",
+ "config": "trino-env/binary_url",
"widget": {
"type": "text-field"
}
- },
- {
- "config": "trino-catalogs/content",
- "widget": {
- "type": "text-area"
- }
- },
- {
- "config": "trino-jvm/content",
- "widget": {
- "type": "text-area"
- }
}
]
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org