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:24:52 UTC

(ambari-mpacks) 08/35: AMBARI-26663: Manage Trino nodes and verify native query results

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 9e99293e86cd6af7851b4c05e477e2fbd063f8f6
Author: jialiang <ji...@gmail.com>
AuthorDate: Mon Sep 28 12:11:22 2026 +0800

    AMBARI-26663: Manage Trino nodes and verify native query results
---
 mpacks/trino/LICENSE                               | 933 +++++++++++++++++++++
 mpacks/trino/NOTICE                                |   2 +
 mpacks/trino/README.md                             |  39 +
 mpacks/trino/extensions/TRINO/1.0/metainfo.xml     |  16 +
 .../1.0/services/TRINO/configuration/trino-env.xml |  24 +
 .../TRINO/1.0/services/TRINO/metainfo.xml          |  27 +
 .../services/TRINO/package/scripts/coordinator.py  |  27 +
 .../1.0/services/TRINO/package/scripts/runtime.py  | 216 +++++
 .../TRINO/package/scripts/service_check.py         |  27 +
 .../1.0/services/TRINO/package/scripts/worker.py   |  27 +
 .../1.0/services/TRINO/quicklinks/quicklinks.json  |  12 +
 .../1.0/services/TRINO/role_command_order.json     |   8 +
 mpacks/trino/mpack.json                            |  10 +
 mpacks/trino/shared-files.json                     |  12 +
 mpacks/trino/source.json                           |  13 +
 tests/test_trino.py                                | 112 +++
 16 files changed, 1505 insertions(+)

diff --git a/mpacks/trino/LICENSE b/mpacks/trino/LICENSE
new file mode 100644
index 0000000..c43caf4
--- /dev/null
+++ b/mpacks/trino/LICENSE
@@ -0,0 +1,933 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   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.
+
+
+APACHE AMBARI SUBCOMPONENTS:
+
+The Apache Ambari project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for the these
+subcomponents is subject to the terms and conditions of the following
+licenses. 
+
+This product bundles VictoriaMetrics (https://victoriametrics.com/),
+which is available under the Apache License, Version 2.0.
+
+and some parts:
+
+Copyright (C) 2011 Krzysztof Wilczynski
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    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.
+
+
+For Kokki, resource management library derived from:
+
+Copyright (c) 2009 Samuel Stauffer <sa...@descolada.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice, 
+       this list of conditions and the following disclaimer.
+    
+    2. Redistributions in binary form must reproduce the above copyright 
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of Samuel Stauffer nor the names of its contributors may be used
+       to endorse or promote products derived from this software without
+       specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+For Jinja2, used by resource management library as a templating engine:
+
+Copyright 2007 Pallets
+
+For MarkupSafe, used by Jinja2:
+
+Copyright 2010 Pallets
+
+For pycparser, used by cffi:
+
+pycparser -- A C parser in Python
+Copyright (c) 2008-2022, Eli Bendersky
+All rights reserved.
+
+The above three components are available under the BSD 3-Clause License:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of the copyright holder nor the names of its
+       contributors may be used to endorse or promote products derived from
+       this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For jQuery 1.9.1 (ambari-web/vendor/scripts.jquery-1.9.1.js):
+
+jQuery JavaScript Library v1.9.1
+http://jquery.com/
+
+Copyright 2011, John Resig
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2011, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Timepicker Addon (ambari-web/vendor/scripts/jquery-ui-timepicker-addon.js):
+
+jQuery timepicker addon
+By: Trent Richardson [http://trentrichardson.com]
+Version 1.0.5
+
+Copyright 2012 Trent Richardson
+You may use this project under MIT or GPL licenses.
+http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
+http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery Periodic Plugin (ambari-web/vendor/scripts/jquery.periodic.js):
+
+jQuery periodic plugin
+
+Copyright 2010, Tom Anderson
+Dual licensed under the MIT or GPL Version 2 licenses.
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI 1.8.23 (ambari-web/vendor/scripts/jquery.ui.core.js,
+contrib/views/slider/src/main/resources/ui/vendor/scripts/common/jquery.ui.core.js):
+
+jQuery UI 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Autocomplete 1.8.23 (ambari-web/vendor/scripts/jquery.ui.autocomplete.js):
+
+jQuery UI Autocomplete 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Autocomplete
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Position 1.8.23 (ambari-web/vendor/scripts/jquery.ui.position.js):
+
+jQuery UI Position 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Position
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Datepicker 1.8.23 (ambari-web/vendor/scripts/jquery.ui.datepicker.js):
+
+jQuery UI Datepicker 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Datepicker
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Mouse 1.8.23 (ambari-web/vendor/scripts/jquery.ui.mouse.js,
+contrib/views/slider/src/main/resources/ui/vendor/scripts/common/jquery.ui.mouse.js):
+
+jQuery UI Mouse 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Mouse
+
+Depends:
+jquery.ui.widget.js
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Slider 1.8.23 (ambari-web/vendor/scripts/jquery.ui.slider.js):
+
+jQuery UI Slider 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Slider
+
+Depends:
+jquery.ui.core.js
+jquery.ui.mouse.js
+jquery.ui.widget.js
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For jQuery UI Widget 1.8.23 (ambari/ambari-web/vendor/scripts/jquery.ui.widget.js,
+contrib/views/slider/src/main/resources/ui/vendor/scripts/common/jquery.ui.widget.js):
+
+jQuery UI Widget 1.8.23
+
+Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+http://docs.jquery.com/UI/Widget
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For Backbone.js 1.1.0 (ambari/ambari-web/vendor/scripts/backbone.js,
+
+Backbone.js 1.1.0
+(c) 2010-2011 Jeremy Ashkenas, DocumentCloud Inc.
+(c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+Backbone may be freely distributed under the MIT license.
+For all details and documentation:
+http://backbonejs.org
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For Underscore.js 1.5.2 (ambari/ambari-web/vendor/scripts/underscore.js,
+
+Underscore.js 1.5.2
+http://underscorejs.org
+(c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+Underscore may be freely distributed under the MIT license.
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For clipboard.js 1.5.10 (ambari/ambari-web/vendor/scripts/clipboard.min.js):
+
+clipboard.js v1.5.10
+https://clipboardjs.com/
+Copyright 2016 Zeno Rocha <hi...@zenorocha.com>
+Clipboard may be freely distributed under the MIT license.
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For MockJax 1.6.0 (contrib/views/slider/src/main/resources/ui/app/assets/javascripts/jquery.mockjax.js,
+/contrib/views/files/src/main/resources/ui/app/assets/javascripts/jquery.mockjax.js):
+
+MockJax - jQuery Plugin to Mock Ajax requests
+
+Version:  1.6.0
+Released:
+Home:   https://github.com/jakerella/jquery-mockjax
+Author:   Jonathan Sharp (http://jdsharp.com)
+License:  MIT,GPL
+
+Copyright (c) 2014 appendTo, Jordan Kasper
+NOTE: This repository was taken over by Jordan Kasper (@jakerella) October, 2014
+
+Dual licensed under the MIT or GPL licenses.
+http://opensource.org/licenses/MIT OR http://www.gnu.org/licenses/gpl-2.0.html
+
+MIT license selected:
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For ember-qunit (contrib/views/slider/src/main/resources/ui/app/assets/javascripts/ember-qunit.js)
+
+Home:   https://github.com/rwjblue/ember-qunit
+Author:   Ryan Florence and contributors
+License:  MIT
+
+Copyright 2014 Ryan Florence and contributors. MIT License.
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Ryan Florence
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For swagger-ui (ambari-web/api-docs/*):
+Home:   https://github.com/jensoleg/swagger-ui
+License:  Apache License, Version 2.0
+
+Copyright 2015 Reverb Technologies, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+
+
+The following bundled Python runtime dependencies are available under the
+Apache License, Version 2.0 reproduced at the start of this file:
+
+* cryptography 50.0.1 (Apache-2.0 option selected)
+* distro 1.9.0
+* stomp.py 8.2.0
+* websocket-client 1.9.0
+* OpenSSL bundled in cryptography binary wheels
+
+For APScheduler:
+
+Copyright (c) Alex Grönholm
+
+For docopt:
+
+Copyright (c) 2012 Vladimir Keleshev, <vl...@keleshev.com>
+
+For tzlocal:
+
+Copyright 2011-2017 Lennart Regebro
+
+For javaproperties:
+
+Copyright (c) 2016-2024 John Thorvald Wodder II
+
+For PyYAML:
+
+Copyright (c) 2017-2021 Ingy döt Net
+Copyright (c) 2006-2016 Kirill Simonov
+
+The above five components are available under the MIT License:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+For cffi:
+
+Except when otherwise stated in individual source files, cffi software and
+documentation is available under the MIT No Attribution license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+For typing_extensions:
+
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022,
+2023 Python Software Foundation. All Rights Reserved.
+
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"),
+and the Individual or Organization ("Licensee") accessing and otherwise using
+this software ("Python") in source or binary form and its associated
+documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF hereby
+grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+analyze, test, perform and/or display publicly, prepare derivative works,
+distribute, and otherwise use Python alone or in any derivative version,
+provided, however, that PSF's License Agreement and PSF's notice of copyright
+are retained in Python alone or in any derivative version prepared by
+Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on or
+incorporates Python or any part thereof, and wants to make the derivative work
+available to others as provided herein, then Licensee hereby agrees to include
+in any such work a brief summary of the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES
+NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT
+NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF
+MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
+PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY
+INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
+MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF,
+EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material breach
+of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee. This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote products
+or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee agrees to be
+bound by the terms and conditions of this License Agreement.
+
+This product uses software based on SIL Open Font License (OFL)
+* Font-Awesome (SIL OFL 1.1) [http://fortawesome.github.io/Font-Awesome/]
+* Image clippy.svg from Octicon project (SIL OFL 1.1)  [https://octicons.github.com/]
diff --git a/mpacks/trino/NOTICE b/mpacks/trino/NOTICE
new file mode 100644
index 0000000..e4a7ed2
--- /dev/null
+++ b/mpacks/trino/NOTICE
@@ -0,0 +1,2 @@
+Apache Ambari Trino Management Pack
+Copyright The Apache Software Foundation
diff --git a/mpacks/trino/README.md b/mpacks/trino/README.md
new file mode 100644
index 0000000..05041cc
--- /dev/null
+++ b/mpacks/trino/README.md
@@ -0,0 +1,39 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+-->
+
+# Trino Basic Package
+
+This pack adds Trino 483 to BIGTOP/3.3.0. Assign exactly one coordinator and
+zero or more workers. The coordinator is allowed to run queries when there are
+no dedicated workers. Every assigned host must have a Java 25 runtime under
+the configured `java_home`; Trino 483 rejects Java 24 and earlier. The
+installer downloads the official archive over HTTPS or from an operator's
+prepopulated `/var/cache/ambari-mpacks/trino-483.tar.gz`. Both paths require
+the exact SHA-512 in `source.json`.
+
+INSTALL verifies the distribution and preserves its root-owned files under
+`/opt/ambari-mpacks/trino/483`. CONFIGURE writes only owned paths under
+`/etc/trino/ambari` and `/var/lib/trino`; the node UUID survives restarts and
+definition updates. START and STOP use a foreground process supervised by
+systemd. A service check observes each node's exact version, role and ACTIVE
+state, then executes a real TPCH query through Trino's structured statement
+protocol and verifies its query ID, FINISHED state and result.
+
+The pack supplies only the built-in TPCH test catalog. Add production catalogs,
+authentication, TLS, resource groups, and HA through a separately reviewed
+configuration change; do not expose the initial HTTP port outside a trusted
+network. Connector integrations with Hive, Iceberg, or other services are not
+implicitly enabled by installation. A failed or unverified runtime action
+remains unresolved rather than becoming a healthy service state.
diff --git a/mpacks/trino/extensions/TRINO/1.0/metainfo.xml b/mpacks/trino/extensions/TRINO/1.0/metainfo.xml
new file mode 100644
index 0000000..cd2a27f
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/metainfo.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+-->
+<metainfo><versions><active>true</active></versions><prerequisites><min-stack-versions><stack><name>BIGTOP</name><version>3.3.0</version></stack></min-stack-versions></prerequisites><auto-link>false</auto-link></metainfo>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-env.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-env.xml
new file mode 100644
index 0000000..377a635
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/configuration/trino-env.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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>coordinator_host</name><value></value><description>Derived from the assigned Trino Coordinator.</description><value-attributes><empty-value-valid>true</empty-value-valid></value-attributes><on-ambari-upgrade add="true"/></property>
+  <property><name>worker_hosts</name><value></value><description>Derived from assigned Trino Workers; empty means coordinator-only.</description><value-attributes><empty-value-valid>true</empty-value-valid></value-attributes><on-ambari-upgrade add="true"/></property>
+  <property><name>http_port</name><value>8086</value><description>Trino HTTP port on all nodes. Keep access on a trusted network until authentication and TLS are configured outside this basic pack.</description><on-ambari-upgrade add="true"/></property>
+  <property><name>java_home</name><value>/usr/lib/jvm/temurin-25</value><description>Preinstalled Java 25 runtime. Older or newer Java releases are rejected.</description><on-ambari-upgrade add="true"/></property>
+  <property><name>heap_size</name><value>2G</value><description>Trino JVM heap; minimum 2G.</description><on-ambari-upgrade add="true"/></property>
+  <property><name>node_environment</name><value>production</value><description>Stable environment shared by all Trino nodes.</description><on-ambari-upgrade add="true"/></property>
+  <property><name>binary_url</name><value></value><description>Optional HTTPS mirror of the pinned Trino 483 archive. The SHA-512 must match.</description><value-attributes><empty-value-valid>true</empty-value-valid></value-attributes><on-ambari-upgrade add="true"/></property>
+</configuration>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/metainfo.xml b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/metainfo.xml
new file mode 100644
index 0000000..9cc5dc6
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/metainfo.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+-->
+<metainfo><schemaVersion>2.0</schemaVersion><services><service>
+  <name>TRINO</name><displayName>Trino</displayName><version>483</version>
+  <comment>One coordinator and optional workers. Java 25 must be installed at the configured path. The coordinator can execute queries without dedicated workers.</comment>
+  <components>
+    <component><name>TRINO_COORDINATOR</name><displayName>Trino Coordinator</displayName><category>MASTER</category><cardinality>1</cardinality><versionAdvertised>false</versionAdvertised><commandScript><script>scripts/coordinator.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript><customCommands><customCommand><name>VERSION_CHECK</name><commandScript><script>scripts/coordinator.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript [...]
+    <component><name>TRINO_WORKER</name><displayName>Trino Worker</displayName><category>SLAVE</category><cardinality>0+</cardinality><versionAdvertised>false</versionAdvertised><commandScript><script>scripts/worker.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript><customCommands><customCommand><name>VERSION_CHECK</name><commandScript><script>scripts/worker.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript></customCommand></c [...]
+  </components>
+  <osSpecifics><osSpecific><osFamily>redhat8</osFamily><packages><package><name>python3-dbus</name></package><package><name>python3-gobject-base</name></package></packages></osSpecific></osSpecifics>
+  <commandScript><script>scripts/service_check.py</script><scriptType>PYTHON</scriptType><timeout>900</timeout></commandScript>
+  <configuration-dependencies><config-type>trino-env</config-type></configuration-dependencies>
+  <quickLinksConfigurations><quickLinksConfiguration><fileName>quicklinks.json</fileName><default>true</default></quickLinksConfiguration></quickLinksConfigurations>
+</service></services></metainfo>
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/coordinator.py b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/coordinator.py
new file mode 100644
index 0000000..f1dfe48
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/coordinator.py
@@ -0,0 +1,27 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+"""
+
+from managed_service_v2 import ManagedServiceV2
+
+
+class Coordinator(ManagedServiceV2):
+    service = "trino"
+    component = "coordinator"
+    topology_fields = {"coordinator_host": ("trino_coordinator_hosts", True, False),
+                       "worker_hosts": ("trino_worker_hosts", False, True)}
+
+
+if __name__ == "__main__":
+    Coordinator().execute()
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
new file mode 100644
index 0000000..cf5abbc
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py
@@ -0,0 +1,216 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+"""
+
+import json
+import re
+import time
+import urllib.error
+import urllib.parse
+import urllib.request
+import uuid
+from pathlib import Path
+
+from managed_runtime import directory, host_value, json_http, main, no_links, owned_file, path_value, port_value, reload_units, unit
+from observations import unit_observation
+from verified_archive import install_archive, verify_install
+
+VERSION = "483"
+SHA512 = "5b6920dcb807608e13bb0f2d6d062233ffafe627d035ac37c37da28dbfd0933f10a37871505247ef65e1f973f503b341f9038d0a52773e0ceb0dcf6d037fb6ee"
+URL = "https://github.com/trinodb/trino/releases/download/483/trino-server-483.tar.gz"
+REQUIRED = ["bin/launcher", "bin/launcher.properties", "bin/linux-arm64/launcher",
+            "lib/io.trino_trino-main-483.jar"]
+HOME = Path("/opt/ambari-mpacks/trino/483")
+CONF = Path("/etc/trino/ambari")
+DATA = Path("/var/lib/trino")
+LOGS = Path("/var/log/trino")
+
+
+def settings(parameters):
+    role = parameters["component"]
+    if role not in {"coordinator", "worker", "check"}:
+        raise ValueError("Unknown Trino component")
+    coordinator = host_value(parameters["coordinator_host"])
+    workers = [host_value(item) for item in parameters.get("worker_hosts", "").split(",") if item]
+    if len(workers) != len(set(workers)) or coordinator in workers:
+        raise ValueError("Trino coordinator and worker assignments overlap")
+    hostname = host_value(parameters["hostname"])
+    if role == "coordinator" and hostname != coordinator or role == "worker" and hostname not in workers:
+        raise ValueError("Trino component placement differs from the assigned hosts")
+    port = port_value(parameters["http_port"])
+    java = path_value(parameters["java_home"], ("/usr/lib/jvm/",))
+    no_links(java)
+    release = java / "release"
+    if not release.is_file() or not (java / "bin/java").is_file():
+        raise ValueError("A Java 25 installation is required")
+    versions = re.findall(r'^JAVA_VERSION="(25\.[0-9.]+)"$', release.read_text(), re.MULTILINE)
+    if len(versions) != 1:
+        raise ValueError("Trino 483 requires Java 25")
+    heap = parameters["heap_size"]
+    if not isinstance(heap, str) or not re.fullmatch(r"[2-9][0-9]*G", heap):
+        raise ValueError("Trino heap must be at least 2G")
+    environment = parameters["node_environment"]
+    if not isinstance(environment, str) or not re.fullmatch(r"[a-z0-9][a-z0-9_]*", environment):
+        raise ValueError("Invalid Trino node environment")
+    return role, coordinator, workers, hostname, port, java, heap, environment
+
+
+def installed():
+    return verify_install(HOME, "trino", VERSION, SHA512, REQUIRED)
+
+
+def configure(parameters):
+    role, coordinator, workers, hostname, port, java, heap, environment = settings(parameters)
+    if role == "check":
+        raise ValueError("A service check cannot configure a node")
+    installed()
+    for path in (CONF, CONF / "catalog", DATA, LOGS):
+        directory(path, "trino")
+    identity = DATA / "node-id"
+    no_links(identity)
+    if not identity.exists():
+        owned_file(identity, str(uuid.uuid4()) + "\n", "trino", 0o600)
+    node_id = identity.read_text().strip()
+    if str(uuid.UUID(node_id)) != node_id:
+        raise ValueError("Retained Trino node identity is invalid")
+    owned_file(CONF / "node.properties", "node.environment=" + environment + "\nnode.id=" + node_id
+               + "\nnode.data-dir=" + str(DATA) + "\n", "trino")
+    owned_file(CONF / "jvm.config", "-server\n-Xmx" + heap + "\n-XX:+UseG1GC\n"
+               "-XX:+ExitOnOutOfMemoryError\n--add-modules=jdk.incubator.vector\n", "trino")
+    options = ["coordinator=" + ("true" if role == "coordinator" else "false"),
+               "http-server.http.port=" + str(port),
+               "discovery.uri=http://" + coordinator + ":" + str(port)]
+    if role == "coordinator":
+        options.append("node-scheduler.include-coordinator=true")
+    owned_file(CONF / "config.properties", "\n".join(options) + "\n", "trino")
+    owned_file(CONF / "catalog/tpch.properties", "connector.name=tpch\n", "trino")
+    unit("ambari-trino.service", "trino", HOME / "bin/launcher", {"JAVA_HOME": str(java)}, DATA,
+         "-etc-dir " + str(CONF) + " -data-dir " + str(DATA) + " run")
+    reload_units()
+    return {"role": role, "node_id": node_id, "coordinator": coordinator, "http_port": port}
+
+
+def validate_info(value, version, environment, coordinator, require_ready=True):
+    if (not isinstance(value, dict) or value.get("state") not in {"ACTIVE", "INACTIVE"}
+            or type(value.get("starting")) is not bool or value.get("coordinator") is not coordinator
+            or value.get("environment") != environment
+            or not isinstance(value.get("nodeVersion"), dict)
+            or value["nodeVersion"].get("version") != version
+            or not isinstance(value.get("nodeId"), str) or not value["nodeId"]):
+        raise ValueError("Trino node identity or readiness differs")
+    if require_ready and (value["state"] != "ACTIVE" or value["starting"]):
+        raise ValueError("Trino node is not ready")
+    return {key: value[key] for key in ("nodeId", "state", "environment", "coordinator")}
+
+
+def ready_info(url, environment, coordinator):
+    deadline = time.monotonic() + 120
+    while True:
+        try:
+            value = json_http(url)
+            observed = validate_info(value, VERSION, environment, coordinator, require_ready=False)
+            if value["state"] == "ACTIVE" and value["starting"] is False:
+                return observed
+        except urllib.error.HTTPError:
+            raise
+        except urllib.error.URLError:
+            pass
+        if time.monotonic() >= deadline:
+            raise RuntimeError("Trino node readiness remains unresolved")
+        time.sleep(2)
+
+
+def statement(url, query):
+    origin = urllib.parse.urlsplit(url)
+    headers = {"X-Trino-User": "ambari_mpack", "X-Trino-Source": "ambari-mpack",
+               "Accept": "application/json", "Content-Type": "text/plain"}
+    class NoRedirect(urllib.request.HTTPRedirectHandler):
+        def redirect_request(self, *args):
+            return None
+    opener = urllib.request.build_opener(NoRedirect())
+    current = url + "/v1/statement"
+    data = query.encode("utf-8")
+    query_id = None
+    rows = []
+    deadline = time.monotonic() + 90
+    for _ in range(100):
+        request = urllib.request.Request(current, data=data, headers=headers)
+        with opener.open(request, timeout=15) as response:
+            payload = response.read(1024 * 1024 + 1)
+            if response.status != 200 or len(payload) > 1024 * 1024:
+                raise ValueError("Invalid bounded Trino query response")
+        value = json.loads(payload)
+        if not isinstance(value, dict) or not isinstance(value.get("id"), str) or not value["id"]:
+            raise ValueError("Missing Trino query identity")
+        if query_id is None:
+            query_id = value["id"]
+        if value["id"] != query_id or value.get("error"):
+            raise ValueError("Failed or foreign Trino query result")
+        if "data" in value:
+            if not isinstance(value["data"], list):
+                raise ValueError("Invalid Trino query rows")
+            rows.extend(value["data"])
+        next_uri = value.get("nextUri")
+        if next_uri is None:
+            if not isinstance(value.get("stats"), dict) or value["stats"].get("state") != "FINISHED":
+                raise ValueError("Trino query is not finished")
+            return query_id, rows
+        next_url = urllib.parse.urlsplit(next_uri)
+        if next_url.scheme != origin.scheme or next_url.netloc != origin.netloc or not next_url.path.startswith("/v1/statement/"):
+            raise ValueError("Trino query continuation left its origin")
+        if time.monotonic() >= deadline:
+            raise RuntimeError("Trino query remains unresolved")
+        current, data = next_uri, None
+    raise RuntimeError("Trino query exceeded its page limit")
+
+
+def check(parameters):
+    role, coordinator, workers, hostname, port, java, heap, environment = settings(parameters)
+    hosts = [(coordinator, True)] + [(worker, False) for worker in workers]
+    nodes = []
+    for host, is_coordinator in hosts:
+        nodes.append(ready_info("http://" + host + ":" + str(port) + "/v1/info", environment, is_coordinator))
+    ids = [node["nodeId"] for node in nodes]
+    if len(ids) != len(set(ids)):
+        raise ValueError("Trino nodes share an identity")
+    query_id, rows = statement("http://" + coordinator + ":" + str(port),
+                               "SELECT count(*) AS nation_count FROM tpch.tiny.nation")
+    if len(rows) != 1 or not isinstance(rows[0], list) or len(rows[0]) != 1 or type(rows[0][0]) is not int or rows[0][0] != 25:
+        raise ValueError("Trino TPCH query returned an unexpected result")
+    return {"coordinator": coordinator, "workers": workers, "nodes": nodes,
+            "query_id": query_id, "nation_count": rows[0][0]}
+
+
+def execute(request):
+    parameters, action = request["parameters"], request["action"]
+    role, coordinator, workers, hostname, port, java, heap, environment = settings(parameters)
+    if action == "install":
+        return {"software": install_archive("trino", VERSION, parameters.get("binary_url") or URL,
+                SHA512, "trino-server-483", REQUIRED, maximum_archive=1024 ** 3)}
+    if action == "version":
+        return {"software": installed()}
+    if action == "configure":
+        return {"configuration": configure(parameters)}
+    if action == "check":
+        return {"query": check(parameters)}
+    if role not in {"coordinator", "worker"} or action not in {"start", "stop", "status"}:
+        raise ValueError("Unsupported Trino action")
+    observed = unit_observation("ambari-trino.service", None if action == "status" else action)
+    if action == "status" and observed["active_state"] != "active":
+        raise RuntimeError("Trino component is not active")
+    return {"systemd": observed}
+
+
+if __name__ == "__main__":
+    main(execute)
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/service_check.py b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/service_check.py
new file mode 100644
index 0000000..4238afa
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/service_check.py
@@ -0,0 +1,27 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+"""
+
+from managed_service_v2 import ManagedServiceV2
+
+
+class Check(ManagedServiceV2):
+    service = "trino"
+    component = "check"
+    topology_fields = {"coordinator_host": ("trino_coordinator_hosts", True, False),
+                       "worker_hosts": ("trino_worker_hosts", False, True)}
+
+
+if __name__ == "__main__":
+    Check().execute()
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/worker.py b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/worker.py
new file mode 100644
index 0000000..87d016c
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/worker.py
@@ -0,0 +1,27 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+"""
+
+from managed_service_v2 import ManagedServiceV2
+
+
+class Worker(ManagedServiceV2):
+    service = "trino"
+    component = "worker"
+    topology_fields = {"coordinator_host": ("trino_coordinator_hosts", True, False),
+                       "worker_hosts": ("trino_worker_hosts", False, True)}
+
+
+if __name__ == "__main__":
+    Worker().execute()
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/quicklinks/quicklinks.json b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/quicklinks/quicklinks.json
new file mode 100644
index 0000000..93ebb43
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/quicklinks/quicklinks.json
@@ -0,0 +1,12 @@
+{
+  "$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": "Trino coordinator",
+  "configuration": {
+    "protocol": {"type": "http"},
+    "links": [{"name": "trino", "label": "Trino UI", "requires_user_name": "false",
+      "component_name": "TRINO_COORDINATOR", "url": "%@://%@:%@/ui/",
+      "port": {"http_property": "http_port", "http_default_port": "8086",
+               "regex": "^(\\d+)$", "site": "trino-env"}}]
+  }
+}
diff --git a/mpacks/trino/extensions/TRINO/1.0/services/TRINO/role_command_order.json b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/role_command_order.json
new file mode 100644
index 0000000..8c8ffef
--- /dev/null
+++ b/mpacks/trino/extensions/TRINO/1.0/services/TRINO/role_command_order.json
@@ -0,0 +1,8 @@
+{
+  "_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 [...]
+  "general_deps": {
+    "TRINO_WORKER-START": ["TRINO_COORDINATOR-START"],
+    "TRINO_COORDINATOR-STOP": ["TRINO_WORKER-STOP"],
+    "TRINO_SERVICE_CHECK-SERVICE_CHECK": ["TRINO_COORDINATOR-START", "TRINO_WORKER-START"]
+  }
+}
diff --git a/mpacks/trino/mpack.json b/mpacks/trino/mpack.json
new file mode 100644
index 0000000..9220fac
--- /dev/null
+++ b/mpacks/trino/mpack.json
@@ -0,0 +1,10 @@
+{
+  "$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 [...]
+  "schema_version": 1,
+  "type": "full-release",
+  "name": "trino",
+  "version": "1.0.0.2",
+  "description": "Trino 483 coordinator and optional workers on BIGTOP",
+  "artifacts": [{"name": "trino-definitions", "type": "extension-definitions", "source_dir": "extensions"}],
+  "dependencies": []
+}
diff --git a/mpacks/trino/shared-files.json b/mpacks/trino/shared-files.json
new file mode 100644
index 0000000..de57ee7
--- /dev/null
+++ b/mpacks/trino/shared-files.json
@@ -0,0 +1,12 @@
+{
+  "$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 [...]
+  "schema_version": 1,
+  "files": [
+    {"source": "shared/observations.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/observations.py", "digest": "8fb22532d4012faf25c2f38a56bbd713738016716fa6c0606fb56b46ce194a99"},
+    {"source": "shared/managed_runtime.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/managed_runtime.py", "digest": "542098b830a0580c4f699c80be9ce1133017edfd0620d629f1691c988fdfaab0"},
+    {"source": "shared/managed_service.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/managed_service.py", "digest": "8b3338e0b6a895cfb3205e2053aa05e9f7e7e2a56f559417e8a9873ad132ff41"},
+    {"source": "shared/managed_service_v2.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/managed_service_v2.py", "digest": "b561538a70028de8c83d1ced93e4dc6f006ed99c1b4cd28a603aa610a971c5eb"},
+    {"source": "shared/managed_topology.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/managed_topology.py", "digest": "cd9ca507841e3b4c6f6e623f866e79e2fce83e818b1edecb0f8cc6c4a8185f43"},
+    {"source": "shared/verified_archive.py", "target": "extensions/TRINO/1.0/services/TRINO/package/scripts/verified_archive.py", "digest": "f02828b595e5b4614be24f88d102ee0f02f7563a65fe8c79e7fa13c9ff2ea2ab"}
+  ]
+}
diff --git a/mpacks/trino/source.json b/mpacks/trino/source.json
new file mode 100644
index 0000000..779e054
--- /dev/null
+++ b/mpacks/trino/source.json
@@ -0,0 +1,13 @@
+{
+  "$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 [...]
+  "schema_version": 1,
+  "software_version": "483",
+  "source_tag": "483",
+  "source_commit": "50b0b50b75abd47f830b7805ee1b51716eb4065e",
+  "binary": {
+    "url": "https://github.com/trinodb/trino/releases/download/483/trino-server-483.tar.gz",
+    "sha512": "5b6920dcb807608e13bb0f2d6d062233ffafe627d035ac37c37da28dbfd0933f10a37871505247ef65e1f973f503b341f9038d0a52773e0ceb0dcf6d037fb6ee"
+  },
+  "topology": "SINGLE_COORDINATOR_OPTIONAL_WORKERS",
+  "validation_status": "IMPLEMENTED_PENDING_ACCEPTANCE"
+}
diff --git a/tests/test_trino.py b/tests/test_trino.py
new file mode 100644
index 0000000..fa5f765
--- /dev/null
+++ b/tests/test_trino.py
@@ -0,0 +1,112 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+"""
+
+import importlib.util
+import json
+import sys
+import unittest
+from pathlib import Path
+from unittest.mock import patch
+
+ROOT = Path(__file__).resolve().parents[1]
+sys.path.insert(0, str(ROOT / "shared"))
+PATH = ROOT / "mpacks/trino/extensions/TRINO/1.0/services/TRINO/package/scripts/runtime.py"
+spec = importlib.util.spec_from_file_location("trino_runtime_test", str(PATH))
+trino = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(trino)
+
+
+class Response:
+    status = 200
+
+    def __init__(self, value):
+        self.value = value
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, *_):
+        return False
+
+    def read(self, maximum):
+        return json.dumps(self.value).encode()
+
+
+class Opener:
+    def __init__(self, values):
+        self.values = iter(values)
+
+    def open(self, request, timeout):
+        return Response(next(self.values))
+
+
+class TrinoTests(unittest.TestCase):
+    def test_readiness_waits_for_startup_but_rejects_foreign_versions(self):
+        ready = {"nodeId": "node-1", "state": "ACTIVE", "starting": False,
+                 "coordinator": True, "environment": "production", "nodeVersion": {"version": "483"}}
+        with patch.object(trino, "json_http", side_effect=[dict(ready, starting=True), ready]), patch.object(trino.time, "sleep"):
+            self.assertEqual(trino.ready_info("http://trino.test/v1/info", "production", True)["nodeId"], "node-1")
+        with patch.object(trino, "json_http", return_value=dict(ready, nodeVersion={"version": "other"})), patch.object(
+                trino.time, "sleep") as sleep, self.assertRaises(ValueError):
+            trino.ready_info("http://trino.test/v1/info", "production", True)
+        sleep.assert_not_called()
+
+    def test_node_info_requires_exact_version_role_and_active_state(self):
+        value = {"nodeId": "node-1", "state": "ACTIVE", "starting": False,
+                 "coordinator": True, "environment": "production", "nodeVersion": {"version": "483"}}
+        self.assertEqual(trino.validate_info(value, "483", "production", True)["nodeId"], "node-1")
+        for key, bad in (("nodeId", ""), ("state", "INACTIVE"), ("starting", True),
+                         ("coordinator", False), ("environment", "other"),
+                         ("nodeVersion", {"version": "482"})):
+            with self.subTest(key=key), self.assertRaises(ValueError):
+                trino.validate_info(dict(value, **{key: bad}), "483", "production", True)
+
+    def test_statement_follows_only_exact_query_lineage_and_origin(self):
+        first = {"id": "query-1", "nextUri": "http://trino.test:8086/v1/statement/query-1/1",
+                 "stats": {"state": "RUNNING"}}
+        final = {"id": "query-1", "data": [[25]], "stats": {"state": "FINISHED"}}
+        with patch.object(trino.urllib.request, "build_opener", return_value=Opener([first, final])):
+            self.assertEqual(trino.statement("http://trino.test:8086", "SELECT 1"), ("query-1", [[25]]))
+        for terminal in (dict(final, id="query-2"), dict(final, stats={"state": "FAILED"}),
+                         dict(final, error={"message": "failed"})):
+            with self.subTest(terminal=terminal), patch.object(
+                    trino.urllib.request, "build_opener", return_value=Opener([first, terminal])), self.assertRaises(ValueError):
+                trino.statement("http://trino.test:8086", "SELECT 1")
+        foreign = dict(first, nextUri="http://foreign.test:8086/v1/statement/query-1/1")
+        with patch.object(trino.urllib.request, "build_opener", return_value=Opener([foreign])), self.assertRaises(ValueError):
+            trino.statement("http://trino.test:8086", "SELECT 1")
+
+    def test_check_rejects_incorrect_query_result_and_duplicate_nodes(self):
+        settings = ("check", "coordinator.test", ["worker.test"], "worker.test", 8086,
+                    Path("/usr/lib/jvm/temurin-25"), "2G", "production")
+        coordinator = {"nodeId": "coordinator-id", "state": "ACTIVE", "starting": False,
+                       "coordinator": True, "environment": "production", "nodeVersion": {"version": "483"}}
+        worker = dict(coordinator, nodeId="worker-id", coordinator=False)
+        with patch.object(trino, "settings", return_value=settings), patch.object(
+                trino, "json_http", side_effect=[coordinator, worker]), patch.object(
+                trino, "statement", return_value=("query-1", [[25]])):
+            self.assertEqual(trino.check({})["query_id"], "query-1")
+        for rows in ([[True]], [[24]], [], [[25], [25]]):
+            with self.subTest(rows=rows), patch.object(trino, "settings", return_value=settings), patch.object(
+                    trino, "json_http", side_effect=[coordinator, worker]), patch.object(
+                    trino, "statement", return_value=("query-1", rows)), self.assertRaises(ValueError):
+                trino.check({})
+        with patch.object(trino, "settings", return_value=settings), patch.object(
+                trino, "json_http", side_effect=[coordinator, dict(worker, nodeId="coordinator-id")]), self.assertRaises(ValueError):
+            trino.check({})
+
+
+if __name__ == "__main__":
+    unittest.main()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org