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:54 UTC
(ambari-mpacks) 10/35: AMBARI-26663: Manage Doris FE and BE with verified SQL checks
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 444787da3aeada94d0a50a205b152e6403fa3353
Author: jialiang <ji...@gmail.com>
AuthorDate: Mon Sep 28 12:11:49 2026 +0800
AMBARI-26663: Manage Doris FE and BE with verified SQL checks
---
mpacks/doris/LICENSE | 933 +++++++++++++++++++++
mpacks/doris/NOTICE | 2 +
mpacks/doris/README.md | 43 +
mpacks/doris/extensions/DORIS/1.0/metainfo.xml | 16 +
.../1.0/services/DORIS/configuration/doris-env.xml | 32 +
.../DORIS/1.0/services/DORIS/metainfo.xml | 27 +
.../DORIS/1.0/services/DORIS/package/scripts/be.py | 27 +
.../DORIS/1.0/services/DORIS/package/scripts/fe.py | 27 +
.../1.0/services/DORIS/package/scripts/runtime.py | 340 ++++++++
.../DORIS/package/scripts/service_check.py | 27 +
.../1.0/services/DORIS/quicklinks/quicklinks.json | 9 +
.../1.0/services/DORIS/role_command_order.json | 8 +
mpacks/doris/mpack.json | 10 +
mpacks/doris/shared-files.json | 12 +
mpacks/doris/source.json | 14 +
tests/test_doris.py | 168 ++++
16 files changed, 1695 insertions(+)
diff --git a/mpacks/doris/LICENSE b/mpacks/doris/LICENSE
new file mode 100644
index 0000000..c43caf4
--- /dev/null
+++ b/mpacks/doris/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/doris/NOTICE b/mpacks/doris/NOTICE
new file mode 100644
index 0000000..1409f64
--- /dev/null
+++ b/mpacks/doris/NOTICE
@@ -0,0 +1,2 @@
+Apache Ambari Apache Doris Management Pack
+Copyright The Apache Software Foundation
diff --git a/mpacks/doris/README.md b/mpacks/doris/README.md
new file mode 100644
index 0000000..ecf0735
--- /dev/null
+++ b/mpacks/doris/README.md
@@ -0,0 +1,43 @@
+<!--
+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.
+-->
+
+# Apache Doris Basic Package
+
+This pack adds Doris 4.1.4 to BIGTOP/3.3.0 with exactly one FE and one BE,
+which may share a host. It uses the official ARM64 binary from the Doris
+download site; its 4.35 GB archive and SHA-512 are pinned in `source.json`.
+The extracted distribution occupies about 6.8 GB before metadata and data.
+Each assigned host needs enough disk space, Java 17 and the configured ports.
+An operator-preloaded `/var/cache/ambari-mpacks/doris-4.1.4.tar.gz` is accepted
+only after the same checksum verification.
+
+The components share one root-owned software installation on each host.
+Separate writable FE and BE runtime trees contain only their own configuration,
+logs and PID paths; immutable libraries stay linked to the verified archive.
+FE metadata and BE storage are under `/var/lib/doris` and are never removed by
+STOP or definition retirement. An empty FE metadata directory is marked before
+first start; a foreign nonempty directory is rejected. After FE starts, the
+pack replaces the upstream empty root password with the explicitly supplied
+password and verifies authentication. BE is registered by exact host and
+heartbeat port through the native MySQL-compatible protocol.
+
+SERVICE_CHECK verifies the one FE and BE inventory, creates an operation-owned
+database/table, inserts and reads a row, then removes only that owned database.
+Foreign results and cleanup failure remain unresolved. The first release does
+not support FE or BE replication, cloud mode, authentication over TLS, automatic
+capacity expansion, schema upgrades, or recovery from lost FE metadata. Keep
+the MySQL-compatible port on a trusted network; a fresh FE has an upstream
+empty root password until the supervised bootstrap completes. Live deployment
+acceptance remains pending.
diff --git a/mpacks/doris/extensions/DORIS/1.0/metainfo.xml b/mpacks/doris/extensions/DORIS/1.0/metainfo.xml
new file mode 100644
index 0000000..cd2a27f
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/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/doris/extensions/DORIS/1.0/services/DORIS/configuration/doris-env.xml b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/configuration/doris-env.xml
new file mode 100644
index 0000000..2aa7b77
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/configuration/doris-env.xml
@@ -0,0 +1,32 @@
+<?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>fe_host</name><value></value><description>Derived from the assigned Doris FE.</description><value-attributes><empty-value-valid>true</empty-value-valid></value-attributes><on-ambari-upgrade add="true"/></property>
+ <property><name>be_host</name><value></value><description>Derived from the assigned Doris BE.</description><value-attributes><empty-value-valid>true</empty-value-valid></value-attributes><on-ambari-upgrade add="true"/></property>
+ <property><name>fe_http_port</name><value>8030</value><description>FE web and HTTP port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>fe_rpc_port</name><value>9020</value><description>FE RPC port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>fe_query_port</name><value>9030</value><description>FE MySQL-compatible query port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>fe_edit_log_port</name><value>9010</value><description>FE edit-log port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>be_port</name><value>9060</value><description>BE service port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>be_http_port</name><value>8040</value><description>BE HTTP port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>be_heartbeat_port</name><value>9050</value><description>BE heartbeat port registered with FE.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>be_brpc_port</name><value>8060</value><description>BE BRPC port.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>java_home</name><value>/usr/lib/jvm/java-17-openjdk</value><description>Java 17 runtime used by FE and BE integration.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>fe_heap_size</name><value>2G</value><description>FE JVM maximum heap.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>be_memory_limit</name><value>2G</value><description>BE process memory limit.</description><on-ambari-upgrade add="true"/></property>
+ <property><name>root_password</name><value></value><description>Explicit Doris root password applied on initial FE startup.</description><property-type>PASSWORD</property-type><value-attributes><type>password</type></value-attributes><on-ambari-upgrade add="true"/></property>
+ <property><name>binary_url</name><value></value><description>Optional HTTPS mirror of the pinned 4.1.4 ARM64 distribution; 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/doris/extensions/DORIS/1.0/services/DORIS/metainfo.xml b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/metainfo.xml
new file mode 100644
index 0000000..a88ff67
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/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>DORIS</name><displayName>Apache Doris</displayName><version>4.1.4</version>
+ <comment>One FE and one BE on the same or separate Rocky 8 ARM64 hosts. HA and automatic scale-out are not provided.</comment>
+ <components>
+ <component><name>DORIS_FE</name><displayName>Doris FE</displayName><category>MASTER</category><cardinality>1</cardinality><versionAdvertised>false</versionAdvertised><commandScript><script>scripts/fe.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript><customCommands><customCommand><name>VERSION_CHECK</name><commandScript><script>scripts/fe.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript></customCommand></customCommands></ [...]
+ <component><name>DORIS_BE</name><displayName>Doris BE</displayName><category>SLAVE</category><cardinality>1</cardinality><versionAdvertised>false</versionAdvertised><commandScript><script>scripts/be.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript><customCommands><customCommand><name>VERSION_CHECK</name><commandScript><script>scripts/be.py</script><scriptType>PYTHON</scriptType><timeout>7200</timeout></commandScript></customCommand></customCommands></c [...]
+ </components>
+ <osSpecifics><osSpecific><osFamily>redhat8</osFamily><packages><package><name>java-17-openjdk-devel</name></package><package><name>python3-PyMySQL</name></package><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>doris-env</config-type></configuration-dependencies>
+ <quickLinksConfigurations><quickLinksConfiguration><fileName>quicklinks.json</fileName><default>true</default></quickLinksConfiguration></quickLinksConfigurations>
+</service></services></metainfo>
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/be.py b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/be.py
new file mode 100644
index 0000000..d25ab9a
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/be.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 Backend(ManagedServiceV2):
+ service = "doris"
+ component = "be"
+ topology_fields = {"fe_host": ("doris_fe_hosts", True, False),
+ "be_host": ("doris_be_hosts", True, False)}
+
+
+if __name__ == "__main__":
+ Backend().execute()
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/fe.py b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/fe.py
new file mode 100644
index 0000000..7fe89da
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/fe.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 Frontend(ManagedServiceV2):
+ service = "doris"
+ component = "fe"
+ topology_fields = {"fe_host": ("doris_fe_hosts", True, False),
+ "be_host": ("doris_be_hosts", True, False)}
+
+
+if __name__ == "__main__":
+ Frontend().execute()
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/runtime.py b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/runtime.py
new file mode 100644
index 0000000..a242277
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/runtime.py
@@ -0,0 +1,340 @@
+"""
+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 hashlib
+import json
+import re
+import socket
+import time
+from decimal import Decimal
+from pathlib import Path
+
+from managed_runtime import directory, host_value, no_links, owned_file, path_value, port_value, reload_units, result, unit
+from observations import atomic_json, unit_observation, validate_request
+from verified_archive import install_archive, verify_install
+
+VERSION = "4.1.4"
+SHA512 = "15ba9dbb76b60b54360cd8580e3433cad0fa85e216512da72afc3559eff2eac708dc839f1634e2415d4b54a3abe0722d98471205b9fd52e12380d823ee144dbc"
+URL = "https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-4.1.4-bin-arm64.tar.gz"
+REQUIRED = ["fe/bin/start_fe.sh", "fe/lib/doris-fe.jar", "fe/conf/fe.conf",
+ "be/bin/start_be.sh", "be/lib/doris_be", "be/conf/be.conf"]
+HOME = Path("/opt/ambari-mpacks/doris/4.1.4")
+DATA = Path("/var/lib/doris")
+
+
+class CheckFailure(Exception):
+ def __init__(self, stage, database="", cleanup=True):
+ self.observation = {"stage": stage, "database": database, "cleanup": cleanup}
+
+
+def settings(parameters):
+ role = parameters["component"]
+ if role not in {"fe", "be", "check"}:
+ raise ValueError("Unknown Doris component")
+ fe, be = host_value(parameters["fe_host"]), host_value(parameters["be_host"])
+ host = host_value(parameters["hostname"])
+ if role == "fe" and host != fe or role == "be" and host != be:
+ raise ValueError("Doris component placement differs from the assigned host")
+ ports = {key: port_value(parameters[key]) for key in (
+ "fe_http_port", "fe_rpc_port", "fe_query_port", "fe_edit_log_port",
+ "be_port", "be_http_port", "be_heartbeat_port", "be_brpc_port")}
+ if fe == be and len(set(ports.values())) != len(ports):
+ raise ValueError("Co-located Doris component ports must be distinct")
+ java = path_value(parameters["java_home"], ("/usr/lib/jvm/",))
+ java = path_value(str(java.resolve()), ("/usr/lib/jvm/",))
+ no_links(java)
+ release = java / "release"
+ if not release.is_file() or not (java / "bin/java").is_file() or not re.search(
+ r'^JAVA_VERSION="17\.[0-9.]+"$', release.read_text(), re.MULTILINE):
+ raise ValueError("Doris 4.1.4 requires Java 17")
+ heap = parameters["fe_heap_size"]
+ if not isinstance(heap, str) or not re.fullmatch(r"[2-9][0-9]*[gG]", heap):
+ raise ValueError("Doris FE heap must be at least 2G")
+ be_memory = parameters["be_memory_limit"]
+ if not isinstance(be_memory, str) or not re.fullmatch(r"[2-9][0-9]*[gG]", be_memory):
+ raise ValueError("Doris BE memory limit must be at least 2G")
+ password = parameters["root_password"]
+ if not isinstance(password, str) or not 12 <= len(password) <= 128 or "\x00" in password:
+ raise ValueError("An explicit Doris root password is required")
+ return role, fe, be, host, ports, java, heap.upper(), be_memory.upper(), password
+
+
+def installed():
+ return verify_install(HOME, "doris", VERSION, SHA512, REQUIRED)
+
+
+def install(parameters):
+ settings(parameters)
+ return install_archive("doris", VERSION, parameters.get("binary_url") or URL,
+ SHA512, "apache-doris-4.1.4-bin-arm64", REQUIRED,
+ maximum_archive=5 * 1024 ** 3, maximum_expanded=16 * 1024 ** 3)
+
+
+def _linked(destination, source):
+ if destination.is_symlink():
+ if destination.resolve() != source.resolve():
+ raise ValueError("Doris runtime resource differs from its pinned archive")
+ elif destination.exists():
+ raise ValueError("Unowned Doris runtime resource exists")
+ else:
+ destination.symlink_to(source)
+
+
+def configure(parameters):
+ role, fe, be, host, ports, java, heap, be_memory, password = settings(parameters)
+ if role == "check":
+ raise ValueError("A service check cannot configure Doris")
+ installed()
+ for path in (DATA, DATA / role, DATA / role / "bin", DATA / role / "conf",
+ DATA / role / "log", DATA / "fe/meta", DATA / "be/storage"):
+ directory(path, "doris")
+ stage = DATA / role
+ source = HOME / role
+ script_name = "start_" + role + ".sh"
+ script = stage / "bin" / script_name
+ owned_file(script, (source / "bin" / script_name).read_text(), "doris", 0o750)
+ for item in source.iterdir():
+ if item.name in {"bin", "conf", "log", "storage", "meta", "doris-meta"}:
+ continue
+ _linked(stage / item.name, item)
+ for item in (source / "conf").rglob("*"):
+ relative = item.relative_to(source / "conf")
+ if str(relative) in {"fe.conf", "be.conf"}:
+ continue
+ if item.is_symlink():
+ raise ValueError("Unexpected Doris configuration resource")
+ target = stage / "conf" / relative
+ if item.is_dir():
+ directory(target, "doris")
+ elif item.is_file():
+ owned_file(target, item.read_text(), "doris")
+ else:
+ raise ValueError("Unexpected Doris configuration resource")
+ if role == "fe":
+ values = {"JAVA_HOME": str(java), "JAVA_OPTS": "-Xmx" + heap,
+ "LOG_DIR": str(stage / "log"), "meta_dir": str(DATA / "fe/meta"),
+ "http_port": ports["fe_http_port"], "rpc_port": ports["fe_rpc_port"],
+ "query_port": ports["fe_query_port"], "edit_log_port": ports["fe_edit_log_port"]}
+ marker = DATA / "fe/identity.json"
+ no_links(marker)
+ identity = {"schema_version": 1, "version": VERSION, "fe_host": fe,
+ "root_password_sha256": hashlib.sha256(password.encode()).hexdigest()}
+ if marker.exists():
+ if any(json.loads(marker.read_text()).get(key) != value for key, value in identity.items()):
+ raise ValueError("Doris FE identity differs from its retained metadata")
+ elif any((DATA / "fe/meta").iterdir()):
+ raise ValueError("Unowned Doris FE metadata exists")
+ else:
+ atomic_json(marker, dict(identity, phase="PENDING"))
+ else:
+ values = {"JAVA_HOME": str(java), "LOG_DIR": str(stage / "log"),
+ "storage_root_path": str(DATA / "be/storage"), "mem_limit": be_memory,
+ "be_port": ports["be_port"], "webserver_port": ports["be_http_port"],
+ "heartbeat_service_port": ports["be_heartbeat_port"], "brpc_port": ports["be_brpc_port"]}
+ config = source / "conf" / (role + ".conf")
+ lines = config.read_text() + "\n" + "".join(key + " = " + str(value) + "\n" for key, value in values.items())
+ owned_file(stage / "conf" / (role + ".conf"), lines, "doris")
+ unit("ambari-doris-" + role + ".service", "doris", Path("/bin/bash"),
+ {"JAVA_HOME": str(java)}, stage, str(script))
+ reload_units()
+ return {"role": role, "host": host, "metadata": str(DATA / "fe/meta"),
+ "storage": str(DATA / "be/storage")}
+
+
+def connection(host, port, password):
+ import pymysql
+ return pymysql.connect(host=host, port=port, user="root", password=password,
+ connect_timeout=10, read_timeout=20, write_timeout=20, autocommit=True)
+
+
+def query(connection, sql, parameters=None):
+ with connection.cursor() as cursor:
+ cursor.execute(sql, parameters)
+ columns = [item[0] for item in cursor.description] if cursor.description else []
+ rows = [dict(zip(columns, row)) for row in cursor.fetchall()] if columns else []
+ return rows
+
+
+def _addresses(host):
+ values = {host}
+ values.update(row[4][0] for row in socket.getaddrinfo(host, None, family=socket.AF_INET))
+ return values
+
+
+def validate_nodes(frontends, backends, fe, be, ports):
+ if len(frontends) != 1 or len(backends) != 1:
+ raise ValueError("Doris FE/BE inventory is missing or ambiguous")
+ frontend, backend = frontends[0], backends[0]
+ if (frontend.get("Host") not in _addresses(fe) or frontend.get("Alive") not in (True, "true")
+ or frontend.get("IsMaster") not in (True, "true")
+ or str(frontend.get("EditLogPort")) != str(ports["fe_edit_log_port"])):
+ raise ValueError("Doris FE identity or readiness differs")
+ if (backend.get("Host") not in _addresses(be) or backend.get("Alive") not in (True, "true")
+ or str(backend.get("HeartbeatPort")) != str(ports["be_heartbeat_port"])
+ or str(backend.get("HttpPort")) != str(ports["be_http_port"])):
+ raise ValueError("Doris BE identity or readiness differs")
+ return {"fe": frontend["Host"], "be": backend["Host"],
+ "be_heartbeat_port": ports["be_heartbeat_port"]}
+
+
+def bootstrap_fe(parameters):
+ import pymysql
+ role, fe, be, host, ports, java, heap, be_memory, password = settings(parameters)
+ marker = DATA / "fe/identity.json"
+ if not marker.is_file():
+ raise ValueError("Doris FE has no owned initialization marker")
+ identity = json.loads(marker.read_text())
+ expected = {"schema_version": 1, "version": VERSION, "fe_host": fe,
+ "root_password_sha256": hashlib.sha256(password.encode()).hexdigest()}
+ if any(identity.get(key) != value for key, value in expected.items()) or identity.get("phase") not in {"PENDING", "COMPLETE"}:
+ raise ValueError("Invalid Doris FE initialization phase")
+ deadline = time.monotonic() + 180
+ while True:
+ try:
+ authenticated = connection(fe, ports["fe_query_port"], password)
+ authenticated.close()
+ atomic_json(marker, dict(identity, phase="COMPLETE"))
+ return {"administrator": "root", "phase": "COMPLETE"}
+ except pymysql.err.OperationalError as error:
+ code = error.args[0] if error.args and type(error.args[0]) is int else None
+ if code == 1045 and identity["phase"] == "PENDING":
+ break
+ if code not in {2003, 2006}:
+ raise
+ if time.monotonic() >= deadline:
+ break
+ time.sleep(3)
+ if identity["phase"] == "COMPLETE":
+ raise RuntimeError("Retained Doris root credential no longer authenticates")
+ unauthenticated = connection(fe, ports["fe_query_port"], "")
+ try:
+ with unauthenticated.cursor() as cursor:
+ cursor.execute("SET PASSWORD FOR 'root' = PASSWORD(%s)", (password,))
+ finally:
+ unauthenticated.close()
+ authenticated = connection(fe, ports["fe_query_port"], password)
+ authenticated.close()
+ atomic_json(marker, dict(identity, phase="COMPLETE"))
+ return {"administrator": "root", "phase": "COMPLETE"}
+
+
+def register_be(parameters):
+ role, fe, be, host, ports, java, heap, be_memory, password = settings(parameters)
+ client = connection(fe, ports["fe_query_port"], password)
+ try:
+ backends = query(client, "SHOW BACKENDS")
+ if not backends:
+ endpoint = be + ":" + str(ports["be_heartbeat_port"])
+ query(client, 'ALTER SYSTEM ADD BACKEND "' + endpoint + '"')
+ elif len(backends) != 1 or backends[0].get("Host") not in _addresses(be) or str(
+ backends[0].get("HeartbeatPort")) != str(ports["be_heartbeat_port"]):
+ raise ValueError("Existing Doris BE assignment differs from the selected host")
+ deadline = time.monotonic() + 180
+ while True:
+ observed = query(client, "SHOW BACKENDS")
+ if len(observed) == 1 and observed[0].get("Host") in _addresses(be) and observed[0].get("Alive") in (True, "true"):
+ return {"host": observed[0]["Host"], "heartbeat_port": ports["be_heartbeat_port"],
+ "alive": True}
+ if time.monotonic() >= deadline:
+ raise RuntimeError("Doris BE registration remains unresolved")
+ time.sleep(3)
+ finally:
+ client.close()
+
+
+def check(request):
+ role, fe, be, host, ports, java, heap, be_memory, password = settings(request["parameters"])
+ client = connection(fe, ports["fe_query_port"], password)
+ name = "ambari_mpack_" + request["execution_id"].replace("-", "")
+ stage, created, cleanup, failure = "inventory", False, True, False
+ try:
+ frontends = query(client, "SHOW FRONTENDS")
+ backends = query(client, "SHOW BACKENDS")
+ nodes = validate_nodes(frontends, backends, fe, be, ports)
+ stage = "create"
+ query(client, "CREATE DATABASE " + name)
+ created = True
+ query(client, "CREATE TABLE " + name + ".probe (id INT, value INT) ENGINE=OLAP DUPLICATE KEY(id) "
+ 'DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ("replication_num"="1")')
+ stage = "write"
+ query(client, "INSERT INTO " + name + ".probe VALUES (1, 42)")
+ stage = "read"
+ rows = query(client, "SELECT COUNT(*) AS row_count, SUM(value) AS value_sum FROM " + name + ".probe")
+ if (len(rows) != 1 or type(rows[0].get("row_count")) is not int or rows[0]["row_count"] != 1
+ or type(rows[0].get("value_sum")) not in (int, Decimal)
+ or rows[0]["value_sum"] != 42):
+ raise ValueError("Doris operation-owned table result differs")
+ except Exception:
+ failure = True
+ finally:
+ if created:
+ try:
+ query(client, "DROP DATABASE " + name)
+ listed = query(client, "SHOW DATABASES")
+ cleanup = not any(name in row.values() for row in listed)
+ except Exception:
+ cleanup = False
+ client.close()
+ if failure or not cleanup:
+ raise CheckFailure(stage if cleanup else "cleanup", name, cleanup)
+ return {"database": name, "row_count": 1, "value_sum": 42, "nodes": nodes, "cleanup": True}
+
+
+def execute(request):
+ parameters, action = request["parameters"], request["action"]
+ role, fe, be, host, ports, java, heap, be_memory, password = settings(parameters)
+ if action == "install":
+ return {"software": install(parameters)}
+ if action == "version":
+ return {"software": installed()}
+ if action == "configure":
+ return {"configuration": configure(parameters)}
+ if action == "check":
+ return {"query": check(request)}
+ if role not in {"fe", "be"} or action not in {"start", "stop", "status"}:
+ raise ValueError("Unsupported Doris action")
+ observed = unit_observation("ambari-doris-" + role + ".service", None if action == "status" else action)
+ if action == "status" and observed["active_state"] != "active":
+ raise RuntimeError("Doris component is not active")
+ if action == "status" and role == "fe":
+ marker = DATA / "fe/identity.json"
+ no_links(marker)
+ identity = json.loads(marker.read_text()) if marker.is_file() else {}
+ if (identity.get("phase") != "COMPLETE" or identity.get("fe_host") != fe
+ or identity.get("root_password_sha256") != hashlib.sha256(password.encode()).hexdigest()):
+ raise RuntimeError("Doris FE initialization is unresolved")
+ if action == "start":
+ return {"systemd": observed, "registration": bootstrap_fe(parameters) if role == "fe" else register_be(parameters)}
+ return {"systemd": observed}
+
+
+def main():
+ import sys
+ request = validate_request(json.loads(Path(sys.argv[1]).read_text()))
+ try:
+ value = result(request, "APPLIED", execute(request))
+ except CheckFailure as error:
+ value = result(request, "UNRESOLVED", error.observation)
+ atomic_json(sys.argv[2], value)
+ raise SystemExit(1)
+ except Exception as error:
+ value = result(request, "UNRESOLVED", {"error_type": type(error).__name__})
+ atomic_json(sys.argv[2], value)
+ raise SystemExit(1)
+ atomic_json(sys.argv[2], value)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/service_check.py b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/service_check.py
new file mode 100644
index 0000000..1937ba8
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/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 = "doris"
+ component = "check"
+ topology_fields = {"fe_host": ("doris_fe_hosts", True, False),
+ "be_host": ("doris_be_hosts", True, False)}
+
+
+if __name__ == "__main__":
+ Check().execute()
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/quicklinks/quicklinks.json b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/quicklinks/quicklinks.json
new file mode 100644
index 0000000..6930392
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/quicklinks/quicklinks.json
@@ -0,0 +1,9 @@
+{
+ "$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": "Doris FE interface",
+ "configuration": {"protocol": {"type": "http"},
+ "links": [{"name": "doris_fe", "label": "Doris FE UI", "requires_user_name": "false",
+ "component_name": "DORIS_FE", "url": "%@://%@:%@/",
+ "port": {"http_property": "fe_http_port", "http_default_port": "8030",
+ "regex": "^(\\d+)$", "site": "doris-env"}}]}
+}
diff --git a/mpacks/doris/extensions/DORIS/1.0/services/DORIS/role_command_order.json b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/role_command_order.json
new file mode 100644
index 0000000..af4f1c2
--- /dev/null
+++ b/mpacks/doris/extensions/DORIS/1.0/services/DORIS/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": {
+ "DORIS_BE-START": ["DORIS_FE-START"],
+ "DORIS_FE-STOP": ["DORIS_BE-STOP"],
+ "DORIS_SERVICE_CHECK-SERVICE_CHECK": ["DORIS_FE-START", "DORIS_BE-START"]
+ }
+}
diff --git a/mpacks/doris/mpack.json b/mpacks/doris/mpack.json
new file mode 100644
index 0000000..f52c81c
--- /dev/null
+++ b/mpacks/doris/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": "doris",
+ "version": "1.0.0.5",
+ "description": "Apache Doris 4.1.4 single FE and BE",
+ "artifacts": [{"name": "doris-definitions", "type": "extension-definitions", "source_dir": "extensions"}],
+ "dependencies": []
+}
diff --git a/mpacks/doris/shared-files.json b/mpacks/doris/shared-files.json
new file mode 100644
index 0000000..60e6b98
--- /dev/null
+++ b/mpacks/doris/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/DORIS/1.0/services/DORIS/package/scripts/observations.py", "digest": "8fb22532d4012faf25c2f38a56bbd713738016716fa6c0606fb56b46ce194a99"},
+ {"source": "shared/managed_runtime.py", "target": "extensions/DORIS/1.0/services/DORIS/package/scripts/managed_runtime.py", "digest": "542098b830a0580c4f699c80be9ce1133017edfd0620d629f1691c988fdfaab0"},
+ {"source": "shared/managed_service.py", "target": "extensions/DORIS/1.0/services/DORIS/package/scripts/managed_service.py", "digest": "8b3338e0b6a895cfb3205e2053aa05e9f7e7e2a56f559417e8a9873ad132ff41"},
+ {"source": "shared/managed_service_v2.py", "target": "extensions/DORIS/1.0/services/DORIS/package/scripts/managed_service_v2.py", "digest": "b561538a70028de8c83d1ced93e4dc6f006ed99c1b4cd28a603aa610a971c5eb"},
+ {"source": "shared/managed_topology.py", "target": "extensions/DORIS/1.0/services/DORIS/package/scripts/managed_topology.py", "digest": "cd9ca507841e3b4c6f6e623f866e79e2fce83e818b1edecb0f8cc6c4a8185f43"},
+ {"source": "shared/verified_archive.py", "target": "extensions/DORIS/1.0/services/DORIS/package/scripts/verified_archive.py", "digest": "f02828b595e5b4614be24f88d102ee0f02f7563a65fe8c79e7fa13c9ff2ea2ab"}
+ ]
+}
diff --git a/mpacks/doris/source.json b/mpacks/doris/source.json
new file mode 100644
index 0000000..f69f35b
--- /dev/null
+++ b/mpacks/doris/source.json
@@ -0,0 +1,14 @@
+{
+ "$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": "4.1.4",
+ "source_tag": "4.1.4",
+ "source_commit": "ad35a140c7fd0b842f18c23300bac581f7d04326",
+ "binary": {
+ "url": "https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-4.1.4-bin-arm64.tar.gz",
+ "sha512": "15ba9dbb76b60b54360cd8580e3433cad0fa85e216512da72afc3559eff2eac708dc839f1634e2415d4b54a3abe0722d98471205b9fd52e12380d823ee144dbc",
+ "compressed_bytes": 4351941761
+ },
+ "topology": "SINGLE_FE_SINGLE_BE",
+ "validation_status": "IMPLEMENTED_PENDING_ACCEPTANCE"
+}
diff --git a/tests/test_doris.py b/tests/test_doris.py
new file mode 100644
index 0000000..334ef5a
--- /dev/null
+++ b/tests/test_doris.py
@@ -0,0 +1,168 @@
+"""
+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 hashlib
+import json
+import sys
+import tempfile
+import unittest
+from pathlib import Path
+from types import SimpleNamespace
+from unittest.mock import MagicMock, patch
+
+ROOT = Path(__file__).resolve().parents[1]
+sys.path.insert(0, str(ROOT / "shared"))
+PATH = ROOT / "mpacks/doris/extensions/DORIS/1.0/services/DORIS/package/scripts/runtime.py"
+spec = importlib.util.spec_from_file_location("doris_runtime_test", str(PATH))
+doris = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(doris)
+
+
+def parameters():
+ return {"component": "check", "hostname": "fe.test", "fe_host": "fe.test", "be_host": "be.test",
+ "fe_http_port": "8030", "fe_rpc_port": "9020", "fe_query_port": "9030",
+ "fe_edit_log_port": "9010", "be_port": "9060", "be_http_port": "8040",
+ "be_heartbeat_port": "9050", "be_brpc_port": "8060", "java_home": "/usr/lib/jvm/java-17-openjdk",
+ "fe_heap_size": "2G", "be_memory_limit": "2G", "root_password": "private-test-secret"}
+
+
+def settings():
+ return ("check", "fe.test", "be.test", "fe.test", {"fe_http_port": 8030,
+ "fe_rpc_port": 9020, "fe_query_port": 9030, "fe_edit_log_port": 9010,
+ "be_port": 9060, "be_http_port": 8040, "be_heartbeat_port": 9050,
+ "be_brpc_port": 8060}, Path("/usr/lib/jvm/java-17-openjdk"), "2G", "2G", "private-test-secret")
+
+
+class DorisTests(unittest.TestCase):
+ def test_active_fe_is_not_started_until_owned_bootstrap_completes(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ data = Path(temporary).resolve()
+ (data / "fe").mkdir()
+ identity = {"phase": "PENDING", "fe_host": "fe.test",
+ "root_password_sha256": hashlib.sha256(b"private-test-secret").hexdigest()}
+ marker = data / "fe/identity.json"
+ marker.write_text(json.dumps(identity))
+ with patch.object(doris, "DATA", data), patch.object(doris, "settings", return_value=("fe",)+settings()[1:]), patch.object(
+ doris, "unit_observation", return_value={"active_state": "active"}):
+ with self.assertRaises(RuntimeError):
+ doris.execute({"parameters": {}, "action": "status"})
+ marker.write_text(json.dumps(dict(identity, phase="COMPLETE")))
+ self.assertEqual(doris.execute({"parameters": {}, "action": "status"})["systemd"]["active_state"], "active")
+
+ def test_configure_preserves_data_directories_and_nested_configuration(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ root = Path(temporary).resolve()
+ home, data = root / "software", root / "data"
+ for relative in ("fe/bin", "fe/conf/ssl", "fe/lib", "fe/meta"):
+ (home / relative).mkdir(parents=True)
+ (home / "fe/bin/start_fe.sh").write_text("#!/bin/bash\n")
+ (home / "fe/conf/fe.conf").write_text("# upstream\n")
+ (home / "fe/conf/ssl/example.conf").write_text("trusted=true\n")
+ def directory(path, *_):
+ Path(path).mkdir(parents=True, exist_ok=True)
+ return Path(path)
+ values = ("fe",) + settings()[1:]
+ with patch.object(doris, "HOME", home), patch.object(doris, "DATA", data), patch.object(
+ doris, "settings", return_value=values), patch.object(doris, "installed"), patch.object(
+ doris, "directory", side_effect=directory), patch.object(
+ doris, "owned_file", side_effect=lambda path, content, *_: Path(path).write_text(content)), patch.object(
+ doris, "unit"), patch.object(doris, "reload_units"):
+ doris.configure(parameters())
+ self.assertFalse((data / "fe/meta").is_symlink())
+ self.assertTrue((data / "fe/lib").is_symlink())
+ self.assertEqual((data / "fe/conf/ssl/example.conf").read_text(), "trusted=true\n")
+
+ def test_ports_placement_and_password_are_validated(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ java = Path(temporary).resolve()
+ (java / "bin").mkdir()
+ (java / "bin/java").touch()
+ (java / "release").write_text('JAVA_VERSION="17.0.16"\n')
+ with patch.object(doris, "path_value", return_value=java):
+ self.assertEqual(doris.settings(parameters())[1:3], ("fe.test", "be.test"))
+ for change in ({"root_password": "short"}, {"fe_host": "foreign.test", "component": "fe"},
+ {"fe_query_port": "0"}, {"be_memory_limit": "1G"},
+ {"fe_host": "same.test", "be_host": "same.test", "fe_http_port": "8040"}):
+ with self.subTest(change=change), self.assertRaises(ValueError):
+ doris.settings(dict(parameters(), **change))
+
+ def test_system_java_alias_resolves_before_no_link_validation(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ root = Path(temporary).resolve()
+ real = root / "java-17-runtime"
+ (real / "bin").mkdir(parents=True)
+ (real / "bin/java").touch()
+ (real / "release").write_text('JAVA_VERSION="17.0.16"\n')
+ alias = root / "java-17-openjdk"
+ alias.symlink_to(real)
+ with patch.object(doris, "path_value", side_effect=lambda value, *_: Path(value)):
+ self.assertEqual(doris.settings(dict(parameters(), java_home=str(alias)))[5], real)
+
+ def test_inventory_uses_exact_fe_be_and_registration_ports(self):
+ frontend = {"Host": "fe.test", "Alive": "true", "IsMaster": "true", "EditLogPort": "9010"}
+ backend = {"Host": "be.test", "Alive": "true", "HeartbeatPort": "9050", "HttpPort": "8040"}
+ with patch.object(doris, "_addresses", side_effect=lambda host: {host}):
+ self.assertEqual(doris.validate_nodes([frontend], [backend], "fe.test", "be.test",
+ settings()[4])["be"], "be.test")
+ for wrong_fe, wrong_be in ((dict(frontend, Host="foreign.test"), backend),
+ (frontend, dict(backend, Alive="false")),
+ (frontend, dict(backend, HeartbeatPort="9051"))):
+ with self.subTest(fe=wrong_fe, be=wrong_be), self.assertRaises(ValueError):
+ doris.validate_nodes([wrong_fe], [wrong_be], "fe.test", "be.test", settings()[4])
+
+ def test_owned_sql_roundtrip_rejects_wrong_result_or_failed_cleanup(self):
+ value = {"execution_id": "12345678-1234-4234-8234-123456789abc", "parameters": parameters()}
+ rows = [[{"Host": "fe.test"}], [{"Host": "be.test"}], [], [], [],
+ [{"row_count": 1, "value_sum": 42}], [], []]
+ def run(observed):
+ client = MagicMock()
+ with patch.object(doris, "settings", return_value=settings()), patch.object(
+ doris, "connection", return_value=client), patch.object(doris, "query", side_effect=observed), patch.object(
+ doris, "validate_nodes", return_value={"fe": "fe.test", "be": "be.test"}):
+ return doris.check(value)
+ self.assertEqual(run(rows)["value_sum"], 42)
+ wrong = list(rows)
+ wrong[5] = [{"row_count": 2, "value_sum": 42}]
+ with self.assertRaises(doris.CheckFailure) as failure:
+ run(wrong)
+ self.assertEqual(failure.exception.observation["stage"], "read")
+ self.assertEqual(failure.exception.observation["cleanup"], True)
+ failed_cleanup = list(rows)
+ failed_cleanup[-1] = [{"Database": "ambari_mpack_12345678123442348234123456789abc"}]
+ with self.assertRaises(doris.CheckFailure) as failure:
+ run(failed_cleanup)
+ self.assertEqual(failure.exception.observation["cleanup"], False)
+
+ def test_initial_root_password_recovery_uses_exact_auth_error_code(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ root = Path(temporary).resolve()
+ (root / "fe").mkdir()
+ identity = {"schema_version": 1, "version": "4.1.4", "fe_host": "fe.test",
+ "root_password_sha256": hashlib.sha256(b"private-test-secret").hexdigest(), "phase": "PENDING"}
+ (root / "fe/identity.json").write_text(json.dumps(identity))
+ access_denied = type("OperationalError", (Exception,), {})
+ empty = MagicMock()
+ authenticated = MagicMock()
+ with patch.object(doris, "DATA", root), patch.object(doris, "settings", return_value=settings()), patch.dict(
+ sys.modules, {"pymysql": SimpleNamespace(err=SimpleNamespace(OperationalError=access_denied))}), patch.object(
+ doris, "connection", side_effect=[access_denied(1045, "diagnostic noise"), empty, authenticated]):
+ self.assertEqual(doris.bootstrap_fe(parameters())["phase"], "COMPLETE")
+ self.assertEqual(json.loads((root / "fe/identity.json").read_text())["phase"], "COMPLETE")
+ empty.cursor.return_value.__enter__.return_value.execute.assert_called_once()
+
+
+if __name__ == "__main__":
+ unittest.main()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org