From d91f7a4079263a3c5f3e65197b006b30267fde96 Mon Sep 17 00:00:00 2001 From: rzuo Date: Fri, 2 Aug 2024 09:02:36 +0800 Subject: [PATCH 01/23] AMBARI-25883: init function of InitializerModule called twice #3656 --- .../python/ambari_agent/InitializerModule.py | 2 -- .../src/main/python/ambari_agent/main.py | 36 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/InitializerModule.py b/ambari-agent/src/main/python/ambari_agent/InitializerModule.py index 18b0d8faa9c..c256a8ddf58 100644 --- a/ambari-agent/src/main/python/ambari_agent/InitializerModule.py +++ b/ambari-agent/src/main/python/ambari_agent/InitializerModule.py @@ -76,8 +76,6 @@ def __init__(self): self.action_queue = None self.alert_scheduler_handler = None - self.init() - def init(self): """ Initialize properties diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index 1107e2693fa..9c8432cb0a4 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -316,12 +316,8 @@ def run_threads(initializer_module): initializer_module.heartbeat_thread.join() initializer_module.action_queue.join() -# event - event, that will be passed to Controller and NetUtil to make able to interrupt loops form outside process -# we need this for windows os, where no sigterm available -def main(initializer_module, heartbeat_stop_callback=None): - global config - global home_dir - +# parse the options from command line +def setup_option_parser(): parser = OptionParser() parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="verbose log output", default=False) parser.add_option("-e", "--expected-hostname", dest="expected_hostname", action="store", @@ -329,24 +325,34 @@ def main(initializer_module, heartbeat_stop_callback=None): parser.add_option("--home", dest="home_dir", action="store", help="Home directory", default="") (options, args) = parser.parse_args() - expected_hostname = options.expected_hostname - home_dir = options.home_dir + return options + +# initialize the loggers +def init_loggers(options): + global is_logger_setup logging_level = logging.DEBUG if options.verbose else logging.INFO setup_logging(logger, AmbariConfig.AmbariConfig.getLogFile(), logging_level) - global is_logger_setup - is_logger_setup = True setup_logging(alerts_logger, AmbariConfig.AmbariConfig.getAlertsLogFile(), logging_level) setup_logging(alerts_logger_2, AmbariConfig.AmbariConfig.getAlertsLogFile(), logging_level) setup_logging(alerts_logger_global, AmbariConfig.AmbariConfig.getAlertsLogFile(), logging_level) setup_logging(apscheduler_logger, AmbariConfig.AmbariConfig.getAlertsLogFile(), logging_level) setup_logging(apscheduler_logger_global, AmbariConfig.AmbariConfig.getAlertsLogFile(), logging_level) Logger.initialize_logger('resource_management', logging_level=logging_level) - #with Environment() as env: - # File("/abc") - # init data, once loggers are setup to see exceptions/errors of initialization. + is_logger_setup = True + +# event - event, that will be passed to Controller and NetUtil to make able to interrupt loops form outside process +# we need this for windows os, where no sigterm available +def main(options, initializer_module, heartbeat_stop_callback=None): + global config + global home_dir + + expected_hostname = options.expected_hostname + home_dir = options.home_dir + + # init data. initializer_module.init() if home_dir != "": @@ -454,10 +460,12 @@ def main(initializer_module, heartbeat_stop_callback=None): if __name__ == "__main__": is_logger_setup = False try: + options = setup_option_parser() + init_loggers(options) initializer_module = InitializerModule() heartbeat_stop_callback = bind_signal_handlers(agentPid, initializer_module.stop_event) - main(initializer_module, heartbeat_stop_callback) + main(options, initializer_module, heartbeat_stop_callback) except SystemExit: raise except BaseException: From dd179db745d44beb30ff8bc108683ce85cba904e Mon Sep 17 00:00:00 2001 From: xjmu <763669981@qq.com> Date: Fri, 2 Aug 2024 16:19:53 +0800 Subject: [PATCH 02/23] fix ambari-server install faild and ambari-server setup error on RockyLinux8.10 (#3802) --- ambari-server/conf/unix/ambari-env.sh | 1 + ambari-server/conf/unix/install-helper.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh index d2f655c1b90..95eb6c1a85a 100644 --- a/ambari-server/conf/unix/ambari-env.sh +++ b/ambari-server/conf/unix/ambari-env.sh @@ -1,3 +1,4 @@ +#!/bin/bash # 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. diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh index f3ac20a23a6..22c01fb3e45 100644 --- a/ambari-server/conf/unix/install-helper.sh +++ b/ambari-server/conf/unix/install-helper.sh @@ -1,3 +1,4 @@ +#!/bin/bash # 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 rega4rding copyright ownership. From 9f7dcc51c7b1bffa9243dae10a4fb6be972b8016 Mon Sep 17 00:00:00 2001 From: Prabhjyot Date: Fri, 2 Aug 2024 22:09:34 -0400 Subject: [PATCH 03/23] AMBARI-26107: Migrate away from DOMNodeInserted to MutationObserver (#3801) * AMBARI-26107: migrate away from DOMNodeInserted to MutationObserver Co-authored-by: zrain <2296342883@qq.com> * Update ambari-web/app/views/main/service/info/metrics_view.js Co-authored-by: zrain <2296342883@qq.com> --------- Co-authored-by: zrain <2296342883@qq.com> --- ambari-web/app/views/application.js | 27 ++++++--- .../views/main/service/info/metrics_view.js | 55 ++++++++++++------- .../main/service/info/metrics_view_test.js | 27 ++++----- 3 files changed, 68 insertions(+), 41 deletions(-) diff --git a/ambari-web/app/views/application.js b/ambari-web/app/views/application.js index a4b3b14b1f6..5937f1ac356 100644 --- a/ambari-web/app/views/application.js +++ b/ambari-web/app/views/application.js @@ -48,13 +48,26 @@ App.ApplicationView = Em.View.extend({ */ initNavigationBar: function () { if (App.get('router.mainController.isClusterDataLoaded')) { - $('body').on('DOMNodeInserted', '.navigation-bar', () => { - $('.navigation-bar').navigationBar({ - fitHeight: true, - collapseNavBarClass: 'icon-double-angle-left', - expandNavBarClass: 'icon-double-angle-right' - }); - $('body').off('DOMNodeInserted', '.navigation-bar'); + const observer = new MutationObserver(mutations => { + var targetNode + if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $('.navigation-bar')).length)) { + observer.disconnect(); + targetNode.navigationBar({ + fitHeight: true, + collapseNavBarClass: 'icon-double-angle-left', + expandNavBarClass: 'icon-double-angle-right', + }); + } + }); + + setTimeout(() => { + // remove observer if selected element is not found in 10secs. + observer.disconnect(); + }, 10000) + + observer.observe(document.body, { + childList: true, + subtree: true }); } }.observes('App.router.mainController.isClusterDataLoaded') diff --git a/ambari-web/app/views/main/service/info/metrics_view.js b/ambari-web/app/views/main/service/info/metrics_view.js index e61a62883d6..b4c3cbac0a8 100644 --- a/ambari-web/app/views/main/service/info/metrics_view.js +++ b/ambari-web/app/views/main/service/info/metrics_view.js @@ -280,27 +280,40 @@ App.MainServiceInfoMetricsView = Em.View.extend(App.Persist, App.TimeRangeMixin, makeSortable: function (selector, isNSLayout) { var self = this; var controller = this.get('controller'); - $('html').on('DOMNodeInserted', selector, function () { - $(this).sortable({ - items: "> div", - cursor: "move", - tolerance: "pointer", - scroll: false, - update: function () { - var layout = isNSLayout ? controller.get('selectedNSWidgetLayout') : controller.get('activeWidgetLayout'); - var widgets = misc.sortByOrder($(selector + " .widget").map(function () { - return this.id; - }), layout.get('widgets').toArray()); - controller.saveWidgetLayout(widgets, layout); - }, - activate: function () { - self.set('isMoving', true); - }, - deactivate: function () { - self.set('isMoving', false); - } - }).disableSelection(); - $('html').off('DOMNodeInserted', selector); + const observer = new MutationObserver(mutations => { + var targetNode + if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $(selector)).length)) { + observer.disconnect(); + $(targetNode).sortable({ + items: "> div", + cursor: "move", + tolerance: "pointer", + scroll: false, + update: function () { + var layout = isNSLayout ? controller.get('selectedNSWidgetLayout') : controller.get('activeWidgetLayout'); + var widgets = misc.sortByOrder($(selector + " .widget").map(function () { + return this.id; + }), layout.get('widgets').toArray()); + controller.saveWidgetLayout(widgets, layout); + }, + activate: function () { + self.set('isMoving', true); + }, + deactivate: function () { + self.set('isMoving', false); + } + }).disableSelection(); + } + }); + + setTimeout(() => { + // remove observer if selected element is not found in 10secs. + observer.disconnect(); + }, 10000) + + observer.observe(document.body, { + childList: true, + subtree: true }); } }); diff --git a/ambari-web/test/views/main/service/info/metrics_view_test.js b/ambari-web/test/views/main/service/info/metrics_view_test.js index 99442f17f8c..3c49044b6e8 100644 --- a/ambari-web/test/views/main/service/info/metrics_view_test.js +++ b/ambari-web/test/views/main/service/info/metrics_view_test.js @@ -214,19 +214,20 @@ describe('App.MainServiceInfoMetricsView', function() { mock.sortable.restore(); }); - it("on() should be called", function() { + it("MutationObserver callback should be called", function() { view.makeSortable('#widget_layout'); - expect(mock.on.calledWith('DOMNodeInserted', '#widget_layout')).to.be.true; - }); - - it("sortable() should be called", function() { - view.makeSortable('#widget_layout'); - expect(mock.sortable.called).to.be.true; - }); - - it("off() should be called", function() { - view.makeSortable('#widget_layout'); - expect(mock.off.calledWith('DOMNodeInserted', '#widget_layout')).to.be.true; + const callback = function () { + expect(true).to.be.true; + expect(document.querySelector('#widget_layout')).to.not.be.null; + observer.disconnect(); + done(); + }; + const observer = new MutationObserver(callback); + const body = document.body; + observer.observe(body, { childList: true }); + const elementWidget = document.createElement('div'); + elementWidget.id='widget_layout'; + body.appendChild(elementWidget); }); }); @@ -333,4 +334,4 @@ describe('App.MainServiceInfoMetricsView', function() { }); }); -}); \ No newline at end of file +}); From 3271fa9462d1cf520b4bd4588acfe98b3b42cd94 Mon Sep 17 00:00:00 2001 From: zrain <2296342883@qq.com> Date: Mon, 5 Aug 2024 08:57:18 +0800 Subject: [PATCH 04/23] AMBARI-26100: Fix all python script file to python3 (#3799) * fix: python script file to python3 --- ambari-agent/conf/unix/agent-multiplier.py | 1 + ambari-agent/conf/unix/upgrade_agent_configs.py | 4 ++-- ambari-agent/conf/windows/service_wrapper.py | 1 + ambari-agent/src/main/python/ambari_agent/ActionQueue.py | 1 + ambari-agent/src/main/python/ambari_agent/AgentException.py | 1 + .../python/ambari_agent/BackgroundCommandExecutionHandle.py | 1 + ambari-agent/src/main/python/ambari_agent/ClusterCache.py | 1 - .../main/python/ambari_agent/CommandHooksOrchestrator.py | 1 + .../src/main/python/ambari_agent/ComponentStatusExecutor.py | 1 + .../main/python/ambari_agent/ComponentVersionReporter.py | 1 + ambari-agent/src/main/python/ambari_agent/ExitHelper.py | 1 - ambari-agent/src/main/python/ambari_agent/Facter.py | 1 - ambari-agent/src/main/python/ambari_agent/Grep.py | 1 + .../src/main/python/ambari_agent/HostStatusReporter.py | 1 + ambari-agent/src/main/python/ambari_agent/NetUtil.py | 1 + .../src/main/python/ambari_agent/RecoveryManager.py | 1 + .../src/main/python/ambari_agent/RemoteDebugUtils.py | 1 - .../src/main/python/ambari_agent/StaleAlertsMonitor.py | 1 - ambari-agent/src/main/python/ambari_agent/Utils.py | 1 - .../src/main/python/ambari_agent/alerts/__init__.py | 1 + .../src/main/python/ambari_agent/alerts/collector.py | 6 +----- .../src/main/python/ambari_agent/apscheduler/__init__.py | 1 + .../src/main/python/ambari_agent/apscheduler/events.py | 1 + .../src/main/python/ambari_agent/apscheduler/job.py | 1 + .../python/ambari_agent/apscheduler/jobstores/__init__.py | 1 + .../main/python/ambari_agent/apscheduler/jobstores/base.py | 1 + .../ambari_agent/apscheduler/jobstores/mongodb_store.py | 1 + .../python/ambari_agent/apscheduler/jobstores/ram_store.py | 1 + .../ambari_agent/apscheduler/jobstores/redis_store.py | 1 + .../ambari_agent/apscheduler/jobstores/shelve_store.py | 1 + .../ambari_agent/apscheduler/jobstores/sqlalchemy_store.py | 1 + .../src/main/python/ambari_agent/apscheduler/scheduler.py | 1 + .../src/main/python/ambari_agent/apscheduler/threadpool.py | 1 + .../python/ambari_agent/apscheduler/triggers/__init__.py | 1 + .../ambari_agent/apscheduler/triggers/cron/__init__.py | 1 + .../ambari_agent/apscheduler/triggers/cron/expressions.py | 1 + .../python/ambari_agent/apscheduler/triggers/cron/fields.py | 1 + .../python/ambari_agent/apscheduler/triggers/interval.py | 1 + .../main/python/ambari_agent/apscheduler/triggers/simple.py | 1 + .../src/main/python/ambari_agent/apscheduler/util.py | 1 + ambari-agent/src/main/python/ambari_agent/debug.py | 4 +--- .../python/ambari_agent/listeners/CommandsEventListener.py | 1 - .../ambari_agent/listeners/ConfigurationEventListener.py | 1 - .../ambari_agent/listeners/HostLevelParamsEventListener.py | 1 - .../python/ambari_agent/listeners/MetadataEventListener.py | 1 - .../python/ambari_agent/listeners/TopologyEventListener.py | 1 - .../src/main/python/ambari_agent/models/__init__.py | 1 + .../src/main/python/ambari_agent/models/commands.py | 1 + ambari-agent/src/main/python/ambari_agent/models/hooks.py | 1 + ambari-agent/src/main/python/setup.py | 1 + .../src/test/python/ambari_agent/BaseStompServerTestCase.py | 1 - .../python/ambari_agent/TestCommandHooksOrchestrator.py | 1 + .../src/test/python/ambari_agent/TestKerberosCommon.py | 1 - ambari-agent/src/test/python/ambari_agent/TestMain.py | 1 - .../test/python/resource_management/TestContentSources.py | 1 + .../python/resource_management/TestDataStructureUtils.py | 1 + .../test/python/resource_management/TestDatanodeHelper.py | 1 + .../python/resource_management/TestDirectoryResource.py | 1 + .../src/test/python/resource_management/TestEncryption.py | 1 + .../python/resource_management/TestExecuteHadoopResource.py | 1 + .../test/python/resource_management/TestExecuteResource.py | 1 + .../python/resource_management/TestFcntlBasedProcessLock.py | 1 + .../src/test/python/resource_management/TestFileResource.py | 1 + .../src/test/python/resource_management/TestFileSystem.py | 1 + .../test/python/resource_management/TestGetPathFromUrl.py | 1 + .../test/python/resource_management/TestGroupResource.py | 1 + .../test/python/resource_management/TestLibraryFunctions.py | 1 + .../src/test/python/resource_management/TestLinkResource.py | 1 + .../resource_management/TestMonitorWebserverResource.py | 1 + .../test/python/resource_management/TestPackageResource.py | 1 + .../python/resource_management/TestRepositoryResource.py | 1 + .../test/python/resource_management/TestSecurityCommons.py | 1 + .../test/python/resource_management/TestServiceResource.py | 1 + .../src/test/python/resource_management/TestTarArchive.py | 1 + .../resource_management/TestTemplateConfigResource.py | 1 + .../src/test/python/resource_management/TestUserResource.py | 1 + .../src/test/python/resource_management/TestUtils.py | 1 + ambari-agent/src/test/python/unitTests.py | 2 +- .../src/main/python/ambari_commons/ambari_service.py | 1 + .../src/main/python/ambari_commons/buffered_queue.py | 1 + .../main/python/ambari_commons/kerberos/kerberos_common.py | 1 + .../src/main/python/ambari_commons/kerberos/utils.py | 1 + .../src/main/python/ambari_commons/libs/__init__.py | 1 - .../src/main/python/ambari_commons/libs/ppc64le/__init__.py | 1 - .../src/main/python/ambari_commons/libs/x86_64/__init__.py | 1 - .../src/main/python/ambari_commons/os_family_impl.py | 1 + ambari-common/src/main/python/ambari_commons/os_linux.py | 1 - ambari-common/src/main/python/ambari_commons/os_utils.py | 1 - ambari-common/src/main/python/ambari_commons/os_windows.py | 3 +-- .../src/main/python/ambari_commons/parallel_processing.py | 1 - .../src/main/python/ambari_commons/repo_manager/__init__.py | 1 + .../main/python/ambari_commons/repo_manager/apt_manager.py | 1 + .../main/python/ambari_commons/repo_manager/apt_parser.py | 1 + .../python/ambari_commons/repo_manager/choco_manager.py | 1 + .../python/ambari_commons/repo_manager/generic_manager.py | 1 + .../python/ambari_commons/repo_manager/generic_parser.py | 1 + .../ambari_commons/repo_manager/repo_manager_helper.py | 1 + .../main/python/ambari_commons/repo_manager/yum_manager.py | 1 + .../main/python/ambari_commons/repo_manager/yum_parser.py | 1 + .../python/ambari_commons/repo_manager/zypper_manager.py | 1 + .../python/ambari_commons/repo_manager/zypper_parser.py | 1 + ambari-common/src/main/python/ambari_commons/shell.py | 3 +-- .../src/main/python/ambari_commons/unicode_tolerant_fs.py | 1 + ambari-common/src/main/python/ambari_commons/xml_utils.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/__init__.py | 1 + .../ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py | 1 + .../ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py | 1 + .../ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py | 1 + .../ambari_jinja2/ambari_jinja2/_markupsafe/_native.py | 1 + .../python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py | 1 + .../main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/bccache.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/compiler.py | 1 + .../main/python/ambari_jinja2/ambari_jinja2/constants.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/debug.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/defaults.py | 1 + .../main/python/ambari_jinja2/ambari_jinja2/environment.py | 1 + .../main/python/ambari_jinja2/ambari_jinja2/exceptions.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/ext.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/filters.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/lexer.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/loaders.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/meta.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/nodes.py | 1 + .../main/python/ambari_jinja2/ambari_jinja2/optimizer.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/parser.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/runtime.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/tests.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/__init__.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/api.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/core_tags.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/debug.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/doctests.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/ext.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/filters.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/imports.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/inheritance.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/loader.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/regression.py | 1 + .../ambari_jinja2/ambari_jinja2/testsuite/security.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/tests.py | 1 + .../python/ambari_jinja2/ambari_jinja2/testsuite/utils.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/utils.py | 1 + .../src/main/python/ambari_jinja2/ambari_jinja2/visitor.py | 1 + .../python/ambari_jinja2/custom_fixers/fix_alt_unicode.py | 1 + .../ambari_jinja2/custom_fixers/fix_broken_reraising.py | 1 + .../main/python/ambari_jinja2/custom_fixers/fix_xrange2.py | 1 + .../src/main/python/ambari_jinja2/docs/cache_extension.py | 1 + ambari-common/src/main/python/ambari_jinja2/docs/conf.py | 1 + .../src/main/python/ambari_jinja2/docs/jinjaext.py | 1 + .../src/main/python/ambari_jinja2/examples/basic/cycle.py | 1 + .../main/python/ambari_jinja2/examples/basic/debugger.py | 1 + .../main/python/ambari_jinja2/examples/basic/inheritance.py | 1 + .../src/main/python/ambari_jinja2/examples/basic/test.py | 1 + .../examples/basic/test_filter_and_linestatements.py | 1 + .../python/ambari_jinja2/examples/basic/test_loop_filter.py | 1 + .../main/python/ambari_jinja2/examples/basic/translate.py | 1 + .../src/main/python/ambari_jinja2/examples/bench.py | 1 + .../src/main/python/ambari_jinja2/examples/profile.py | 1 + .../main/python/ambari_jinja2/examples/rwbench/djangoext.py | 1 + .../main/python/ambari_jinja2/examples/rwbench/rwbench.py | 1 + .../python/ambari_jinja2/ext/django2jinja/django2jinja.py | 1 + .../main/python/ambari_jinja2/ext/django2jinja/example.py | 1 + .../src/main/python/ambari_jinja2/ext/djangojinja2.py | 1 + .../src/main/python/ambari_jinja2/ext/inlinegettext.py | 1 + ambari-common/src/main/python/ambari_jinja2/setup.py | 1 + ambari-common/src/main/python/ambari_pbkdf2/__init__.py | 1 + ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py | 2 +- ambari-common/src/main/python/ambari_pyaes/__init__.py | 1 + ambari-common/src/main/python/ambari_pyaes/aes.py | 1 + ambari-common/src/main/python/ambari_pyaes/blockfeeder.py | 1 + ambari-common/src/main/python/ambari_pyaes/util.py | 1 + ambari-common/src/main/python/ambari_simplejson/__init__.py | 1 + .../src/main/python/ambari_simplejson/_speedups/__init__.py | 1 + .../python/ambari_simplejson/_speedups/posix/__init__.py | 1 + .../ambari_simplejson/_speedups/posix/usc2/__init__.py | 1 + .../ambari_simplejson/_speedups/posix/usc4/__init__.py | 1 + .../main/python/ambari_simplejson/_speedups/ppc/__init__.py | 1 + .../main/python/ambari_simplejson/_speedups/win/__init__.py | 1 + .../src/main/python/ambari_simplejson/c_extension.py | 1 + ambari-common/src/main/python/ambari_simplejson/compat.py | 1 + ambari-common/src/main/python/ambari_simplejson/decoder.py | 1 + ambari-common/src/main/python/ambari_simplejson/encoder.py | 1 + ambari-common/src/main/python/ambari_simplejson/errors.py | 1 + .../src/main/python/ambari_simplejson/ordered_dict.py | 1 + ambari-common/src/main/python/ambari_simplejson/raw_json.py | 1 + ambari-common/src/main/python/ambari_simplejson/scanner.py | 1 + ambari-common/src/main/python/ambari_stomp/__init__.py | 1 + ambari-common/src/main/python/ambari_stomp/__main__.py | 1 + .../src/main/python/ambari_stomp/adapter/__init__.py | 1 + .../src/main/python/ambari_stomp/adapter/multicast.py | 1 + .../src/main/python/ambari_stomp/adapter/websocket.py | 1 + ambari-common/src/main/python/ambari_stomp/backward.py | 1 + ambari-common/src/main/python/ambari_stomp/backward2.py | 1 + ambari-common/src/main/python/ambari_stomp/backward3.py | 1 + ambari-common/src/main/python/ambari_stomp/backwardsock.py | 1 + .../src/main/python/ambari_stomp/backwardsock25.py | 1 + .../src/main/python/ambari_stomp/backwardsock26.py | 1 + ambari-common/src/main/python/ambari_stomp/colors.py | 1 + ambari-common/src/main/python/ambari_stomp/connect.py | 1 + ambari-common/src/main/python/ambari_stomp/constants.py | 1 + ambari-common/src/main/python/ambari_stomp/exception.py | 1 + ambari-common/src/main/python/ambari_stomp/listener.py | 1 + ambari-common/src/main/python/ambari_stomp/protocol.py | 1 + ambari-common/src/main/python/ambari_stomp/transport.py | 1 + ambari-common/src/main/python/ambari_stomp/utils.py | 1 + ambari-common/src/main/python/ambari_ws4py/__init__.py | 1 + .../src/main/python/ambari_ws4py/client/__init__.py | 1 + .../src/main/python/ambari_ws4py/client/geventclient.py | 1 + .../src/main/python/ambari_ws4py/client/threadedclient.py | 1 + .../src/main/python/ambari_ws4py/client/tornadoclient.py | 1 + ambari-common/src/main/python/ambari_ws4py/compat.py | 1 + ambari-common/src/main/python/ambari_ws4py/exc.py | 1 + ambari-common/src/main/python/ambari_ws4py/framing.py | 1 + ambari-common/src/main/python/ambari_ws4py/manager.py | 1 + ambari-common/src/main/python/ambari_ws4py/messaging.py | 1 + .../src/main/python/ambari_ws4py/server/__init__.py | 1 + .../src/main/python/ambari_ws4py/server/cherrypyserver.py | 1 + .../src/main/python/ambari_ws4py/server/geventserver.py | 1 + .../src/main/python/ambari_ws4py/server/wsgirefserver.py | 1 + .../src/main/python/ambari_ws4py/server/wsgiutils.py | 1 + ambari-common/src/main/python/ambari_ws4py/streaming.py | 1 + ambari-common/src/main/python/ambari_ws4py/utf8validator.py | 1 + ambari-common/src/main/python/ambari_ws4py/websocket.py | 1 + .../src/main/python/pluggable_stack_definition/__init__.py | 1 + .../python/resource_management/core/providers/packaging.py | 1 + .../resource_management/core/providers/windows/__init__.py | 1 + .../resource_management/core/providers/windows/service.py | 1 + .../resource_management/core/providers/windows/system.py | 1 + .../resource_management/core/resources/jcepolicyinfo.py | 1 + .../src/main/python/resource_management/core/sudo.py | 1 + .../resource_management/libraries/functions/constants.py | 1 - .../libraries/functions/format_jvm_option.py | 3 +-- .../libraries/functions/install_jdbc_driver.py | 1 + .../libraries/functions/install_windows_msi.py | 1 + .../libraries/functions/module_version.py | 1 + .../libraries/functions/mpack_version.py | 1 + .../libraries/functions/reload_windows_env.py | 1 + .../libraries/functions/repository_util.py | 1 + .../libraries/functions/security_commons.py | 1 + .../functions/simulate_perf_cluster_alert_behaviour.py | 1 - .../libraries/functions/solr_cloud_util.py | 1 + .../resource_management/libraries/functions/stack_tools.py | 1 - .../libraries/functions/windows_service_utils.py | 1 + .../libraries/providers/hdfs_resource.py | 1 + .../python/resource_management/libraries/providers/msi.py | 1 + .../libraries/resources/hdfs_resource.py | 2 +- .../python/resource_management/libraries/resources/msi.py | 1 + .../python/resource_management/libraries/script/dummy.py | 1 + .../python/resource_management/libraries/script/hook.py | 1 - .../src/main/python/urlinfo_processor/urlinfo_processor.py | 1 - ambari-common/src/test/python/coilmq/__init__.py | 1 + ambari-common/src/test/python/coilmq/auth/__init__.py | 1 + ambari-common/src/test/python/coilmq/auth/simple.py | 1 + ambari-common/src/test/python/coilmq/config/__init__.py | 1 + ambari-common/src/test/python/coilmq/engine.py | 6 ++---- ambari-common/src/test/python/coilmq/exception.py | 1 + ambari-common/src/test/python/coilmq/protocol/__init__.py | 1 + ambari-common/src/test/python/coilmq/queue.py | 1 + ambari-common/src/test/python/coilmq/scheduler.py | 1 + ambari-common/src/test/python/coilmq/server/__init__.py | 1 + .../src/test/python/coilmq/server/socket_server.py | 1 + ambari-common/src/test/python/coilmq/start.py | 2 +- ambari-common/src/test/python/coilmq/store/__init__.py | 1 + ambari-common/src/test/python/coilmq/store/dbm.py | 1 + ambari-common/src/test/python/coilmq/store/memory.py | 1 + ambari-common/src/test/python/coilmq/store/rds.py | 1 + ambari-common/src/test/python/coilmq/store/sa/__init__.py | 1 + ambari-common/src/test/python/coilmq/store/sa/meta.py | 1 + ambari-common/src/test/python/coilmq/store/sa/model.py | 1 + ambari-common/src/test/python/coilmq/topic.py | 1 + ambari-common/src/test/python/coilmq/util/__init__.py | 1 + ambari-common/src/test/python/coilmq/util/concurrency.py | 1 + ambari-common/src/test/python/coilmq/util/frames.py | 1 + ambari-common/src/test/python/coilmq/util/six.py | 1 + ambari-common/src/test/python/mock/__init__.py | 1 + ambari-common/src/test/python/mock/docs/conf.py | 1 + ambari-common/src/test/python/mock/extendmock.py | 1 + ambari-common/src/test/python/mock/mock.py | 1 + ambari-common/src/test/python/mock/setup.py | 3 +-- ambari-common/src/test/python/mock/tests/__init__.py | 1 + ambari-common/src/test/python/mock/tests/_testwith.py | 1 + ambari-common/src/test/python/mock/tests/support.py | 1 + ambari-common/src/test/python/mock/tests/support_with.py | 3 +-- ambari-common/src/test/python/mock/tests/testcallable.py | 1 + ambari-common/src/test/python/mock/tests/testhelpers.py | 1 + .../src/test/python/mock/tests/testmagicmethods.py | 1 + ambari-common/src/test/python/mock/tests/testmock.py | 1 + ambari-common/src/test/python/mock/tests/testpatch.py | 1 + ambari-common/src/test/python/mock/tests/testsentinel.py | 1 + ambari-common/src/test/python/mock/tests/testwith.py | 1 + ambari-common/src/test/python/only_for_platform.py | 1 + .../test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py | 1 + .../test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py | 1 + .../stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py | 1 + .../stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py | 1 + .../test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py | 1 + .../stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py | 1 + .../stacks/OTHER/1.0/services/HDFS/package/dummy-script.py | 1 + .../src/main/python/ambari-server-state/Configurator.py | 1 + .../src/main/python/ambari-server-state/Entities.py | 1 + ambari-server/src/main/python/ambari-server-state/Main.py | 1 + ambari-server/src/main/python/ambari-server.py | 1 - .../src/main/python/ambari_server/BackupRestore.py | 1 - ambari-server/src/main/python/ambari_server/ambariPath.py | 4 +--- ambari-server/src/main/python/ambari_server/serverUtils.py | 1 - ambari-server/src/main/python/ambari_server/setupMpacks.py | 1 - .../src/main/python/ambari_server/setupSecurity.py | 1 - .../src/main/python/ambari_server/setupTrustedProxy.py | 1 - ambari-server/src/main/python/ambari_server/userInput.py | 1 - ambari-server/src/main/python/azuredb_create_generator.py | 1 - ambari-server/src/main/python/bootstrap.py | 1 - ambari-server/src/main/python/os_check_type.py | 3 +-- ambari-server/src/main/python/setupAgent.py | 1 - .../AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py | 1 + .../3.0.0/package/scripts/command_commons.py | 1 + .../AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py | 1 + .../3.0.0/package/scripts/infra_solr_client.py | 1 + .../AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py | 1 + .../AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py | 1 + .../3.0.0/package/scripts/service_check.py | 1 + .../3.0.0/package/scripts/setup_infra_solr.py | 1 + .../3.0.0/package/scripts/status_params.py | 1 - .../AMBARI_METRICS/3.0.0/package/scripts/ams_service.py | 2 +- .../AMBARI_METRICS/3.0.0/package/scripts/split_points.py | 2 +- .../AMBARI_METRICS/3.0.0/package/scripts/status.py | 1 + .../common-services/AMBARI_METRICS/3.0.0/service_advisor.py | 2 +- ambari-server/src/main/resources/scripts/stack_advisor.py | 1 - .../resources/stack-hooks/after-INSTALL/scripts/hook.py | 1 + .../resources/stack-hooks/after-INSTALL/scripts/params.py | 1 + .../after-INSTALL/scripts/shared_initialization.py | 1 + .../main/resources/stack-hooks/before-ANY/scripts/hook.py | 1 + .../main/resources/stack-hooks/before-ANY/scripts/params.py | 1 + .../stack-hooks/before-ANY/scripts/shared_initialization.py | 1 + .../resources/stack-hooks/before-INSTALL/scripts/hook.py | 1 + .../resources/stack-hooks/before-INSTALL/scripts/params.py | 1 + .../before-INSTALL/scripts/repo_initialization.py | 1 + .../before-INSTALL/scripts/shared_initialization.py | 1 + .../resources/stack-hooks/before-RESTART/scripts/hook.py | 1 + .../resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py | 1 + .../stack-hooks/before-START/scripts/custom_extensions.py | 1 + .../main/resources/stack-hooks/before-START/scripts/hook.py | 1 + .../resources/stack-hooks/before-START/scripts/params.py | 1 + .../before-START/scripts/shared_initialization.py | 1 + .../3.2.0/services/FLINK/package/scripts/flink_client.py | 1 + .../services/FLINK/package/scripts/flink_history_server.py | 2 +- .../3.2.0/services/FLINK/package/scripts/flink_service.py | 1 - .../3.2.0/services/FLINK/package/scripts/setup_flink.py | 1 + .../BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py | 1 - .../package/alerts/alert_datanode_unmounted_data_dir.py | 1 - .../BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py | 1 + .../HDFS/package/scripts/balancer-emulator/hdfs-command.py | 1 - .../BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py | 1 + .../3.2.0/services/HDFS/package/scripts/datanode_upgrade.py | 1 + .../BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py | 1 + .../3.2.0/services/HDFS/package/scripts/hdfs_client.py | 1 + .../3.2.0/services/HDFS/package/scripts/hdfs_datanode.py | 1 + .../3.2.0/services/HDFS/package/scripts/hdfs_namenode.py | 1 + .../3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py | 1 + .../3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py | 1 + .../3.2.0/services/HDFS/package/scripts/install_params.py | 1 + .../3.2.0/services/HDFS/package/scripts/journalnode.py | 1 + .../services/HDFS/package/scripts/journalnode_upgrade.py | 1 + .../BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py | 1 + .../services/HDFS/package/scripts/namenode_ha_state.py | 1 + .../3.2.0/services/HDFS/package/scripts/namenode_upgrade.py | 1 + .../3.2.0/services/HDFS/package/scripts/nfsgateway.py | 1 + .../BIGTOP/3.2.0/services/HDFS/package/scripts/params.py | 1 + .../3.2.0/services/HDFS/package/scripts/params_linux.py | 1 + .../3.2.0/services/HDFS/package/scripts/params_windows.py | 1 + .../3.2.0/services/HDFS/package/scripts/service_check.py | 1 + .../BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py | 1 + .../3.2.0/services/HDFS/package/scripts/status_params.py | 1 + .../BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py | 1 + .../3.2.0/services/HDFS/package/scripts/zkfc_slave.py | 1 + .../package/alerts/alert_hive_interactive_thrift_port.py | 1 - .../services/HIVE/package/scripts/hive_server_upgrade.py | 1 + .../3.2.0/services/HIVE/package/scripts/mysql_utils.py | 3 +-- .../BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py | 1 + .../3.2.0/services/HIVE/package/scripts/webhcat_server.py | 1 + .../3.2.0/services/HIVE/package/scripts/webhcat_service.py | 1 + .../3.2.0/services/KAFKA/package/scripts/kafka_broker.py | 1 + .../stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py | 2 +- .../services/KERBEROS/package/scripts/kerberos_client.py | 1 + .../3.2.0/services/KERBEROS/package/scripts/params.py | 1 + .../services/KERBEROS/package/scripts/service_check.py | 1 + .../services/KERBEROS/package/scripts/status_params.py | 1 + .../BIGTOP/3.2.0/services/SOLR/package/scripts/params.py | 1 + .../3.2.0/services/SOLR/package/scripts/service_check.py | 1 + .../3.2.0/services/SOLR/package/scripts/setup_solr.py | 1 + .../BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py | 1 + .../SPARK/package/scripts/alerts/alert_spark_thrift_port.py | 1 + .../services/SPARK/package/scripts/job_history_server.py | 2 +- .../BIGTOP/3.2.0/services/SPARK/package/scripts/params.py | 2 +- .../3.2.0/services/SPARK/package/scripts/service_check.py | 1 + .../3.2.0/services/SPARK/package/scripts/setup_spark.py | 2 +- .../3.2.0/services/SPARK/package/scripts/spark_client.py | 2 +- .../services/SPARK/package/scripts/spark_thrift_server.py | 2 +- .../3.2.0/services/TEZ/package/scripts/params_windows.py | 1 + .../3.2.0/services/TEZ/package/scripts/pre_upgrade.py | 1 + .../3.2.0/services/TEZ/package/scripts/service_check.py | 1 + .../stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py | 1 + .../BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py | 1 + .../YARN/package/alerts/alert_nodemanagers_summary.py | 1 - .../BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py | 1 + .../YARN/package/scripts/application_timeline_server.py | 1 + .../3.2.0/services/YARN/package/scripts/historyserver.py | 1 + .../services/YARN/package/scripts/mapred_service_check.py | 1 + .../services/YARN/package/scripts/mapreduce2_client.py | 1 + .../3.2.0/services/YARN/package/scripts/nodemanager.py | 1 + .../services/YARN/package/scripts/nodemanager_upgrade.py | 1 + .../3.2.0/services/YARN/package/scripts/params_linux.py | 1 + .../3.2.0/services/YARN/package/scripts/params_windows.py | 1 + .../3.2.0/services/YARN/package/scripts/resourcemanager.py | 1 + .../BIGTOP/3.2.0/services/YARN/package/scripts/service.py | 1 + .../3.2.0/services/YARN/package/scripts/service_check.py | 1 + .../BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py | 1 + .../3.2.0/services/YARN/package/scripts/yarn_client.py | 1 + .../ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py | 1 + .../services/ZEPPELIN/package/scripts/service_check.py | 1 + .../services/ZEPPELIN/package/scripts/status_params.py | 1 + .../3.2.0/services/ZOOKEEPER/package/scripts/__init__.py | 1 + .../3.2.0/services/ZOOKEEPER/package/scripts/params.py | 1 + .../services/ZOOKEEPER/package/scripts/params_linux.py | 1 + .../services/ZOOKEEPER/package/scripts/params_windows.py | 1 + .../services/ZOOKEEPER/package/scripts/service_check.py | 1 + .../3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py | 1 + .../services/ZOOKEEPER/package/scripts/zookeeper_client.py | 1 + .../services/ZOOKEEPER/package/scripts/zookeeper_server.py | 1 + .../services/ZOOKEEPER/package/scripts/zookeeper_service.py | 1 + .../package/alerts/alert_ranger_admin_passwd_check.py | 1 - .../stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py | 2 +- ambari-server/src/test/python/TestAmbariConfiguration.py | 1 + ambari-server/src/test/python/TestAmbariServer.py | 1 + ambari-server/src/test/python/TestBackupRestore.py | 1 + ambari-server/src/test/python/TestBootstrap.py | 1 + ambari-server/src/test/python/TestClusterBlueprint.py | 1 + .../src/test/python/TestComponentVersionMapping.py | 3 +-- ambari-server/src/test/python/TestConfigs.py | 1 + ambari-server/src/test/python/TestExecutionCommand.py | 1 + ambari-server/src/test/python/TestGlobalLock.py | 3 +-- ambari-server/src/test/python/TestMpacks.py | 1 + ambari-server/src/test/python/TestOSCheck.py | 3 +-- ambari-server/src/test/python/TestResourceFilesKeeper.py | 1 + .../src/test/python/TestSensitiveDataEncryption.py | 1 + ambari-server/src/test/python/TestServerClassPath.py | 1 + ambari-server/src/test/python/TestServerUpgrade.py | 1 + ambari-server/src/test/python/TestServerUtils.py | 1 + ambari-server/src/test/python/TestServiceAdvisor.py | 1 + ambari-server/src/test/python/TestSetupAgent.py | 1 + ambari-server/src/test/python/TestSetupSso.py | 1 + ambari-server/src/test/python/TestSetupTrustedProxy.py | 1 + ambari-server/src/test/python/TestStackAdvisor.py | 1 + ambari-server/src/test/python/TestStackFeature.py | 3 +-- ambari-server/src/test/python/TestStackSelect.py | 3 +-- ambari-server/src/test/python/TestUpgradeSummary.py | 3 +-- ambari-server/src/test/python/TestUtils.py | 1 + ambari-server/src/test/python/TestValidateConfigs.py | 1 + ambari-server/src/test/python/TestVersion.py | 1 + ambari-server/src/test/python/TestVersionSelectUtil.py | 1 + .../src/test/python/custom_actions/TestCheckHost.py | 3 +-- .../src/test/python/custom_actions/TestInstallPackages.py | 1 - .../src/test/python/custom_actions/TestRemoveBits.py | 1 - .../test/python/custom_actions/TestRemoveStackVersion.py | 3 +-- .../src/test/python/custom_actions/test_ru_execute_tasks.py | 3 +-- .../test/python/custom_actions/test_stack_select_set_all.py | 3 +-- .../src/test/python/host_scripts/TestAlertUlimit.py | 1 - .../mystack-ambari-mpack-1.0.0.0/hooks/after_install.py | 1 - .../mystack-ambari-mpack-1.0.0.0/hooks/before_install.py | 1 - .../mystack-ambari-mpack-1.0.0.1/hooks/after_install.py | 1 - .../mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py | 1 - .../mystack-ambari-mpack-1.0.0.1/hooks/before_install.py | 1 - .../mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py | 1 - ambari-server/src/test/python/stacks/__init__.py | 1 - .../stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py | 1 - ambari-server/src/test/python/stacks/test_stack_adviser.py | 1 + ambari-server/src/test/python/stacks/utils/__init__.py | 1 - ambari-server/src/test/python/unitTests.py | 1 + .../common-services/HDFS/1.0/package/dummy-script.py | 1 + .../EXT/0.1/services/OOZIE2/package/dummy-script.py | 1 + .../test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py | 1 + .../test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py | 1 + .../stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py | 1 + .../stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py | 1 + .../test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py | 1 + .../stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py | 1 + .../stacks/OTHER/1.0/services/HDFS/package/dummy-script.py | 1 + .../HDP/0.2/services/HDFS/package/dummy-script.py | 1 + .../OTHER/1.0/services/HDFS/package/dummy-script.py | 1 + .../HDP/0.2/services/HDFS/package/dummy-script.py | 1 + .../HDP/0.3/services/HDFS/package/dummy-script.py | 1 + .../HDP/0.4/services/HDFS/package/dummy-script.py | 1 + contrib/addons/test/nagios/plugins/test_sys_logger.py | 2 +- contrib/agent-simulator/cluster.py | 1 + contrib/agent-simulator/config.py | 1 + contrib/agent-simulator/data.py | 1 + contrib/agent-simulator/docker.py | 1 + contrib/agent-simulator/docker_image/__init__.py | 1 + contrib/agent-simulator/docker_image/launcher_agent.py | 1 + contrib/agent-simulator/launcher_ambari_server.py | 1 + contrib/agent-simulator/launcher_cluster.py | 1 + contrib/agent-simulator/launcher_docker.py | 1 + contrib/agent-simulator/launcher_service_server.py | 1 + contrib/agent-simulator/log.py | 1 + contrib/agent-simulator/network/dns_edit.py | 1 + contrib/agent-simulator/vm.py | 1 + .../NIFI/1.0.0/package/scripts/alert_check_nifi.py | 2 +- .../common-services/NIFI/1.0.0/package/scripts/nifi.py | 2 +- .../common-services/NIFI/1.0.0/package/scripts/nifi_ca.py | 2 +- .../NIFI/1.0.0/package/scripts/nifi_ca_util.py | 2 +- .../NIFI/1.0.0/package/scripts/nifi_constants.py | 2 +- .../common-services/NIFI/1.0.0/package/scripts/params.py | 2 +- .../NIFI/1.0.0/package/scripts/service_check.py | 4 ++-- .../NIFI/1.0.0/package/scripts/setup_ranger_nifi.py | 4 ++-- .../NIFI/1.0.0/package/scripts/status_params.py | 2 +- .../src/main/resources/hooks/after_install.py | 3 +-- .../stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py | 1 + .../stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py | 1 + .../hooks/after-INSTALL/scripts/shared_initialization.py | 1 + .../stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py | 1 + .../stacks/HDF/2.0/hooks/before-ANY/scripts/params.py | 1 + .../2.0/hooks/before-ANY/scripts/shared_initialization.py | 1 + .../stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py | 1 + .../stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py | 1 + .../2.0/hooks/before-INSTALL/scripts/repo_initialization.py | 1 + .../hooks/before-INSTALL/scripts/shared_initialization.py | 1 + .../stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py | 1 + .../HDF/2.0/hooks/before-START/files/topology_script.py | 2 +- .../stacks/HDF/2.0/hooks/before-START/scripts/hook.py | 1 + .../stacks/HDF/2.0/hooks/before-START/scripts/params.py | 1 + .../HDF/2.0/hooks/before-START/scripts/rack_awareness.py | 3 +-- .../2.0/hooks/before-START/scripts/shared_initialization.py | 1 + .../addon-services/ONEFS/1.0.0/package/scripts/__init__.py | 1 + .../ONEFS/1.0.0/package/scripts/onefs_client.py | 1 + .../addon-services/ONEFS/1.0.0/package/scripts/params.py | 1 + .../ONEFS/1.0.0/package/scripts/params_linux.py | 1 + .../ONEFS/1.0.0/package/scripts/params_windows.py | 1 + .../ONEFS/1.0.0/package/scripts/service_check.py | 1 + .../ONEFS/1.0.0/package/scripts/status_params.py | 1 + .../resources/addon-services/ONEFS/1.0.0/service_advisor.py | 2 +- .../src/main/tools/hdfs_to_onefs_convert.py | 1 + .../src/test/python/TestServiceAdvisor.py | 1 + .../isilon-onefs-mpack/src/test/python/unitTests.py | 2 +- .../8.0.5/package/scripts/microsoft_r_server.py | 2 +- .../MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py | 1 + .../8.0.5/package/scripts/params_linux.py | 1 + .../8.0.5/package/scripts/params_windows.py | 1 + .../8.0.5/package/scripts/service_check.py | 1 + .../stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py | 1 + .../stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py | 1 + .../hooks/after-INSTALL/scripts/shared_initialization.py | 1 + .../stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py | 1 + .../stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py | 1 + .../2.0/hooks/before-ANY/scripts/shared_initialization.py | 1 + .../stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py | 1 + .../stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py | 1 + .../2.0/hooks/before-INSTALL/scripts/repo_initialization.py | 1 + .../hooks/before-INSTALL/scripts/shared_initialization.py | 1 + .../stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py | 1 + .../ODPi/2.0/hooks/before-START/files/topology_script.py | 2 +- .../stacks/ODPi/2.0/hooks/before-START/scripts/hook.py | 1 + .../stacks/ODPi/2.0/hooks/before-START/scripts/params.py | 1 + .../ODPi/2.0/hooks/before-START/scripts/rack_awareness.py | 3 +-- .../2.0/hooks/before-START/scripts/shared_initialization.py | 1 + .../package/alerts/alert_hive_interactive_thrift_port.py | 5 ++--- .../services/HIVE/package/alerts/alert_hive_metastore.py | 3 +-- .../services/HIVE/package/alerts/alert_hive_thrift_port.py | 3 +-- .../services/HIVE/package/alerts/alert_llap_app_status.py | 5 ++--- .../services/HIVE/package/alerts/alert_webhcat_server.py | 3 +-- .../ODPi/2.0/services/HIVE/package/scripts/__init__.py | 2 +- .../stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/hcat_client.py | 2 +- .../2.0/services/HIVE/package/scripts/hcat_service_check.py | 2 +- .../stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/hive_client.py | 2 +- .../2.0/services/HIVE/package/scripts/hive_interactive.py | 2 +- .../2.0/services/HIVE/package/scripts/hive_metastore.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/hive_server.py | 2 +- .../HIVE/package/scripts/hive_server_interactive.py | 4 ++-- .../services/HIVE/package/scripts/hive_server_upgrade.py | 1 + .../ODPi/2.0/services/HIVE/package/scripts/hive_service.py | 2 +- .../HIVE/package/scripts/hive_service_interactive.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/mysql_server.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/mysql_service.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/mysql_users.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py | 4 ++-- .../stacks/ODPi/2.0/services/HIVE/package/scripts/params.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/params_linux.py | 2 +- .../2.0/services/HIVE/package/scripts/params_windows.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/service_check.py | 4 ++-- .../2.0/services/HIVE/package/scripts/setup_ranger_hive.py | 2 +- .../HIVE/package/scripts/setup_ranger_hive_interactive.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/status_params.py | 2 +- .../ODPi/2.0/services/HIVE/package/scripts/webhcat.py | 1 + .../2.0/services/HIVE/package/scripts/webhcat_server.py | 1 + .../2.0/services/HIVE/package/scripts/webhcat_service.py | 1 + .../services/HIVE/package/scripts/webhcat_service_check.py | 2 +- .../YARN/package/alerts/alert_nodemanager_health.py | 3 +-- .../YARN/package/alerts/alert_nodemanagers_summary.py | 5 ++--- .../package/files/validateYarnComponentStatusWindows.py | 3 +-- .../ODPi/2.0/services/YARN/package/scripts/__init__.py | 1 + .../YARN/package/scripts/application_timeline_server.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/historyserver.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/install_jars.py | 2 +- .../services/YARN/package/scripts/mapred_service_check.py | 1 + .../2.0/services/YARN/package/scripts/mapreduce2_client.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/nodemanager.py | 1 + .../services/YARN/package/scripts/nodemanager_upgrade.py | 1 + .../stacks/ODPi/2.0/services/YARN/package/scripts/params.py | 2 +- .../ODPi/2.0/services/YARN/package/scripts/params_linux.py | 1 + .../2.0/services/YARN/package/scripts/params_windows.py | 1 + .../2.0/services/YARN/package/scripts/resourcemanager.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/service.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/service_check.py | 1 + .../2.0/services/YARN/package/scripts/setup_ranger_yarn.py | 2 +- .../ODPi/2.0/services/YARN/package/scripts/status_params.py | 4 ++-- .../stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py | 1 + .../ODPi/2.0/services/YARN/package/scripts/yarn_client.py | 1 + contrib/nagios-alerts/plugins/ambari_alerts.py | 3 +-- contrib/nagios-alerts/plugins/generate_nagios_objects.py | 3 +-- contrib/version-builder/example.py | 1 + contrib/version-builder/version_builder.py | 1 + dev-support/docker/docker/bin/__init__.py | 1 + dev-support/docker/docker/bin/ambaribuild.py | 2 +- dev-support/docker/docker/bin/test/__init__.py | 1 + dev-support/docker/docker/bin/test/ambaribuild_test.py | 2 +- 628 files changed, 583 insertions(+), 202 deletions(-) diff --git a/ambari-agent/conf/unix/agent-multiplier.py b/ambari-agent/conf/unix/agent-multiplier.py index b6d49bacfbf..ae1e1d0d89e 100644 --- a/ambari-agent/conf/unix/agent-multiplier.py +++ b/ambari-agent/conf/unix/agent-multiplier.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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. diff --git a/ambari-agent/conf/unix/upgrade_agent_configs.py b/ambari-agent/conf/unix/upgrade_agent_configs.py index ae5d7b0a0fd..0f30b983926 100644 --- a/ambari-agent/conf/unix/upgrade_agent_configs.py +++ b/ambari-agent/conf/unix/upgrade_agent_configs.py @@ -1,4 +1,4 @@ -#!/usr/bin/ambari-python-wrap +#!/usr/bin/env ambari-python-wrap ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -56,4 +56,4 @@ else: print("Values are not updated, configs {0} is not found".format(CONFIG_FILE)) else: - print("Values are not updated, backup {0} is not found".format(CONFIG_FILE_BACKUP)) \ No newline at end of file + print("Values are not updated, backup {0} is not found".format(CONFIG_FILE_BACKUP)) diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py index bf6fa7b33ed..fa24d1ec3ac 100644 --- a/ambari-agent/conf/windows/service_wrapper.py +++ b/ambari-agent/conf/windows/service_wrapper.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index f070a21673c..9b1e1d969ef 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/AgentException.py b/ambari-agent/src/main/python/ambari_agent/AgentException.py index d7455f54b0d..6843895a4ce 100644 --- a/ambari-agent/src/main/python/ambari_agent/AgentException.py +++ b/ambari-agent/src/main/python/ambari_agent/AgentException.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py b/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py index 6d55d574345..805eb64a17e 100644 --- a/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py +++ b/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/ClusterCache.py b/ambari-agent/src/main/python/ambari_agent/ClusterCache.py index 23f108fea1a..bf70afc1dc3 100644 --- a/ambari-agent/src/main/python/ambari_agent/ClusterCache.py +++ b/ambari-agent/src/main/python/ambari_agent/ClusterCache.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py index 41a21ea3482..3c232747461 100644 --- a/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py +++ b/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py b/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py index b45aa6b3f79..50b5295274e 100644 --- a/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py b/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py index eb4358b19d6..3e88d2456d1 100644 --- a/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py +++ b/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/ExitHelper.py b/ambari-agent/src/main/python/ambari_agent/ExitHelper.py index bf3b7991439..6f7c3a1e91a 100644 --- a/ambari-agent/src/main/python/ambari_agent/ExitHelper.py +++ b/ambari-agent/src/main/python/ambari_agent/ExitHelper.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py index c83cb79461d..a5bda8d5b3e 100644 --- a/ambari-agent/src/main/python/ambari_agent/Facter.py +++ b/ambari-agent/src/main/python/ambari_agent/Facter.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/Grep.py b/ambari-agent/src/main/python/ambari_agent/Grep.py index 70bc4b9e0b3..014de1fdd74 100644 --- a/ambari-agent/src/main/python/ambari_agent/Grep.py +++ b/ambari-agent/src/main/python/ambari_agent/Grep.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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. diff --git a/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py b/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py index c82fa9bcd31..7bde1c82426 100644 --- a/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py +++ b/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/NetUtil.py b/ambari-agent/src/main/python/ambari_agent/NetUtil.py index 2338a6cf842..16be86a1b6c 100644 --- a/ambari-agent/src/main/python/ambari_agent/NetUtil.py +++ b/ambari-agent/src/main/python/ambari_agent/NetUtil.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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. diff --git a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py index e07d1b617d1..6f3016691c0 100644 --- a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py +++ b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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. diff --git a/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py b/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py index 1e81d465dcf..3b201b8958f 100644 --- a/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py +++ b/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py b/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py index 2d4dde2baa6..652861a1cda 100644 --- a/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py +++ b/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - # 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. diff --git a/ambari-agent/src/main/python/ambari_agent/Utils.py b/ambari-agent/src/main/python/ambari_agent/Utils.py index 256d505cfcf..ada56981062 100644 --- a/ambari-agent/src/main/python/ambari_agent/Utils.py +++ b/ambari-agent/src/main/python/ambari_agent/Utils.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py b/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py index 0a0e1ca9c26..416b098c9ad 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/collector.py b/ambari-agent/src/main/python/ambari_agent/alerts/collector.py index 68fd2dce4ee..4673822f4b6 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/collector.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/collector.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -91,7 +90,4 @@ def alerts(self): self.__buckets.clear() return alerts finally: - self.__lock.release() - - - \ No newline at end of file + self.__lock.release() \ No newline at end of file diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py index 71cc53dbb89..c240920a9f6 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 version_info = (2, 1, 2) version = '.'.join(str(n) for n in version_info[:3]) release = '.'.join(str(n) for n in version_info) diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py index 80bde8e6538..205d039f91c 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 __all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN', 'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED', 'EVENT_JOBSTORE_JOB_ADDED', 'EVENT_JOBSTORE_JOB_REMOVED', diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py index cfc09a2f5b2..6689a7c3494 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Jobs represent scheduled tasks. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py index f0a16ddb61e..c24ef602416 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Abstract base class that provides the interface needed by all job stores. Job store methods are also documented here. diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py index 4aedffa275c..7ac042b38f9 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Stores jobs in a MongoDB database. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py index 60458fbab80..799ffc26b98 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Stores jobs in an array in RAM. Provides no persistence support. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py index 7a3ee0372e5..90062feae6e 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Stores jobs in a Redis database. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py index d1be58f9116..57ec350d60a 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Stores jobs in a file governed by the :mod:`shelve` module. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py index 5b64a35a68c..705ee11883f 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Stores jobs in a database table using SQLAlchemy. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py index 23ba7350b28..a949e9f1d3d 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ This module is the main part of the library. It houses the Scheduler class and related exceptions. diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py index 51eb2864bc1..eaccb2e38c6 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Generic thread pool class. Modeled after Java's ThreadPoolExecutor. Please note that this ThreadPool does *not* fully implement the PEP 3148 diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py index 74a978845bd..6445bd211e8 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from apscheduler.triggers.cron import CronTrigger from apscheduler.triggers.interval import IntervalTrigger from apscheduler.triggers.simple import SimpleTrigger diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py index 9e69f720ff1..f813f299397 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from datetime import date, datetime from apscheduler.triggers.cron.fields import * diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py index b5d2919547c..6c190fe9393 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ This module contains the expressions applicable for CronTrigger's fields. """ diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py index be5e5e33ef9..1c916f99daf 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Fields represent CronTrigger options which map to :class:`~datetime.datetime` fields. diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py index dd16d777a12..230c8c9b141 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from datetime import datetime, timedelta from math import ceil diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py index ea61b3f1e3d..3753e9ae4be 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from apscheduler.util import convert_to_datetime diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py index 9ce531c6551..bb4a1e69de1 100644 --- a/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py +++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ This module contains several handy functions primarily meant for internal use. """ diff --git a/ambari-agent/src/main/python/ambari_agent/debug.py b/ambari-agent/src/main/python/ambari_agent/debug.py index a8ec5e6e95b..9fc9885da83 100644 --- a/ambari-agent/src/main/python/ambari_agent/debug.py +++ b/ambari-agent/src/main/python/ambari_agent/debug.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -47,5 +46,4 @@ def main(): debug_process(pid) if __name__=='__main__': - main() - \ No newline at end of file + main() \ No newline at end of file diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py index 92745ae1786..b21e36e0134 100644 --- a/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py +++ b/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py index dcd39b23013..b908b77f047 100644 --- a/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py +++ b/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py index 25173082fe5..8039b6e82b3 100644 --- a/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py +++ b/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py index f3a3503d774..1504c028ed0 100644 --- a/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py +++ b/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py index 15e622c475c..fc9d5d4246a 100644 --- a/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py +++ b/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/models/__init__.py b/ambari-agent/src/main/python/ambari_agent/models/__init__.py index 53ed4d36c2c..95e26abb273 100644 --- a/ambari-agent/src/main/python/ambari_agent/models/__init__.py +++ b/ambari-agent/src/main/python/ambari_agent/models/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/models/commands.py b/ambari-agent/src/main/python/ambari_agent/models/commands.py index e9ea2c8b0cd..7d6c4d811e7 100644 --- a/ambari-agent/src/main/python/ambari_agent/models/commands.py +++ b/ambari-agent/src/main/python/ambari_agent/models/commands.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/ambari_agent/models/hooks.py b/ambari-agent/src/main/python/ambari_agent/models/hooks.py index f9183bd4945..9ae47c8dfa7 100644 --- a/ambari-agent/src/main/python/ambari_agent/models/hooks.py +++ b/ambari-agent/src/main/python/ambari_agent/models/hooks.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/main/python/setup.py b/ambari-agent/src/main/python/setup.py index 41c2097830b..247f11ceb38 100644 --- a/ambari-agent/src/main/python/setup.py +++ b/ambari-agent/src/main/python/setup.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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. diff --git a/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py b/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py index 44656956936..7e94cd9f324 100644 --- a/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py +++ b/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py b/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py index f16dfbccedb..44fe9af8955 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py +++ b/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py b/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py index aa4858ed046..9297ac368ba 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py +++ b/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/ambari_agent/TestMain.py b/ambari-agent/src/test/python/ambari_agent/TestMain.py index a2422bf7da1..6700934a46b 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestMain.py +++ b/ambari-agent/src/test/python/ambari_agent/TestMain.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestContentSources.py b/ambari-agent/src/test/python/resource_management/TestContentSources.py index b3fcb493d28..92ae59c2706 100644 --- a/ambari-agent/src/test/python/resource_management/TestContentSources.py +++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py b/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py index 406d4135871..7b242b44981 100644 --- a/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py +++ b/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py index 9eb6e90c76b..e6b8408ecf5 100644 --- a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py +++ b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py index 16b1db2869b..2842c7db5b5 100644 --- a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py +++ b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestEncryption.py b/ambari-agent/src/test/python/resource_management/TestEncryption.py index 175fa349f9a..2208bd0bec3 100644 --- a/ambari-agent/src/test/python/resource_management/TestEncryption.py +++ b/ambari-agent/src/test/python/resource_management/TestEncryption.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py index 29387951cfc..44e8245fa6b 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py index 8330e6e44dd..16388700e6f 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py b/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py index 2b0b66360cd..b58d4790161 100644 --- a/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py +++ b/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestFileResource.py b/ambari-agent/src/test/python/resource_management/TestFileResource.py index faba3e296e3..629fbf62e1a 100644 --- a/ambari-agent/src/test/python/resource_management/TestFileResource.py +++ b/ambari-agent/src/test/python/resource_management/TestFileResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestFileSystem.py b/ambari-agent/src/test/python/resource_management/TestFileSystem.py index e2f7ed8c5eb..cd8614a948f 100644 --- a/ambari-agent/src/test/python/resource_management/TestFileSystem.py +++ b/ambari-agent/src/test/python/resource_management/TestFileSystem.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py b/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py index 96744376a58..5a4d978348d 100644 --- a/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py +++ b/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestGroupResource.py b/ambari-agent/src/test/python/resource_management/TestGroupResource.py index efbf89db789..b3c5e901dbd 100644 --- a/ambari-agent/src/test/python/resource_management/TestGroupResource.py +++ b/ambari-agent/src/test/python/resource_management/TestGroupResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py b/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py index 1e635bf249b..2a30e0a62b5 100644 --- a/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py +++ b/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestLinkResource.py b/ambari-agent/src/test/python/resource_management/TestLinkResource.py index 6a1377beb9b..70646208cd9 100644 --- a/ambari-agent/src/test/python/resource_management/TestLinkResource.py +++ b/ambari-agent/src/test/python/resource_management/TestLinkResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py index a982390c553..b16fc716b64 100644 --- a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py +++ b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py index 43d17ab97f2..8f45545add2 100644 --- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py +++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py index bc6343f19bc..d6ab2a565db 100644 --- a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py +++ b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py index b68ce705fbc..24d3cc7d1e1 100644 --- a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py +++ b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestServiceResource.py b/ambari-agent/src/test/python/resource_management/TestServiceResource.py index d4a57435f9e..c7a41c3b87d 100644 --- a/ambari-agent/src/test/python/resource_management/TestServiceResource.py +++ b/ambari-agent/src/test/python/resource_management/TestServiceResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestTarArchive.py b/ambari-agent/src/test/python/resource_management/TestTarArchive.py index 66d8f2e2611..91284b080ea 100644 --- a/ambari-agent/src/test/python/resource_management/TestTarArchive.py +++ b/ambari-agent/src/test/python/resource_management/TestTarArchive.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py b/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py index eb49c8e8857..7976eec77d1 100644 --- a/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py +++ b/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestUserResource.py b/ambari-agent/src/test/python/resource_management/TestUserResource.py index 1c5bcd7192a..02e2f9e8943 100644 --- a/ambari-agent/src/test/python/resource_management/TestUserResource.py +++ b/ambari-agent/src/test/python/resource_management/TestUserResource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/resource_management/TestUtils.py b/ambari-agent/src/test/python/resource_management/TestUtils.py index 0335e3ce1db..78d8a70efeb 100644 --- a/ambari-agent/src/test/python/resource_management/TestUtils.py +++ b/ambari-agent/src/test/python/resource_management/TestUtils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-agent/src/test/python/unitTests.py b/ambari-agent/src/test/python/unitTests.py index 0a6b8cc3aff..7c047566b6d 100644 --- a/ambari-agent/src/test/python/unitTests.py +++ b/ambari-agent/src/test/python/unitTests.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -37,6 +36,7 @@ $(pwd)/ambari-agent/src/test/python/ambari_agent: $(pwd)/ambari-common/src/main/python: $(pwd)/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/files: +$(pwd)/ambari-server/src/test/python: $(pwd)/ambari-agent/src/test/python/resource_management: $(pwd)/ambari-common/src/main/python/ambari_jinja2 """ diff --git a/ambari-common/src/main/python/ambari_commons/ambari_service.py b/ambari-common/src/main/python/ambari_commons/ambari_service.py index 8e7e7aabeb8..d46aa9e9bf6 100644 --- a/ambari-common/src/main/python/ambari_commons/ambari_service.py +++ b/ambari-common/src/main/python/ambari_commons/ambari_service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/buffered_queue.py b/ambari-common/src/main/python/ambari_commons/buffered_queue.py index 23643eff0f7..091bd46b7d8 100644 --- a/ambari-common/src/main/python/ambari_commons/buffered_queue.py +++ b/ambari-common/src/main/python/ambari_commons/buffered_queue.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py b/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py index 9fe23e0a9d3..8cf929af1d1 100644 --- a/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py +++ b/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/kerberos/utils.py b/ambari-common/src/main/python/ambari_commons/kerberos/utils.py index ee2e039909b..f90b8dc97d2 100644 --- a/ambari-common/src/main/python/ambari_commons/kerberos/utils.py +++ b/ambari-common/src/main/python/ambari_commons/kerberos/utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/libs/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/__init__.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-common/src/main/python/ambari_commons/libs/__init__.py +++ b/ambari-common/src/main/python/ambari_commons/libs/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py +++ b/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py +++ b/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/os_family_impl.py b/ambari-common/src/main/python/ambari_commons/os_family_impl.py index 65a502aec5e..53bc67baa3d 100644 --- a/ambari-common/src/main/python/ambari_commons/os_family_impl.py +++ b/ambari-common/src/main/python/ambari_commons/os_family_impl.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/os_linux.py b/ambari-common/src/main/python/ambari_commons/os_linux.py index b7deb1ffc2f..d76e3731653 100644 --- a/ambari-common/src/main/python/ambari_commons/os_linux.py +++ b/ambari-common/src/main/python/ambari_commons/os_linux.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/os_utils.py b/ambari-common/src/main/python/ambari_commons/os_utils.py index 6afcd9308a4..fe5d20ca988 100644 --- a/ambari-common/src/main/python/ambari_commons/os_utils.py +++ b/ambari-common/src/main/python/ambari_commons/os_utils.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py index f14814e213d..062353cf402 100644 --- a/ambari-common/src/main/python/ambari_commons/os_windows.py +++ b/ambari-common/src/main/python/ambari_commons/os_windows.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/parallel_processing.py b/ambari-common/src/main/python/ambari_commons/parallel_processing.py index a2490102bc2..7c4c62ffd3b 100644 --- a/ambari-common/src/main/python/ambari_commons/parallel_processing.py +++ b/ambari-common/src/main/python/ambari_commons/parallel_processing.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py b/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py index f3a540453a7..4f36f252ba2 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py index 81ea855a7ac..71ac3917188 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py index 29f1a655c26..6043c1f31e7 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py index edace06faef..c9b8d5f5e18 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py index 3b6056cc47d..c429fad8df1 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py index 2941646dc84..fd0609a9314 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py b/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py index 91d86a69ba7..b95db5513db 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py index 5fff7ce2921..7a1e5faec9e 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py index b3f3dca8ac1..fb2fa6787d0 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py index 9d76d04833e..a99c63f32e7 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py index 43feabc7974..769dc3dfdb1 100644 --- a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py +++ b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/shell.py b/ambari-common/src/main/python/ambari_commons/shell.py index 883a44dc888..1a19c622211 100644 --- a/ambari-common/src/main/python/ambari_commons/shell.py +++ b/ambari-common/src/main/python/ambari_commons/shell.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py b/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py index 35de4dad74c..4831c466fb6 100644 --- a/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py +++ b/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_commons/xml_utils.py b/ambari-common/src/main/python/ambari_commons/xml_utils.py index 31b2968c545..3c98af18b71 100644 --- a/ambari-common/src/main/python/ambari_commons/xml_utils.py +++ b/ambari-common/src/main/python/ambari_commons/xml_utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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 diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py index d02aab22edc..783d3ff1c0b 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2 diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py index 8dfcb719712..2fd739b5432 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ markupsafe diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py index 724b1340af1..6ab250a5c9d 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2._markupsafe._bundle diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py index 919bf03c509..e9cd4968482 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ markupsafe._constants diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py index 454058cb869..b4afa072804 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ markupsafe._native diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py index d66b4049836..ef2ea884032 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import gc import unittest from ambari_jinja2._markupsafe import Markup, escape, escape_silent diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py index 9cd8400ece6..33212ce1803 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2._stringdefs diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py index e3fb34f6aa1..021b5677753 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.bccache diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py index 74a897265fb..338561f56f9 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.compiler diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py index ec0aafd47f2..1cdedee9c9b 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ jinja.constants diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py index 34788db264a..4593288677c 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.debug diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py index f5ad1774891..550ce4b6dec 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.defaults diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py index 63e0a4d085b..9a9898bdd60 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.environment diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py index 765b834846e..e5ef9bfa67f 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.exceptions diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py index 1750c371b50..1a5421e1a96 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.ext diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py index 23e26f41a04..25674e99a9a 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.filters diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py index e073311dfe7..200551ffdd6 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.lexer diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py index ef9f6cdc459..2a6071e67b4 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.loaders diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py index 3067fcb83ff..b0bdb794163 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.meta diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py index 7bf0393a08a..443e4ecd0b8 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.nodes diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py index b014396afee..b95295ee9b3 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.optimizer diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py index a14c0556042..ab043870e72 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.parser diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py index 1078e23e413..7cbde32dfea 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.runtime diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py index ccc06377dad..53a19e5a84d 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.sandbox diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py index 0793e956f6b..df10b498795 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.tests diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py index f125cffc218..bb71e084dc8 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py index e3c51a22337..01e3442454a 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.api diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py index 37e3c50b65c..b748cf2203c 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.core_tags diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py index 55be94ae736..3226b35c98a 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.debug diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py index 72ddde5d5b4..721a9dada82 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.doctests diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py index 55e9442c36f..de0ce59d1db 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.ext diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py index 18ff197ac07..2af1b081970 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.filters diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py index 10d7d587e9d..24ce0736959 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.imports diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py index 676da825be4..54bec31a6ca 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.inheritance diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py index 6edf31d4bbe..93f2ccf0330 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.lexnparse diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py index 8f574bff47c..009b7b077f7 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.loader diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py index e18113f33f9..20e5b580d37 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.regression diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py index 06ca79209b9..840c93abc66 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.security diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py index 2f7b7922ce7..46789fa5768 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.tests diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py index fd2872e57d2..c9e32bf9367 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.testsuite.utils diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py index 984a9154678..54446e56a69 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.utils diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py index 0561adfa856..25d3bf9b8b7 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py +++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ambari_jinja2.visitor diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py index 96a81c16eb2..f61bebea889 100644 --- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py +++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from lib2to3 import fixer_base from lib2to3.fixer_util import Name, BlankLine diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py index fd0ea6881ee..1fb573d2074 100644 --- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py +++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from lib2to3 import fixer_base, pytree from lib2to3.fixer_util import Name, BlankLine, Name, Attr, ArgList diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py index 5d35e50514a..8ad87ff6751 100644 --- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py +++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from lib2to3 import fixer_base from lib2to3.fixer_util import Name, BlankLine diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py b/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py index d3703e3813e..0212d2420af 100644 --- a/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py +++ b/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import nodes from ambari_jinja2.ext import Extension diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/conf.py b/ambari-common/src/main/python/ambari_jinja2/docs/conf.py index ba90c49a6be..7a494698c44 100644 --- a/ambari-common/src/main/python/ambari_jinja2/docs/conf.py +++ b/ambari-common/src/main/python/ambari_jinja2/docs/conf.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Jinja2 documentation build configuration file, created by diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py b/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py index bdc7afd392a..67f1a1f47b2 100644 --- a/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py +++ b/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Jinja Documentation Extensions diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py index eaf840dcb49..3437cbe372d 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py index 707fe1e7df3..8fc69f5ecbb 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment from ambari_jinja2.loaders import FileSystemLoader diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py index 6b0b81ea93a..306538ef83d 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment from ambari_jinja2.loaders import DictLoader diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py index 5af89d7150c..b0cd24fbfaf 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment from ambari_jinja2.loaders import DictLoader diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py index 52e10c392a3..87b537d4afd 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py index 852add9bf8b..65982603d66 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment tmpl = Environment().from_string("""\ diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py index 9ec5b976cae..35946efbda9 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from ambari_jinja2 import Environment print(Environment(extensions=['ambari_jinja2.i18n.TransExtension']).from_string("""\ diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/bench.py b/ambari-common/src/main/python/ambari_jinja2/examples/bench.py index a61074b9eee..034103b9bcd 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/bench.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/bench.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """\ This benchmark compares some python templating engines with Jinja 2 so that we get a picture of how fast Jinja 2 is for a semi real world diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/profile.py b/ambari-common/src/main/python/ambari_jinja2/examples/profile.py index 4b452277817..20be3de54ce 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/profile.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/profile.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 try: from cProfile import Profile except ImportError: diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py index 9e9fa6cf0d7..94edb4f35dc 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- from rwbench import ROOT from os.path import join diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py index 1d3854ed169..368dbe4ae40 100644 --- a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py +++ b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ RealWorldish Benchmark diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py index 6418b1e2fed..93eb054968c 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py +++ b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Django to Jinja diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py index 2d4ab9add84..06e883f812d 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py +++ b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from django.conf import settings settings.configure(TEMPLATE_DIRS=['templates'], TEMPLATE_DEBUG=True) diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py b/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py index 93c364ecf96..deb6c5e1009 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py +++ b/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ djangoambari_jinja2 diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py b/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py index ba585f3e32d..df09c5af4d0 100644 --- a/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py +++ b/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Inline Gettext diff --git a/ambari-common/src/main/python/ambari_jinja2/setup.py b/ambari-common/src/main/python/ambari_jinja2/setup.py index 7a7c242bc22..4698a7019e9 100644 --- a/ambari-common/src/main/python/ambari_jinja2/setup.py +++ b/ambari-common/src/main/python/ambari_jinja2/setup.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Jinja2 diff --git a/ambari-common/src/main/python/ambari_pbkdf2/__init__.py b/ambari-common/src/main/python/ambari_pbkdf2/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_pbkdf2/__init__.py +++ b/ambari-common/src/main/python/ambari_pbkdf2/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py b/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py index 7ca849242f2..58fd4e79131 100644 --- a/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py +++ b/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: ascii -*- ########################################################################### # pbkdf2 - PKCS#5 v2.0 Password-Based Key Derivation diff --git a/ambari-common/src/main/python/ambari_pyaes/__init__.py b/ambari-common/src/main/python/ambari_pyaes/__init__.py index 5712f794a76..504326bef84 100644 --- a/ambari-common/src/main/python/ambari_pyaes/__init__.py +++ b/ambari-common/src/main/python/ambari_pyaes/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2014 Richard Moore diff --git a/ambari-common/src/main/python/ambari_pyaes/aes.py b/ambari-common/src/main/python/ambari_pyaes/aes.py index 4ebb7eddc37..99527bfa0a3 100644 --- a/ambari-common/src/main/python/ambari_pyaes/aes.py +++ b/ambari-common/src/main/python/ambari_pyaes/aes.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2014 Richard Moore diff --git a/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py b/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py index f4113c37f9b..e775aff2775 100644 --- a/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py +++ b/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2014 Richard Moore diff --git a/ambari-common/src/main/python/ambari_pyaes/util.py b/ambari-common/src/main/python/ambari_pyaes/util.py index 081a37594f5..3a63b0e9ade 100644 --- a/ambari-common/src/main/python/ambari_pyaes/util.py +++ b/ambari-common/src/main/python/ambari_pyaes/util.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2014 Richard Moore diff --git a/ambari-common/src/main/python/ambari_simplejson/__init__.py b/ambari-common/src/main/python/ambari_simplejson/__init__.py index 152ad451ed0..fa52cd97227 100644 --- a/ambari-common/src/main/python/ambari_simplejson/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 r"""JSON (JavaScript Object Notation) is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py +++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_simplejson/c_extension.py b/ambari-common/src/main/python/ambari_simplejson/c_extension.py index 0a0171f9579..00dc6b3188e 100644 --- a/ambari-common/src/main/python/ambari_simplejson/c_extension.py +++ b/ambari-common/src/main/python/ambari_simplejson/c_extension.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_simplejson/compat.py b/ambari-common/src/main/python/ambari_simplejson/compat.py index 5fc14128443..22b63ce4fd3 100644 --- a/ambari-common/src/main/python/ambari_simplejson/compat.py +++ b/ambari-common/src/main/python/ambari_simplejson/compat.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Python 3 compatibility shims """ import sys diff --git a/ambari-common/src/main/python/ambari_simplejson/decoder.py b/ambari-common/src/main/python/ambari_simplejson/decoder.py index 33fcf1cc76a..6bde1b62072 100644 --- a/ambari-common/src/main/python/ambari_simplejson/decoder.py +++ b/ambari-common/src/main/python/ambari_simplejson/decoder.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Implementation of JSONDecoder """ diff --git a/ambari-common/src/main/python/ambari_simplejson/encoder.py b/ambari-common/src/main/python/ambari_simplejson/encoder.py index de14a30d637..5b993dafa7b 100644 --- a/ambari-common/src/main/python/ambari_simplejson/encoder.py +++ b/ambari-common/src/main/python/ambari_simplejson/encoder.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Implementation of JSONEncoder """ diff --git a/ambari-common/src/main/python/ambari_simplejson/errors.py b/ambari-common/src/main/python/ambari_simplejson/errors.py index b97ab1e913f..b1dcdd18268 100644 --- a/ambari-common/src/main/python/ambari_simplejson/errors.py +++ b/ambari-common/src/main/python/ambari_simplejson/errors.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Error classes used by simplejson """ __all__ = ['JSONDecodeError'] diff --git a/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py b/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py index 2c9d213b329..324968005fc 100644 --- a/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py +++ b/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ diff --git a/ambari-common/src/main/python/ambari_simplejson/raw_json.py b/ambari-common/src/main/python/ambari_simplejson/raw_json.py index 2071a70206b..7b65e574acd 100644 --- a/ambari-common/src/main/python/ambari_simplejson/raw_json.py +++ b/ambari-common/src/main/python/ambari_simplejson/raw_json.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Implementation of RawJSON """ diff --git a/ambari-common/src/main/python/ambari_simplejson/scanner.py b/ambari-common/src/main/python/ambari_simplejson/scanner.py index ab399ec1fa5..9813529142e 100644 --- a/ambari-common/src/main/python/ambari_simplejson/scanner.py +++ b/ambari-common/src/main/python/ambari_simplejson/scanner.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """JSON token scanner """ import re diff --git a/ambari-common/src/main/python/ambari_stomp/__init__.py b/ambari-common/src/main/python/ambari_stomp/__init__.py index 3654cee57a0..fee63e158d2 100644 --- a/ambari-common/src/main/python/ambari_stomp/__init__.py +++ b/ambari-common/src/main/python/ambari_stomp/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """stomp.py provides connectivity to a message broker supporting the STOMP protocol. Protocol versions 1.0, 1.1 and 1.2 are supported. diff --git a/ambari-common/src/main/python/ambari_stomp/__main__.py b/ambari-common/src/main/python/ambari_stomp/__main__.py index 2fc1c36ec84..13463073a46 100644 --- a/ambari-common/src/main/python/ambari_stomp/__main__.py +++ b/ambari-common/src/main/python/ambari_stomp/__main__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """The stomp.py command line client (used for testing or simple STOMP command scripting). """ diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py b/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py index 7ae47b0213b..6030cf969ed 100644 --- a/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py +++ b/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py @@ -1,2 +1,3 @@ +#!/usr/bin/env python3 """Non-standard adapters. """ diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py b/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py index 1d3a5172f75..d426ebb427b 100644 --- a/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py +++ b/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Multicast transport for stomp.py. Obviously not a typical message broker, but convenient if you don't have a broker, but still want to use stomp.py diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py index 7b9dd29229b..371f670884f 100644 --- a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py +++ b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/ambari_stomp/backward.py b/ambari-common/src/main/python/ambari_stomp/backward.py index 0d8a0ebb29e..4f9cd7ca180 100644 --- a/ambari-common/src/main/python/ambari_stomp/backward.py +++ b/ambari-common/src/main/python/ambari_stomp/backward.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import sys """Functions to support backwards compatibility. diff --git a/ambari-common/src/main/python/ambari_stomp/backward2.py b/ambari-common/src/main/python/ambari_stomp/backward2.py index 80bf6b886df..b3919806148 100644 --- a/ambari-common/src/main/python/ambari_stomp/backward2.py +++ b/ambari-common/src/main/python/ambari_stomp/backward2.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Python2-specific versions of various functions used by stomp.py """ diff --git a/ambari-common/src/main/python/ambari_stomp/backward3.py b/ambari-common/src/main/python/ambari_stomp/backward3.py index 50d59bc7cf2..4c6db7d8cf7 100644 --- a/ambari-common/src/main/python/ambari_stomp/backward3.py +++ b/ambari-common/src/main/python/ambari_stomp/backward3.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Python3-specific versions of various functions used by stomp.py """ diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock.py b/ambari-common/src/main/python/ambari_stomp/backwardsock.py index ee6d4bf4308..a90a570fee1 100644 --- a/ambari-common/src/main/python/ambari_stomp/backwardsock.py +++ b/ambari-common/src/main/python/ambari_stomp/backwardsock.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Networking functions to support backwards compatibility. Distinct from the backward(2/3) functions to handle ipv6 changes between Python versions 2.5 and 2.6. diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock25.py b/ambari-common/src/main/python/ambari_stomp/backwardsock25.py index 8306d756912..9b4941ee390 100644 --- a/ambari-common/src/main/python/ambari_stomp/backwardsock25.py +++ b/ambari-common/src/main/python/ambari_stomp/backwardsock25.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Python2.5 (and lower) specific versions of various networking (ipv6) functions used by stomp.py """ diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock26.py b/ambari-common/src/main/python/ambari_stomp/backwardsock26.py index 14d86d4ed88..d6c77c6aced 100644 --- a/ambari-common/src/main/python/ambari_stomp/backwardsock26.py +++ b/ambari-common/src/main/python/ambari_stomp/backwardsock26.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Python2.6 (and greater) specific versions of various networking (ipv6) functions used by stomp.py """ diff --git a/ambari-common/src/main/python/ambari_stomp/colors.py b/ambari-common/src/main/python/ambari_stomp/colors.py index 65d24b123f4..e7c7f29c2c4 100644 --- a/ambari-common/src/main/python/ambari_stomp/colors.py +++ b/ambari-common/src/main/python/ambari_stomp/colors.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Color 'constants' used by the command line client. """ diff --git a/ambari-common/src/main/python/ambari_stomp/connect.py b/ambari-common/src/main/python/ambari_stomp/connect.py index e5c78f94be9..46e8fa8e2c2 100644 --- a/ambari-common/src/main/python/ambari_stomp/connect.py +++ b/ambari-common/src/main/python/ambari_stomp/connect.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Main entry point for clients to create a STOMP connection. Provides connection classes for `1.0 `_, diff --git a/ambari-common/src/main/python/ambari_stomp/constants.py b/ambari-common/src/main/python/ambari_stomp/constants.py index 87e8acceda3..fa6a3062f37 100644 --- a/ambari-common/src/main/python/ambari_stomp/constants.py +++ b/ambari-common/src/main/python/ambari_stomp/constants.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """The STOMP command and header name strings. """ diff --git a/ambari-common/src/main/python/ambari_stomp/exception.py b/ambari-common/src/main/python/ambari_stomp/exception.py index 398096bbb0d..34608a468c3 100644 --- a/ambari-common/src/main/python/ambari_stomp/exception.py +++ b/ambari-common/src/main/python/ambari_stomp/exception.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Errors thrown by stomp.py connections. """ diff --git a/ambari-common/src/main/python/ambari_stomp/listener.py b/ambari-common/src/main/python/ambari_stomp/listener.py index 9ed040af64c..3533a24df27 100644 --- a/ambari-common/src/main/python/ambari_stomp/listener.py +++ b/ambari-common/src/main/python/ambari_stomp/listener.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Various listeners for using with stomp.py connections. """ diff --git a/ambari-common/src/main/python/ambari_stomp/protocol.py b/ambari-common/src/main/python/ambari_stomp/protocol.py index 44e83cc1c93..0c763bd2a49 100644 --- a/ambari-common/src/main/python/ambari_stomp/protocol.py +++ b/ambari-common/src/main/python/ambari_stomp/protocol.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Provides the 1.0, 1.1 and 1.2 protocol classes. """ diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py index d79f0940758..7c6a5071554 100644 --- a/ambari-common/src/main/python/ambari_stomp/transport.py +++ b/ambari-common/src/main/python/ambari_stomp/transport.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """Provides the underlying transport functionality (for stomp message transmission) - (mostly) independent from the actual STOMP protocol """ diff --git a/ambari-common/src/main/python/ambari_stomp/utils.py b/ambari-common/src/main/python/ambari_stomp/utils.py index 204fb16fe91..6aaaf166ab6 100644 --- a/ambari-common/src/main/python/ambari_stomp/utils.py +++ b/ambari-common/src/main/python/ambari_stomp/utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """General utility functions. """ diff --git a/ambari-common/src/main/python/ambari_ws4py/__init__.py b/ambari-common/src/main/python/ambari_ws4py/__init__.py index bcd60f998fe..1d824b5008d 100644 --- a/ambari-common/src/main/python/ambari_ws4py/__init__.py +++ b/ambari-common/src/main/python/ambari_ws4py/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Redistribution and use in source and binary forms, with or without diff --git a/ambari-common/src/main/python/ambari_ws4py/client/__init__.py b/ambari-common/src/main/python/ambari_ws4py/client/__init__.py index ce1c98fbbf9..04ac4e4a668 100644 --- a/ambari-common/src/main/python/ambari_ws4py/client/__init__.py +++ b/ambari-common/src/main/python/ambari_ws4py/client/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- from base64 import b64encode from hashlib import sha1 diff --git a/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py b/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py index ace6fcc0153..c80acd37f57 100644 --- a/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py +++ b/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import copy diff --git a/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py b/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py index dc7b2e01ee6..db53f2791cd 100644 --- a/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py +++ b/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import threading diff --git a/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py b/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py index 5f4d67d2d77..290bb8ccd98 100644 --- a/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py +++ b/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import ssl diff --git a/ambari-common/src/main/python/ambari_ws4py/compat.py b/ambari-common/src/main/python/ambari_ws4py/compat.py index 5d19699a06d..c6abc521bed 100644 --- a/ambari-common/src/main/python/ambari_ws4py/compat.py +++ b/ambari-common/src/main/python/ambari_ws4py/compat.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ This compatibility module is inspired by the one found diff --git a/ambari-common/src/main/python/ambari_ws4py/exc.py b/ambari-common/src/main/python/ambari_ws4py/exc.py index bfefea4b60c..6e094288774 100644 --- a/ambari-common/src/main/python/ambari_ws4py/exc.py +++ b/ambari-common/src/main/python/ambari_ws4py/exc.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __all__ = ['WebSocketException', 'FrameTooLargeException', 'ProtocolException', diff --git a/ambari-common/src/main/python/ambari_ws4py/framing.py b/ambari-common/src/main/python/ambari_ws4py/framing.py index a7f62c8c048..baf627388dc 100644 --- a/ambari-common/src/main/python/ambari_ws4py/framing.py +++ b/ambari-common/src/main/python/ambari_ws4py/framing.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- from struct import pack, unpack diff --git a/ambari-common/src/main/python/ambari_ws4py/manager.py b/ambari-common/src/main/python/ambari_ws4py/manager.py index 386f8a27785..fc5a6b57e0c 100644 --- a/ambari-common/src/main/python/ambari_ws4py/manager.py +++ b/ambari-common/src/main/python/ambari_ws4py/manager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ The manager module provides a selected classes to diff --git a/ambari-common/src/main/python/ambari_ws4py/messaging.py b/ambari-common/src/main/python/ambari_ws4py/messaging.py index f8a86adf09a..cce3ce22d6a 100644 --- a/ambari-common/src/main/python/ambari_ws4py/messaging.py +++ b/ambari-common/src/main/python/ambari_ws4py/messaging.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import struct diff --git a/ambari-common/src/main/python/ambari_ws4py/server/__init__.py b/ambari-common/src/main/python/ambari_ws4py/server/__init__.py index e69de29bb2d..e5a0d9b4834 100644 --- a/ambari-common/src/main/python/ambari_ws4py/server/__init__.py +++ b/ambari-common/src/main/python/ambari_ws4py/server/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py b/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py index 98e26d417c4..0459139f850 100644 --- a/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py +++ b/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ WebSocket within CherryPy is a tricky bit since CherryPy is diff --git a/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py b/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py index 239f86c1eb4..cf828e3b596 100644 --- a/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py +++ b/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ WSGI entities to support WebSocket from within gevent. diff --git a/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py b/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py index 3973dd69ac2..358e55b4e69 100644 --- a/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py +++ b/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ Add WebSocket support to the built-in WSGI server diff --git a/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py b/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py index b3eac11b747..121ec432531 100644 --- a/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py +++ b/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- __doc__ = """ This module provides a WSGI application suitable diff --git a/ambari-common/src/main/python/ambari_ws4py/streaming.py b/ambari-common/src/main/python/ambari_ws4py/streaming.py index 5f075082b78..2dfd2965e3c 100644 --- a/ambari-common/src/main/python/ambari_ws4py/streaming.py +++ b/ambari-common/src/main/python/ambari_ws4py/streaming.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import struct from struct import unpack diff --git a/ambari-common/src/main/python/ambari_ws4py/utf8validator.py b/ambari-common/src/main/python/ambari_ws4py/utf8validator.py index 50b19e5d07d..7127ee6a1db 100644 --- a/ambari-common/src/main/python/ambari_ws4py/utf8validator.py +++ b/ambari-common/src/main/python/ambari_ws4py/utf8validator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # coding=utf-8 ############################################################################### diff --git a/ambari-common/src/main/python/ambari_ws4py/websocket.py b/ambari-common/src/main/python/ambari_ws4py/websocket.py index 53f1a438b21..05ed3911f3c 100644 --- a/ambari-common/src/main/python/ambari_ws4py/websocket.py +++ b/ambari-common/src/main/python/ambari_ws4py/websocket.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import socket diff --git a/ambari-common/src/main/python/pluggable_stack_definition/__init__.py b/ambari-common/src/main/python/pluggable_stack_definition/__init__.py index 0a0e1ca9c26..416b098c9ad 100644 --- a/ambari-common/src/main/python/pluggable_stack_definition/__init__.py +++ b/ambari-common/src/main/python/pluggable_stack_definition/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/providers/packaging.py b/ambari-common/src/main/python/resource_management/core/providers/packaging.py index 19f8d465e7a..b59df7ab609 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/packaging.py +++ b/ambari-common/src/main/python/resource_management/core/providers/packaging.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py b/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py index b0b988b18ba..6b1f9423dee 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py +++ b/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py index e6de8236e91..e9b8ebd1358 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py +++ b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/system.py b/ambari-common/src/main/python/resource_management/core/providers/windows/system.py index ee64250b461..a3b7ef95047 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/windows/system.py +++ b/ambari-common/src/main/python/resource_management/core/providers/windows/system.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py b/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py index 4d1c5e225a7..06a7f500b24 100644 --- a/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py +++ b/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/core/sudo.py b/ambari-common/src/main/python/resource_management/core/sudo.py index a5949a075ba..e55f9f3b0b7 100644 --- a/ambari-common/src/main/python/resource_management/core/sudo.py +++ b/ambari-common/src/main/python/resource_management/core/sudo.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py index 7b5fedbaf1d..b149147b067 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py b/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py index 74694e291f6..bc769fd0685 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py @@ -43,5 +43,4 @@ def format_jvm_option(name, default_value): else: return default_value else: - return default_value - \ No newline at end of file + return default_value \ No newline at end of file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py index be77cfd3f5b..a67f45db58d 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py index c878ce7e6a1..228b243ed9f 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py index d8307b8db9a..194161382a2 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py index 4c9816f02f5..0fc836eea54 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py b/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py index d574c56a41d..e913a0a8263 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py index 7fa60cfe775..beb740edd7a 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py index 1f6ed179cdd..b2a2ba63da4 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py b/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py index 1d901aac6d7..7201f0d38f7 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py index 35183e9d1a0..a67bb7e3ca8 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py index c578b1171e1..3cf11b84fa3 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py b/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py index 019a32686da..06ab4de2970 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index a6b0c3d7975..699cc0e90d1 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # !/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py index 8048fa3c46b..103b2597de5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py index 6d44800eafa..1f13e65491f 100644 --- a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/msi.py b/ambari-common/src/main/python/resource_management/libraries/resources/msi.py index 72d06c5d553..e343997a0a9 100644 --- a/ambari-common/src/main/python/resource_management/libraries/resources/msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/resources/msi.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py index a1608ad93cc..745a0c6e063 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/resource_management/libraries/script/hook.py b/ambari-common/src/main/python/resource_management/libraries/script/hook.py index 6a112effffb..dabedb30c7c 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/hook.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/hook.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py b/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py index 4934b79b674..e90dc201431 100644 --- a/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py +++ b/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-common/src/test/python/coilmq/__init__.py b/ambari-common/src/test/python/coilmq/__init__.py index c7010e0a360..e79bc2dda8a 100644 --- a/ambari-common/src/test/python/coilmq/__init__.py +++ b/ambari-common/src/test/python/coilmq/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Top-level CoilMQ package. """ diff --git a/ambari-common/src/test/python/coilmq/auth/__init__.py b/ambari-common/src/test/python/coilmq/auth/__init__.py index dc9b243771b..1942d44ed33 100644 --- a/ambari-common/src/test/python/coilmq/auth/__init__.py +++ b/ambari-common/src/test/python/coilmq/auth/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Authentication providers. diff --git a/ambari-common/src/test/python/coilmq/auth/simple.py b/ambari-common/src/test/python/coilmq/auth/simple.py index b6d8b83f184..518f1158ddf 100644 --- a/ambari-common/src/test/python/coilmq/auth/simple.py +++ b/ambari-common/src/test/python/coilmq/auth/simple.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ A simple config-file based authentication module. """ diff --git a/ambari-common/src/test/python/coilmq/config/__init__.py b/ambari-common/src/test/python/coilmq/config/__init__.py index 37f18368c2d..41d471a3b10 100644 --- a/ambari-common/src/test/python/coilmq/config/__init__.py +++ b/ambari-common/src/test/python/coilmq/config/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Configuration support functionality. diff --git a/ambari-common/src/test/python/coilmq/engine.py b/ambari-common/src/test/python/coilmq/engine.py index 8ac1a6bd717..b8abe5e428d 100644 --- a/ambari-common/src/test/python/coilmq/engine.py +++ b/ambari-common/src/test/python/coilmq/engine.py @@ -1,7 +1,4 @@ - - -from coilmq.protocol import STOMP10 - +#!/usr/bin/env python3 """ Core STOMP server logic, abstracted from socket transport implementation. @@ -21,6 +18,7 @@ """ import logging from collections import defaultdict +from coilmq.protocol import STOMP10 __authors__ = ['"Hans Lellelid" '] __copyright__ = "Copyright 2009 Hans Lellelid" diff --git a/ambari-common/src/test/python/coilmq/exception.py b/ambari-common/src/test/python/coilmq/exception.py index 75f476c4a8a..1910b06bf82 100644 --- a/ambari-common/src/test/python/coilmq/exception.py +++ b/ambari-common/src/test/python/coilmq/exception.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Exception classes used by CoilMQ. diff --git a/ambari-common/src/test/python/coilmq/protocol/__init__.py b/ambari-common/src/test/python/coilmq/protocol/__init__.py index 878f9e0b7f2..7e75f0f1a3a 100644 --- a/ambari-common/src/test/python/coilmq/protocol/__init__.py +++ b/ambari-common/src/test/python/coilmq/protocol/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import abc import uuid import socket diff --git a/ambari-common/src/test/python/coilmq/queue.py b/ambari-common/src/test/python/coilmq/queue.py index 0a1160b2a4d..6a1a52c726e 100644 --- a/ambari-common/src/test/python/coilmq/queue.py +++ b/ambari-common/src/test/python/coilmq/queue.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Queue manager, queue implementation, and supporting classes. diff --git a/ambari-common/src/test/python/coilmq/scheduler.py b/ambari-common/src/test/python/coilmq/scheduler.py index 1a9faf5f6ce..2833064c1a7 100644 --- a/ambari-common/src/test/python/coilmq/scheduler.py +++ b/ambari-common/src/test/python/coilmq/scheduler.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Classes that provide delivery scheduler implementations. diff --git a/ambari-common/src/test/python/coilmq/server/__init__.py b/ambari-common/src/test/python/coilmq/server/__init__.py index 67fe35776bd..5f5587c9ba4 100644 --- a/ambari-common/src/test/python/coilmq/server/__init__.py +++ b/ambari-common/src/test/python/coilmq/server/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Package of available server implementations and shared functionality/interfaces. diff --git a/ambari-common/src/test/python/coilmq/server/socket_server.py b/ambari-common/src/test/python/coilmq/server/socket_server.py index e062de4cc56..1e57d2025c0 100644 --- a/ambari-common/src/test/python/coilmq/server/socket_server.py +++ b/ambari-common/src/test/python/coilmq/server/socket_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ The default/recommended SocketServer-based server implementation. """ diff --git a/ambari-common/src/test/python/coilmq/start.py b/ambari-common/src/test/python/coilmq/start.py index f894bab471f..4dc4662926f 100644 --- a/ambari-common/src/test/python/coilmq/start.py +++ b/ambari-common/src/test/python/coilmq/start.py @@ -1,4 +1,4 @@ -#!python +#!/usr/bin/env python3 """ Entrypoint for starting the application. """ diff --git a/ambari-common/src/test/python/coilmq/store/__init__.py b/ambari-common/src/test/python/coilmq/store/__init__.py index e731960670b..1fed7cf43b0 100644 --- a/ambari-common/src/test/python/coilmq/store/__init__.py +++ b/ambari-common/src/test/python/coilmq/store/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Storage containers for durable queues and (planned) durable topics. """ diff --git a/ambari-common/src/test/python/coilmq/store/dbm.py b/ambari-common/src/test/python/coilmq/store/dbm.py index fea771bb177..01711b51b83 100644 --- a/ambari-common/src/test/python/coilmq/store/dbm.py +++ b/ambari-common/src/test/python/coilmq/store/dbm.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Queue storage module that stores the queue information and frames in a DBM-style database. diff --git a/ambari-common/src/test/python/coilmq/store/memory.py b/ambari-common/src/test/python/coilmq/store/memory.py index 783967c0e05..4c4d9a31e0a 100644 --- a/ambari-common/src/test/python/coilmq/store/memory.py +++ b/ambari-common/src/test/python/coilmq/store/memory.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Queue storage module that uses thread-safe, in-memory data structures. """ diff --git a/ambari-common/src/test/python/coilmq/store/rds.py b/ambari-common/src/test/python/coilmq/store/rds.py index 585619f538e..7f2119126ed 100644 --- a/ambari-common/src/test/python/coilmq/store/rds.py +++ b/ambari-common/src/test/python/coilmq/store/rds.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 try: import redis except ImportError: # pragma: no cover diff --git a/ambari-common/src/test/python/coilmq/store/sa/__init__.py b/ambari-common/src/test/python/coilmq/store/sa/__init__.py index 77c6ce9c566..cdbb4e2e681 100644 --- a/ambari-common/src/test/python/coilmq/store/sa/__init__.py +++ b/ambari-common/src/test/python/coilmq/store/sa/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Queue storage module that uses SQLAlchemy to access queue information and frames in a database. diff --git a/ambari-common/src/test/python/coilmq/store/sa/meta.py b/ambari-common/src/test/python/coilmq/store/sa/meta.py index bf47ca94711..f25e650531b 100644 --- a/ambari-common/src/test/python/coilmq/store/sa/meta.py +++ b/ambari-common/src/test/python/coilmq/store/sa/meta.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Module to hold shared SQLAlchemy state. diff --git a/ambari-common/src/test/python/coilmq/store/sa/model.py b/ambari-common/src/test/python/coilmq/store/sa/model.py index 43e5009d511..6493ae3505a 100644 --- a/ambari-common/src/test/python/coilmq/store/sa/model.py +++ b/ambari-common/src/test/python/coilmq/store/sa/model.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Definition of the datamodel required for SA storage backend. """ diff --git a/ambari-common/src/test/python/coilmq/topic.py b/ambari-common/src/test/python/coilmq/topic.py index d6436be2dc8..32b3bc8c5ce 100644 --- a/ambari-common/src/test/python/coilmq/topic.py +++ b/ambari-common/src/test/python/coilmq/topic.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Non-durable topic support functionality. diff --git a/ambari-common/src/test/python/coilmq/util/__init__.py b/ambari-common/src/test/python/coilmq/util/__init__.py index ae25f742b50..ab8427a2bd7 100644 --- a/ambari-common/src/test/python/coilmq/util/__init__.py +++ b/ambari-common/src/test/python/coilmq/util/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ CoilMQ utility modules. """ diff --git a/ambari-common/src/test/python/coilmq/util/concurrency.py b/ambari-common/src/test/python/coilmq/util/concurrency.py index 0ad54c942d6..96496ca5f59 100644 --- a/ambari-common/src/test/python/coilmq/util/concurrency.py +++ b/ambari-common/src/test/python/coilmq/util/concurrency.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Tools to facilitate developing thread-safe components. """ diff --git a/ambari-common/src/test/python/coilmq/util/frames.py b/ambari-common/src/test/python/coilmq/util/frames.py index a593409a904..3a3580e8b45 100644 --- a/ambari-common/src/test/python/coilmq/util/frames.py +++ b/ambari-common/src/test/python/coilmq/util/frames.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from functools import partial import re import logging diff --git a/ambari-common/src/test/python/coilmq/util/six.py b/ambari-common/src/test/python/coilmq/util/six.py index a0c6c9d7729..b3907cff6e7 100644 --- a/ambari-common/src/test/python/coilmq/util/six.py +++ b/ambari-common/src/test/python/coilmq/util/six.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import sys PY3 = sys.version_info[0] == 3 diff --git a/ambari-common/src/test/python/mock/__init__.py b/ambari-common/src/test/python/mock/__init__.py index 3c61c755b21..cd29cff7ddf 100644 --- a/ambari-common/src/test/python/mock/__init__.py +++ b/ambari-common/src/test/python/mock/__init__.py @@ -1 +1,2 @@ +#!/usr/bin/env python3 __author__ = 'Michael Foord' diff --git a/ambari-common/src/test/python/mock/docs/conf.py b/ambari-common/src/test/python/mock/docs/conf.py index 51ca069900c..f8d22087392 100644 --- a/ambari-common/src/test/python/mock/docs/conf.py +++ b/ambari-common/src/test/python/mock/docs/conf.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Mock documentation build configuration file, created by diff --git a/ambari-common/src/test/python/mock/extendmock.py b/ambari-common/src/test/python/mock/extendmock.py index 0550d9fdda5..f12ce4fae8d 100644 --- a/ambari-common/src/test/python/mock/extendmock.py +++ b/ambari-common/src/test/python/mock/extendmock.py @@ -1 +1,2 @@ +#!/usr/bin/env python3 # merged into mock.py in Mock 0.7 diff --git a/ambari-common/src/test/python/mock/mock.py b/ambari-common/src/test/python/mock/mock.py index 880c1cb0336..211c80c0d42 100644 --- a/ambari-common/src/test/python/mock/mock.py +++ b/ambari-common/src/test/python/mock/mock.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # mock.py # Test tools for mocking and patching. # Copyright (C) 2007-2012 Michael Foord & the mock team diff --git a/ambari-common/src/test/python/mock/setup.py b/ambari-common/src/test/python/mock/setup.py index 1f9ef7c03ab..efa8558b0b3 100644 --- a/ambari-common/src/test/python/mock/setup.py +++ b/ambari-common/src/test/python/mock/setup.py @@ -1,5 +1,4 @@ -#! /usr/bin/env python - +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/__init__.py b/ambari-common/src/test/python/mock/tests/__init__.py index 54ddf2ecc1e..7b7aa4dc683 100644 --- a/ambari-common/src/test/python/mock/tests/__init__.py +++ b/ambari-common/src/test/python/mock/tests/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/_testwith.py b/ambari-common/src/test/python/mock/tests/_testwith.py index 09949d98ebb..4c14a781bfc 100644 --- a/ambari-common/src/test/python/mock/tests/_testwith.py +++ b/ambari-common/src/test/python/mock/tests/_testwith.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/support.py b/ambari-common/src/test/python/mock/tests/support.py index 173585e8a91..8c124def6e8 100644 --- a/ambari-common/src/test/python/mock/tests/support.py +++ b/ambari-common/src/test/python/mock/tests/support.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import sys info = sys.version_info diff --git a/ambari-common/src/test/python/mock/tests/support_with.py b/ambari-common/src/test/python/mock/tests/support_with.py index f787f812810..156d1a9eb77 100644 --- a/ambari-common/src/test/python/mock/tests/support_with.py +++ b/ambari-common/src/test/python/mock/tests/support_with.py @@ -1,5 +1,4 @@ - - +#!/usr/bin/env python3 import sys __all__ = ['nested', 'catch_warnings', 'examine_warnings'] diff --git a/ambari-common/src/test/python/mock/tests/testcallable.py b/ambari-common/src/test/python/mock/tests/testcallable.py index f7dcd5e1dfa..0c973381c23 100644 --- a/ambari-common/src/test/python/mock/tests/testcallable.py +++ b/ambari-common/src/test/python/mock/tests/testcallable.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testhelpers.py b/ambari-common/src/test/python/mock/tests/testhelpers.py index e788da8447e..f570f2889de 100644 --- a/ambari-common/src/test/python/mock/tests/testhelpers.py +++ b/ambari-common/src/test/python/mock/tests/testhelpers.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testmagicmethods.py b/ambari-common/src/test/python/mock/tests/testmagicmethods.py index b8b143af613..09cb986f53c 100644 --- a/ambari-common/src/test/python/mock/tests/testmagicmethods.py +++ b/ambari-common/src/test/python/mock/tests/testmagicmethods.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testmock.py b/ambari-common/src/test/python/mock/tests/testmock.py index c8f65207adb..b5a905a670f 100644 --- a/ambari-common/src/test/python/mock/tests/testmock.py +++ b/ambari-common/src/test/python/mock/tests/testmock.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testpatch.py b/ambari-common/src/test/python/mock/tests/testpatch.py index a0b6878e4c9..66752f3913e 100644 --- a/ambari-common/src/test/python/mock/tests/testpatch.py +++ b/ambari-common/src/test/python/mock/tests/testpatch.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testsentinel.py b/ambari-common/src/test/python/mock/tests/testsentinel.py index 981171a450f..03e0b9ae0b7 100644 --- a/ambari-common/src/test/python/mock/tests/testsentinel.py +++ b/ambari-common/src/test/python/mock/tests/testsentinel.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ diff --git a/ambari-common/src/test/python/mock/tests/testwith.py b/ambari-common/src/test/python/mock/tests/testwith.py index 34529eb9fc4..31f3d6684ac 100644 --- a/ambari-common/src/test/python/mock/tests/testwith.py +++ b/ambari-common/src/test/python/mock/tests/testwith.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import sys if sys.version_info[:2] >= (2, 5): diff --git a/ambari-common/src/test/python/only_for_platform.py b/ambari-common/src/test/python/only_for_platform.py index cc2d13ea59b..6f62c587414 100644 --- a/ambari-common/src/test/python/only_for_platform.py +++ b/ambari-common/src/test/python/only_for_platform.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari-server-state/Configurator.py b/ambari-server/src/main/python/ambari-server-state/Configurator.py index b7c155ebb33..1f40f7764c2 100644 --- a/ambari-server/src/main/python/ambari-server-state/Configurator.py +++ b/ambari-server/src/main/python/ambari-server-state/Configurator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from Entities import * from os.path import exists import xml.dom.minidom diff --git a/ambari-server/src/main/python/ambari-server-state/Entities.py b/ambari-server/src/main/python/ambari-server-state/Entities.py index b9f61c31750..ffb320910c7 100644 --- a/ambari-server/src/main/python/ambari-server-state/Entities.py +++ b/ambari-server/src/main/python/ambari-server-state/Entities.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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 diff --git a/ambari-server/src/main/python/ambari-server-state/Main.py b/ambari-server/src/main/python/ambari-server-state/Main.py index 8bc1146944e..d4d529b9c7c 100644 --- a/ambari-server/src/main/python/ambari-server-state/Main.py +++ b/ambari-server/src/main/python/ambari-server-state/Main.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from Configurator import * diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 320c788ec75..b9a415fa08e 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/BackupRestore.py b/ambari-server/src/main/python/ambari_server/BackupRestore.py index 0ae59eca7d0..c194f6555a3 100644 --- a/ambari-server/src/main/python/ambari_server/BackupRestore.py +++ b/ambari-server/src/main/python/ambari_server/BackupRestore.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/ambariPath.py b/ambari-server/src/main/python/ambari_server/ambariPath.py index 20f460397e1..3265723f3bb 100644 --- a/ambari-server/src/main/python/ambari_server/ambariPath.py +++ b/ambari-server/src/main/python/ambari_server/ambariPath.py @@ -36,6 +36,4 @@ def get(path): Not ambari paths like /var/run/postgresql SHOULD NOT wrapped by this call though. """ #return os.path.realpath(AmbariPath.root_directory + os.sep + path) # realpath won't replace slashes for python2.6 - return re.sub('/+', '/', AmbariPath.root_directory + os.sep + path) - - \ No newline at end of file + return re.sub('/+', '/', AmbariPath.root_directory + os.sep + path) \ No newline at end of file diff --git a/ambari-server/src/main/python/ambari_server/serverUtils.py b/ambari-server/src/main/python/ambari_server/serverUtils.py index bd3a603406c..d48422eb848 100644 --- a/ambari-server/src/main/python/ambari_server/serverUtils.py +++ b/ambari-server/src/main/python/ambari_server/serverUtils.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/setupMpacks.py b/ambari-server/src/main/python/ambari_server/setupMpacks.py index 934aac589e7..4319f84b8ab 100755 --- a/ambari-server/src/main/python/ambari_server/setupMpacks.py +++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/setupSecurity.py b/ambari-server/src/main/python/ambari_server/setupSecurity.py index 514ac92d6e5..370f04272e7 100644 --- a/ambari-server/src/main/python/ambari_server/setupSecurity.py +++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py b/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py index d9fc268e7fa..4b259348c0f 100644 --- a/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py +++ b/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/ambari_server/userInput.py b/ambari-server/src/main/python/ambari_server/userInput.py index 0076c0b24f7..29f916e097a 100644 --- a/ambari-server/src/main/python/ambari_server/userInput.py +++ b/ambari-server/src/main/python/ambari_server/userInput.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/azuredb_create_generator.py b/ambari-server/src/main/python/azuredb_create_generator.py index 4dc2be009fb..fddc77506e8 100755 --- a/ambari-server/src/main/python/azuredb_create_generator.py +++ b/ambari-server/src/main/python/azuredb_create_generator.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index 9136f7ce253..7b3e36bd78e 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/os_check_type.py b/ambari-server/src/main/python/os_check_type.py index 1e74687b018..ce359adbed0 100644 --- a/ambari-server/src/main/python/os_check_type.py +++ b/ambari-server/src/main/python/os_check_type.py @@ -1,5 +1,4 @@ -#!/usr/bin/ambari-python-wrap - +#!/usr/bin/env ambari-python-wrap ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/python/setupAgent.py b/ambari-server/src/main/python/setupAgent.py index 3ee26050eb5..ebc4a2e9c74 100755 --- a/ambari-server/src/main/python/setupAgent.py +++ b/ambari-server/src/main/python/setupAgent.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py index d643f54b518..07b0a534774 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py index fcb343918a5..235a10c7d7b 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py index 2fd43216b09..a4a190b766a 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py index 2ff997fad1e..331c5f6cff6 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py index 832587afd5b..f488f27e7ef 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py index 6bb6c1ce900..3cbc6a21c47 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py index f98379c3404..b7f7d3f3180 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py index 2937d2a58d8..249275f9bd1 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py index 309cf551545..b3997e52d9c 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py index 875211f031f..8f169825711 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py index 906fed07a4d..ea539d14ef1 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py @@ -1,4 +1,4 @@ -# !/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py index 0b24ac03140..ce7dc9b3d66 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py index b64d5f0fd84..bcc20fb8a1a 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py @@ -766,4 +766,4 @@ def validateGrafanaEnvConfigurationsFromHDP206(self, properties, recommendedDefa grafana_pwd_length_item = self.getErrorItem("Grafana password length should be at least 4.") pass validationItems.extend([{"config-name":'metrics_grafana_password', "item": grafana_pwd_length_item }]) - return self.toConfigurationValidationProblems(validationItems, "ams-site") \ No newline at end of file + return self.toConfigurationValidationProblems(validationItems, "ams-site") diff --git a/ambari-server/src/main/resources/scripts/stack_advisor.py b/ambari-server/src/main/resources/scripts/stack_advisor.py index 03896fc2256..edfddae0d68 100755 --- a/ambari-server/src/main/resources/scripts/stack_advisor.py +++ b/ambari-server/src/main/resources/scripts/stack_advisor.py @@ -1,5 +1,4 @@ #!/usr/bin/env ambari-python-wrap - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py index 39546b1f7a8..0597bc3dbfc 100644 --- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py index 6f93a694b7f..91214248a5a 100644 --- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py index 6605d2d349a..e6a79f512b1 100644 --- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py index e9f4b1d08b1..4fbd12205bd 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py index 41751383ecb..03a82594ec9 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py index 0f800a68f3f..fc9966fc186 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py index c4709657f7f..ea3761e4354 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py index 15b51d11c92..ff76483e998 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py index f6f2a1255cb..35396865e19 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py index 6de7300d130..e0dc4736543 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py index f7f4f1c975f..4a0b1e3fb47 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py index 289475bf5c6..bcc038cc985 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py index b01b4de60f9..ee1b6db6dec 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py +++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py index 2f68cb14fb8..7d0fdd3f701 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py index 99781d124ce..f7402827ef6 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py +++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py index efceede77e1..69c2de76440 100644 --- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py index 83316bcac83..3e79fe85fed 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py index 43718f7b61b..825e9a27d16 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py index 8d615c42326..d7d18191360 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py index 2a6d666ea45..d33a1aab1fe 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py index b08beadf259..7d04e3f1062 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py @@ -1,4 +1,3 @@ - #!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py index 422751678ad..b96acf4e862 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py index 92bde08d636..b39080d79a5 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py index c0abb15d727..b64cbcc503e 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py index c1b02961e5b..1a529d28e59 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py index 8b59f4f7d56..31664c97447 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py index f2e96c3e634..a5cb26f4166 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py index 56aa3c16bef..bfc796f720f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py index 5df7afc6652..26944fd3cd9 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py index 9944e24babd..0a047dd9394 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py index 1a0fa23c7c8..e959a95f670 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py index c2bf847c1c3..b3069f4eb64 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py index 1adba1c1529..4e53d82998a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py index bb903933b9d..fd625dd7162 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py index d25c2e46771..3e315188086 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py index 5199b298247..a93075c5e20 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py index 1bd5b7adb09..251394ee877 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py index f16e260fe7b..938820ef13f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py index 838510c2a62..718955c4714 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py index 75a8810fba2..cdd53657057 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py index fe5d3d47fea..1e7a646b94c 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py index 67e005fcc82..7173ff54f73 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py index 3d387b4badc..10423620e09 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py index ef18659d6ba..634b7f46eb6 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py index 5be4199e71d..5ce8598bf5a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py index 6d0921d9a42..3042405e18b 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py index 72ce0359dc4..de03c4f4d58 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py index 3ddd0379e36..aafbe23a4c9 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py index 6db85b8afd3..3828dac9ff3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py @@ -38,5 +38,4 @@ def mysql_configure(): ) # this also will start mysql-server - mysql_users.mysql_adduser() - \ No newline at end of file + mysql_users.mysql_adduser() \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py index 78146e38027..138e91964ef 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py index 50323123ec2..1d2939cb255 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py index d933a6c10b2..2874b7c1d3a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py index 26192df1582..972e9e5411a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py index d1863a73275..9d7360fb015 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py @@ -444,4 +444,4 @@ def validateKAFKAConfigurationsFromHDP30(self, properties, recommendedDefaults, "After Installing Streams Messaging Manager, {0} with be set to {1}." \ "Please restart kafka for changes to take place.".format(prop_name, prop_val))}) - return self.toConfigurationValidationProblems(validationItems, "kafka-broker") \ No newline at end of file + return self.toConfigurationValidationProblems(validationItems, "kafka-broker") diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py index ef0f5d89a9c..a4e91d5d46f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py index a65adf07cd6..9a99725e39c 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py index 1fccb4f3421..c0ff7c7fd73 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py index cfec53d1a86..9e1c275bbe7 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py index 0396bf1cc70..5ecd1c0259f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py index 5562dcc4104..f47fce0886a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py index 5ba810d91a1..cebb233bff5 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py index d0eef6aa4b5..6744fe964f3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py index 97cb1c8e200..0a50d0c28a5 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py index 8fb59a4212b..5873f556f78 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py index 655f8c5142e..f4fbc8f7c34 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py index d6fd3c4862e..74c72252d0f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py index 3097f122b9e..5577211af43 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py index 36917b1e2c6..d53e465a931 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py index 5838fdefbdd..a2760caa56b 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py index f00c6a0828d..f77f174117d 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py index d182efeed21..bc8d2cd3b3a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py index 1490392a906..234037a66d3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py index 0e1d2ecdd1f..de11c3516af 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py index e91ad261e0c..4cd2655fc03 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py index b009de64264..88c79511c8c 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py index 2aec6baa143..a7816d221d3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py index 0c0fe6ad0d2..4217990f953 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py index d91d60a2dd7..517c3033f7c 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py index 234e93174e7..bbb2e4a61b4 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py index 280fc2fe8e5..81ae53dccfb 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py index 22cd8cc7f45..7e90aeeaa42 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py index 92d669274fe..ef2d437b413 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py index 549872c760b..0d5a0445450 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py index 99ad69f2695..f315c5279a3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py index 835ea17815b..276bad38f61 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py index 02bb16ee364..fc3fb0c0034 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py index 92eed757400..2c6ee037ecf 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py index b6a89b4a375..c9d7440be5e 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py index caa80e540f0..79d24436aa7 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py index d796ae9609c..714050d0ff3 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py index 35360c6f9ee..1a5803a930c 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py index b0b988b18ba..6b1f9423dee 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py index fbefec907fe..a0a61e062c5 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py index 2005ff810d8..d931d8a1242 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py index 87d82c20733..031605f58bd 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py index 7ddcfb19977..e2d85edd1f9 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py index d936263e8c2..bd611f1f1b8 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py index 3086e26e47c..5703d6d2726 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py index f0e4ab919a7..a4e0d71625a 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py index 441483f3bf3..1a5934bcbf6 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py index 68297f47f92..e5c2fb6451c 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py index 365b22b10e9..eccd644458e 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py @@ -841,4 +841,4 @@ def validateRangerPasswordConfigurations(self, properties, recommendedDefaults, if not bool(re.search(r'^(?=.*[0-9])(?=.*[a-zA-Z]).{8,}$', password)) or bool(re.search('[\\\`"\']', password)): validationItems.append({"config-name": password_property, "item": self.getNotApplicableItem("Password should be minimum 8 characters with minimum one alphabet and one numeric. Unsupported special characters are \" ' \ `")}) - return self.toConfigurationValidationProblems(validationItems, "ranger-env") \ No newline at end of file + return self.toConfigurationValidationProblems(validationItems, "ranger-env") diff --git a/ambari-server/src/test/python/TestAmbariConfiguration.py b/ambari-server/src/test/python/TestAmbariConfiguration.py index 5125e29eefb..2c969fed81f 100644 --- a/ambari-server/src/test/python/TestAmbariConfiguration.py +++ b/ambari-server/src/test/python/TestAmbariConfiguration.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py index 168bb0ff0e4..c863b211b3c 100644 --- a/ambari-server/src/test/python/TestAmbariServer.py +++ b/ambari-server/src/test/python/TestAmbariServer.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestBackupRestore.py b/ambari-server/src/test/python/TestBackupRestore.py index ab37ca1b6c4..64be6ed48b8 100644 --- a/ambari-server/src/test/python/TestBackupRestore.py +++ b/ambari-server/src/test/python/TestBackupRestore.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestBootstrap.py b/ambari-server/src/test/python/TestBootstrap.py index 5771ee28e40..494ac72e4e3 100644 --- a/ambari-server/src/test/python/TestBootstrap.py +++ b/ambari-server/src/test/python/TestBootstrap.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestClusterBlueprint.py b/ambari-server/src/test/python/TestClusterBlueprint.py index 86f429061a2..46460b3fe33 100644 --- a/ambari-server/src/test/python/TestClusterBlueprint.py +++ b/ambari-server/src/test/python/TestClusterBlueprint.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestComponentVersionMapping.py b/ambari-server/src/test/python/TestComponentVersionMapping.py index 76fd8ed80d0..2721f6000ee 100644 --- a/ambari-server/src/test/python/TestComponentVersionMapping.py +++ b/ambari-server/src/test/python/TestComponentVersionMapping.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestConfigs.py b/ambari-server/src/test/python/TestConfigs.py index a5b51d01acf..3e119e820d8 100644 --- a/ambari-server/src/test/python/TestConfigs.py +++ b/ambari-server/src/test/python/TestConfigs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestExecutionCommand.py b/ambari-server/src/test/python/TestExecutionCommand.py index bd3fef4c98f..6d4307ed478 100644 --- a/ambari-server/src/test/python/TestExecutionCommand.py +++ b/ambari-server/src/test/python/TestExecutionCommand.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestGlobalLock.py b/ambari-server/src/test/python/TestGlobalLock.py index 3851de60a69..4c904e23abc 100644 --- a/ambari-server/src/test/python/TestGlobalLock.py +++ b/ambari-server/src/test/python/TestGlobalLock.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestMpacks.py b/ambari-server/src/test/python/TestMpacks.py index ceb27e99672..31363995280 100644 --- a/ambari-server/src/test/python/TestMpacks.py +++ b/ambari-server/src/test/python/TestMpacks.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestOSCheck.py b/ambari-server/src/test/python/TestOSCheck.py index c2327809b84..e4a6490a36a 100644 --- a/ambari-server/src/test/python/TestOSCheck.py +++ b/ambari-server/src/test/python/TestOSCheck.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py index 6a66bbdd34f..1633c7782d7 100644 --- a/ambari-server/src/test/python/TestResourceFilesKeeper.py +++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestSensitiveDataEncryption.py b/ambari-server/src/test/python/TestSensitiveDataEncryption.py index 194178c77a7..64699341d39 100644 --- a/ambari-server/src/test/python/TestSensitiveDataEncryption.py +++ b/ambari-server/src/test/python/TestSensitiveDataEncryption.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestServerClassPath.py b/ambari-server/src/test/python/TestServerClassPath.py index 90dab2d00a7..907b8098d34 100644 --- a/ambari-server/src/test/python/TestServerClassPath.py +++ b/ambari-server/src/test/python/TestServerClassPath.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestServerUpgrade.py b/ambari-server/src/test/python/TestServerUpgrade.py index c41bd362a8c..e89156e2543 100644 --- a/ambari-server/src/test/python/TestServerUpgrade.py +++ b/ambari-server/src/test/python/TestServerUpgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestServerUtils.py b/ambari-server/src/test/python/TestServerUtils.py index 59c2841f731..9c1fa4ea482 100644 --- a/ambari-server/src/test/python/TestServerUtils.py +++ b/ambari-server/src/test/python/TestServerUtils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestServiceAdvisor.py b/ambari-server/src/test/python/TestServiceAdvisor.py index 6318f0a5757..a42919dd7aa 100644 --- a/ambari-server/src/test/python/TestServiceAdvisor.py +++ b/ambari-server/src/test/python/TestServiceAdvisor.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestSetupAgent.py b/ambari-server/src/test/python/TestSetupAgent.py index 0b33e9faa8a..06e87e8e907 100644 --- a/ambari-server/src/test/python/TestSetupAgent.py +++ b/ambari-server/src/test/python/TestSetupAgent.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestSetupSso.py b/ambari-server/src/test/python/TestSetupSso.py index a1b05448b24..872a80da64d 100644 --- a/ambari-server/src/test/python/TestSetupSso.py +++ b/ambari-server/src/test/python/TestSetupSso.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestSetupTrustedProxy.py b/ambari-server/src/test/python/TestSetupTrustedProxy.py index cfdfa716537..949719ef9ac 100644 --- a/ambari-server/src/test/python/TestSetupTrustedProxy.py +++ b/ambari-server/src/test/python/TestSetupTrustedProxy.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestStackAdvisor.py b/ambari-server/src/test/python/TestStackAdvisor.py index ea0f85d31df..a6af1cb24f5 100644 --- a/ambari-server/src/test/python/TestStackAdvisor.py +++ b/ambari-server/src/test/python/TestStackAdvisor.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestStackFeature.py b/ambari-server/src/test/python/TestStackFeature.py index 8e584b1109e..d6d3a87e762 100644 --- a/ambari-server/src/test/python/TestStackFeature.py +++ b/ambari-server/src/test/python/TestStackFeature.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestStackSelect.py b/ambari-server/src/test/python/TestStackSelect.py index 462d3a04d5c..01b7e8a3611 100644 --- a/ambari-server/src/test/python/TestStackSelect.py +++ b/ambari-server/src/test/python/TestStackSelect.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestUpgradeSummary.py b/ambari-server/src/test/python/TestUpgradeSummary.py index e2bc2c52862..673faf74b74 100644 --- a/ambari-server/src/test/python/TestUpgradeSummary.py +++ b/ambari-server/src/test/python/TestUpgradeSummary.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestUtils.py b/ambari-server/src/test/python/TestUtils.py index f1eabf8c013..98ebe39c702 100644 --- a/ambari-server/src/test/python/TestUtils.py +++ b/ambari-server/src/test/python/TestUtils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestValidateConfigs.py b/ambari-server/src/test/python/TestValidateConfigs.py index f26f22927a1..f2e81410386 100644 --- a/ambari-server/src/test/python/TestValidateConfigs.py +++ b/ambari-server/src/test/python/TestValidateConfigs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestVersion.py b/ambari-server/src/test/python/TestVersion.py index c42ea4a5fb3..3ae85146abe 100644 --- a/ambari-server/src/test/python/TestVersion.py +++ b/ambari-server/src/test/python/TestVersion.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py b/ambari-server/src/test/python/TestVersionSelectUtil.py index ed7549f055b..e3489af5ac3 100644 --- a/ambari-server/src/test/python/TestVersionSelectUtil.py +++ b/ambari-server/src/test/python/TestVersionSelectUtil.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/TestCheckHost.py b/ambari-server/src/test/python/custom_actions/TestCheckHost.py index c01183ba06f..044c7febfcf 100644 --- a/ambari-server/src/test/python/custom_actions/TestCheckHost.py +++ b/ambari-server/src/test/python/custom_actions/TestCheckHost.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py index cebf1e80361..b3981260a29 100644 --- a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py +++ b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/TestRemoveBits.py b/ambari-server/src/test/python/custom_actions/TestRemoveBits.py index 9f375d4afb3..66b1e2bf51b 100644 --- a/ambari-server/src/test/python/custom_actions/TestRemoveBits.py +++ b/ambari-server/src/test/python/custom_actions/TestRemoveBits.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py b/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py index 4f0076c7e54..30e5fdb29d8 100644 --- a/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py +++ b/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py index f77a95b9926..730083c08c4 100644 --- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py +++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py b/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py index 591c6d5bb40..53fc392d53b 100644 --- a/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py +++ b/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py @@ -1,5 +1,4 @@ -# !/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py b/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py index a6785bdcc4a..cc4cafad4b8 100644 --- a/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py +++ b/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py +++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/stacks/__init__.py b/ambari-server/src/test/python/stacks/__init__.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/stacks/__init__.py +++ b/ambari-server/src/test/python/stacks/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py b/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py index 91a7c5bdee5..6443034794f 100644 --- a/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py +++ b/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/stacks/test_stack_adviser.py b/ambari-server/src/test/python/stacks/test_stack_adviser.py index f7a16bc88e2..7b2224f395e 100644 --- a/ambari-server/src/test/python/stacks/test_stack_adviser.py +++ b/ambari-server/src/test/python/stacks/test_stack_adviser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/stacks/utils/__init__.py b/ambari-server/src/test/python/stacks/utils/__init__.py index 280aaf81b7d..f98787116dd 100644 --- a/ambari-server/src/test/python/stacks/utils/__init__.py +++ b/ambari-server/src/test/python/stacks/utils/__init__.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py index 8c0d59a1575..450e67cb09a 100644 --- a/ambari-server/src/test/python/unitTests.py +++ b/ambari-server/src/test/python/unitTests.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py b/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py +++ b/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py b/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py +++ b/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py +++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/addons/test/nagios/plugins/test_sys_logger.py b/contrib/addons/test/nagios/plugins/test_sys_logger.py index 08339e30fd8..b63058eb62b 100644 --- a/contrib/addons/test/nagios/plugins/test_sys_logger.py +++ b/contrib/addons/test/nagios/plugins/test_sys_logger.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # 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. diff --git a/contrib/agent-simulator/cluster.py b/contrib/agent-simulator/cluster.py index 832f5ae6135..af17bc1c177 100644 --- a/contrib/agent-simulator/cluster.py +++ b/contrib/agent-simulator/cluster.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/config.py b/contrib/agent-simulator/config.py index 8d673400772..7188e42b48f 100644 --- a/contrib/agent-simulator/config.py +++ b/contrib/agent-simulator/config.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/data.py b/contrib/agent-simulator/data.py index b469f331b13..e74539347e4 100644 --- a/contrib/agent-simulator/data.py +++ b/contrib/agent-simulator/data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/docker.py b/contrib/agent-simulator/docker.py index 0dd38c0690c..858f7e53f08 100644 --- a/contrib/agent-simulator/docker.py +++ b/contrib/agent-simulator/docker.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/docker_image/__init__.py b/contrib/agent-simulator/docker_image/__init__.py index 67bb99de4d7..031d1982e53 100644 --- a/contrib/agent-simulator/docker_image/__init__.py +++ b/contrib/agent-simulator/docker_image/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/docker_image/launcher_agent.py b/contrib/agent-simulator/docker_image/launcher_agent.py index 1d3c87d6788..ea4e609000f 100644 --- a/contrib/agent-simulator/docker_image/launcher_agent.py +++ b/contrib/agent-simulator/docker_image/launcher_agent.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/launcher_ambari_server.py b/contrib/agent-simulator/launcher_ambari_server.py index a722bdb9c57..a76ebada6e4 100644 --- a/contrib/agent-simulator/launcher_ambari_server.py +++ b/contrib/agent-simulator/launcher_ambari_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/launcher_cluster.py b/contrib/agent-simulator/launcher_cluster.py index d43291ac3fa..91d3ceab8f6 100644 --- a/contrib/agent-simulator/launcher_cluster.py +++ b/contrib/agent-simulator/launcher_cluster.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/launcher_docker.py b/contrib/agent-simulator/launcher_docker.py index 42943fa723d..9ce667ad0b9 100644 --- a/contrib/agent-simulator/launcher_docker.py +++ b/contrib/agent-simulator/launcher_docker.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/launcher_service_server.py b/contrib/agent-simulator/launcher_service_server.py index 8a77b82261b..0d19fbcdd9f 100644 --- a/contrib/agent-simulator/launcher_service_server.py +++ b/contrib/agent-simulator/launcher_service_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/log.py b/contrib/agent-simulator/log.py index b8c87ad534f..825188b4697 100644 --- a/contrib/agent-simulator/log.py +++ b/contrib/agent-simulator/log.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/network/dns_edit.py b/contrib/agent-simulator/network/dns_edit.py index 237654a9f54..3c766ada429 100644 --- a/contrib/agent-simulator/network/dns_edit.py +++ b/contrib/agent-simulator/network/dns_edit.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/agent-simulator/vm.py b/contrib/agent-simulator/vm.py index 9c49eca3e30..86f7946b53c 100644 --- a/contrib/agent-simulator/vm.py +++ b/contrib/agent-simulator/vm.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py index d74c676b54f..5dc4d33c152 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py index 6936dce7534..0c958092876 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py index bc343e4e3b1..8f8d618af13 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py index 20ef81ce6ee..2fd7b613bb7 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py index 632a4733de9..f7faef88fe4 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py index def8f45a6d1..b59823e1ed5 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py index 535592f7d6f..5e6c32b0216 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -72,4 +72,4 @@ def check_nifi_portal(url): raise Fail("Error connecting to {0}. Reason - Timeout".format(url)) if __name__ == "__main__": - NifiServiceCheck().execute() \ No newline at end of file + NifiServiceCheck().execute() diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py index 91a68852554..890ffb32e3c 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -65,4 +65,4 @@ def setup_ranger_nifi(upgrade_type=None): File(os.path.join(params.nifi_config_dir, 'ranger-policymgr-ssl.xml'), owner=params.nifi_user, group=params.nifi_group, mode=0400) else: - Logger.info('Ranger admin not installed') \ No newline at end of file + Logger.info('Ranger admin not installed') diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py index 9748661c3fd..65130d8c968 100755 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py index 8f0743b10d8..6cc1e765b16 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py index 8bae9e689e7..7395731b53a 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py index d4dc349ef58..e5113898423 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py index 18014b640eb..6969f3057fb 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py index c34be0b1edf..87edbe5a65f 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py index 6d518f1db28..61e04881b67 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py index e8e8b08ad7a..ee8770bef05 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py index ce17776b204..1c960378272 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py index 6193c11c22a..304cfdd15fd 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py index c37c6bdbf1b..0e22228330b 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py index f07aea50697..f10499dd583 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py index 14b9d990583..42f81db0925 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py index e026ba77378..449fd7d19c8 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py index f21e4b1f80d..f16a3a3b226 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py index 77df21f275e..a0c3194111e 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py index 548f0519145..5029d1d3c76 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py index 01e55c0a64d..013816560e5 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py index 35de4bb1d7a..ec4a97c676d 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py index b8ae3def9a3..ceb93d5c234 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py index 838510c2a62..718955c4714 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py index b0433bd605b..ee36fdc9046 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py index 8587c49ad09..1a11fa728bf 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py index 4c92866cd02..78998032ea5 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py index 466c2af66e7..fb9cd7dc055 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py index 37d1a008e04..c58f67204d1 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py @@ -143,4 +143,4 @@ def getServiceConfigurationsValidationItems(self, configs, recommendedDefaults, validation_errors.extend(self.toConfigurationValidationProblems(HdfsSite(services).validate(), 'hdfs-site')) except KeyError as e: self.logger.info('Cannot get OneFS properties from config. KeyError: %s' % e) - return validation_errors \ No newline at end of file + return validation_errors diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py b/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py index e07843dfa7a..d35c5136448 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py b/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py index 26714b39542..a77bbb0e4df 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py b/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py index 03bc923a8d6..e26708cf755 100644 --- a/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py +++ b/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py index 223cbd8871a..ba2671d90d3 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py index aa207979f1c..9654dba6e11 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py index 71f17b66643..e9023026a33 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py index 3eca213611d..940ae20f0e9 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py index 57b668180e8..5ee7d93ea8e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py index 8bae9e689e7..7395731b53a 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py index bb041782350..ba3af73ed70 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py index 9fe45273e54..a39074afaca 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py index c34be0b1edf..87edbe5a65f 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py index 554408587ad..2e46770a96b 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py index 1a7d21a35a3..49c846f6085 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py index ce17776b204..1c960378272 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py index 6193c11c22a..304cfdd15fd 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py index a35dce757ee..32355da0299 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py index 1609050409d..2eff237af0c 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py index 14b9d990583..42f81db0925 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py index e026ba77378..449fd7d19c8 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py index f21e4b1f80d..f16a3a3b226 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py index d8debdf6a78..1bb39961de9 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py index 548f0519145..5029d1d3c76 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py index 01e55c0a64d..013816560e5 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py index 69171608850..30bf7484e39 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -213,4 +212,4 @@ def execute(configurations={}, parameters={}, host_name=None): @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def execute(configurations={}, parameters={}, host_name=None): - pass \ No newline at end of file + pass diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py index e02ed5a7536..bb40d1e1226 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py index 32da1cc79bd..ff79df06bfa 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py index 095be3f9346..e3fd21ba3e4 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -296,4 +295,4 @@ def make_valid_json(output): scanned_output = '\n'.join(splits) llap_app_info = json.loads(scanned_output) - return llap_app_info \ No newline at end of file + return llap_app_info diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py index c9575c00e22..788df82facb 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py index 5561e1087b2..152033a3be5 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py index 5e2c709c8c7..b1a26084ed4 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py index b37698e9cf0..d8feb04c665 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py index 07b40955f57..607260f8d8d 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py index 3ef600957e3..1e535e37f87 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py index 55cf61ab688..a109bcff807 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py index 6009cb6f836..29777b9e5df 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py index a69460e82e3..cba2a06bb00 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py index 6aeaf803e6c..4bbeeb89864 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py index beb1220c72b..c8bea6cc485 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -531,4 +531,4 @@ def status(self, env): pass if __name__ == "__main__": - HiveServerInteractive().execute() \ No newline at end of file + HiveServerInteractive().execute() diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py index 9aa3d96983d..cac175c0a4b 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py index 05b395dfab5..987f5b1db43 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py index eaf95ad5dbc..b035b7bcdfb 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py index 851dc02c416..07c9a2a5d83 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py index 8b98ed1d59f..b34917e5fd0 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py index c023548093f..818bc6db5cf 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py index 5006b56c4e9..57cf2fbabdc 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -32,4 +32,4 @@ def mysql_configure(): # this also will start mysql-server mysql_users.mysql_adduser() - \ No newline at end of file + diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py index f10a3f39975..d192c55ef2b 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py index ea386be953b..43fae80b4a9 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py index 880fdb567bf..30eb4d25bec 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py index 1836d0f3ce8..956b7bc64c5 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -187,4 +187,4 @@ def check_llap(self, env, kinit_cmd, address, port, key, hive_auth="NOSASL", tra logoutput=True) if __name__ == "__main__": - HiveServiceCheck().execute() \ No newline at end of file + HiveServiceCheck().execute() diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py index 81a4e3e80cc..b732528719a 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py index 0b5d5dbed06..5bd5efa018a 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py index a7b2e3fbc29..e4d4952fe4b 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py index fe3f34a2b55..42c7f517a06 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py index ee9087d6efe..28ffa8e7c88 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py index c24db4c2ff4..2a9276d0650 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py index 8e80d4868a6..7b2eb926811 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py index d7159e4eb03..eff631b99df 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py index adf27ecc303..e2c8ae7302a 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -216,4 +215,4 @@ def find_value_in_jmx(data_dict, jmx_property, query): raise Exception("Unable to find {0} in JSON from {1} ".format(jmx_property, query)) json_data = jmx_prop_list_item - return json_data[jmx_property] \ No newline at end of file + return json_data[jmx_property] diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py index 5e2b4d91196..ff403c4a105 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py index 35de4bb1d7a..ec4a97c676d 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py index e3a81cf04b4..d037cea0295 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py index f933e917257..cbc6a74cc23 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py index 44015bfb28b..36e3e8f7186 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py index 5fc498d558d..6991812bac3 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py index 8de9d566af9..1d8210ec4bd 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py index 4f3eecb23a5..0141bf69233 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py index 1c886f94067..30abb59c386 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py index 073e84f5e25..b6c84bb5f0b 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py index 7db9ea9e4ee..eb725de877c 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py index cac93ee1215..fea6c2fc80d 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py index 12c279a8d97..bf23d687051 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py index b1179b9bda5..fb723085c3e 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py index daa8e7e25ab..c21999e4a27 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py index 6ea7f82775e..2907120644d 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py index c2e9d92a046..828b488151a 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -58,4 +58,4 @@ kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) security_enabled = config['configurations']['cluster-env']['security_enabled'] -stack_name = default("/hostLevelParams/stack_name", None) \ No newline at end of file +stack_name = default("/hostLevelParams/stack_name", None) diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py index a6cc6fa27ad..6fb149ae84e 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py index 5cd2e69f6a6..23ccacf2ed1 100755 --- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py +++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/nagios-alerts/plugins/ambari_alerts.py b/contrib/nagios-alerts/plugins/ambari_alerts.py index 182bf3d39b5..63f4791e96b 100644 --- a/contrib/nagios-alerts/plugins/ambari_alerts.py +++ b/contrib/nagios-alerts/plugins/ambari_alerts.py @@ -1,5 +1,4 @@ -#!/usr/bin/python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/nagios-alerts/plugins/generate_nagios_objects.py b/contrib/nagios-alerts/plugins/generate_nagios_objects.py index 6c00402bbd4..f7c40018dcf 100644 --- a/contrib/nagios-alerts/plugins/generate_nagios_objects.py +++ b/contrib/nagios-alerts/plugins/generate_nagios_objects.py @@ -1,5 +1,4 @@ -#!/usr/bin/python - +#!/usr/bin/env python3 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/version-builder/example.py b/contrib/version-builder/example.py index 8f87981ad3c..fac6fa102ec 100644 --- a/contrib/version-builder/example.py +++ b/contrib/version-builder/example.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/contrib/version-builder/version_builder.py b/contrib/version-builder/version_builder.py index 2abf6170f69..a4ab02a84e0 100644 --- a/contrib/version-builder/version_builder.py +++ b/contrib/version-builder/version_builder.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/dev-support/docker/docker/bin/__init__.py b/dev-support/docker/docker/bin/__init__.py index fac912ea71f..0d211fc1427 100755 --- a/dev-support/docker/docker/bin/__init__.py +++ b/dev-support/docker/docker/bin/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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 diff --git a/dev-support/docker/docker/bin/ambaribuild.py b/dev-support/docker/docker/bin/ambaribuild.py index 7cadb2f3e63..e613190359f 100755 --- a/dev-support/docker/docker/bin/ambaribuild.py +++ b/dev-support/docker/docker/bin/ambaribuild.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # coding: utf-8 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dev-support/docker/docker/bin/test/__init__.py b/dev-support/docker/docker/bin/test/__init__.py index fac912ea71f..0d211fc1427 100755 --- a/dev-support/docker/docker/bin/test/__init__.py +++ b/dev-support/docker/docker/bin/test/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # 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 diff --git a/dev-support/docker/docker/bin/test/ambaribuild_test.py b/dev-support/docker/docker/bin/test/ambaribuild_test.py index a324f5fe9e2..79b638177dc 100755 --- a/dev-support/docker/docker/bin/test/ambaribuild_test.py +++ b/dev-support/docker/docker/bin/test/ambaribuild_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # coding: utf-8 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From e050e18e5a5aac613526f5b104acb666ebaf74ea Mon Sep 17 00:00:00 2001 From: zrain <2296342883@qq.com> Date: Wed, 7 Aug 2024 09:06:28 +0800 Subject: [PATCH 05/23] feat: fix test failed (#3805) --- ambari-web/test/views/main/service/info/metrics_view_test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ambari-web/test/views/main/service/info/metrics_view_test.js b/ambari-web/test/views/main/service/info/metrics_view_test.js index 3c49044b6e8..558091182ec 100644 --- a/ambari-web/test/views/main/service/info/metrics_view_test.js +++ b/ambari-web/test/views/main/service/info/metrics_view_test.js @@ -214,17 +214,16 @@ describe('App.MainServiceInfoMetricsView', function() { mock.sortable.restore(); }); - it("MutationObserver callback should be called", function() { + it("MutationObserver callback should be called", function(done) { view.makeSortable('#widget_layout'); const callback = function () { - expect(true).to.be.true; expect(document.querySelector('#widget_layout')).to.not.be.null; observer.disconnect(); done(); }; const observer = new MutationObserver(callback); const body = document.body; - observer.observe(body, { childList: true }); + observer.observe(body, { childList: true, subtree: true }); const elementWidget = document.createElement('div'); elementWidget.id='widget_layout'; body.appendChild(elementWidget); From 15035e40b7849adf9e01bc233fd292a48ac33317 Mon Sep 17 00:00:00 2001 From: LiJie20190102 <53458004+LiJie20190102@users.noreply.github.com> Date: Wed, 7 Aug 2024 09:48:56 +0800 Subject: [PATCH 06/23] =?UTF-8?q?AMBARI-26111:=20Adjust=20code=20sequence?= =?UTF-8?q?=20in=20=E2=80=98ambari-agent/src/main/python/ambari=5Fagent/In?= =?UTF-8?q?itializerModule.py=E2=80=99=20to=20prevent=20code=20error=20(#3?= =?UTF-8?q?806)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: lijie0203 --- ambari-agent/src/main/python/ambari_agent/InitializerModule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-agent/src/main/python/ambari_agent/InitializerModule.py b/ambari-agent/src/main/python/ambari_agent/InitializerModule.py index c256a8ddf58..182b078885f 100644 --- a/ambari-agent/src/main/python/ambari_agent/InitializerModule.py +++ b/ambari-agent/src/main/python/ambari_agent/InitializerModule.py @@ -91,8 +91,8 @@ def init(self): self.stale_alerts_monitor = StaleAlertsMonitor(self) self.server_responses_listener = ServerResponsesListener(self) self.file_cache = FileCache(self.config) - self.customServiceOrchestrator = CustomServiceOrchestrator(self) self.hooks_orchestrator = HooksOrchestrator(self) + self.customServiceOrchestrator = CustomServiceOrchestrator(self) self.recovery_manager = RecoveryManager(self) self.commandStatuses = CommandStatusDict(self) From 5093e24f2c7e1bbc15a3a8c369536343f9d6dd2d Mon Sep 17 00:00:00 2001 From: Ananya Singh Date: Fri, 9 Aug 2024 10:55:16 +0530 Subject: [PATCH 07/23] Initial setup for Router: Included all the changes required for router installation and start. This PR also takes care of multiple router configurations (#3804) Co-authored-by: ananysin <=ananysin@visa.com> --- .../3.2.0/properties/stack_packages.json | 12 + .../HDFS/configuration/hdfs-rbf-site.xml | 771 ++++++++++++++++++ .../BIGTOP/3.2.0/services/HDFS/kerberos.json | 26 + .../BIGTOP/3.2.0/services/HDFS/metainfo.xml | 46 ++ .../HDFS/package/scripts/dfsrouter.py | 143 ++++ .../services/HDFS/package/scripts/hdfs.py | 9 + .../HDFS/package/scripts/hdfs_router.py | 91 +++ .../HDFS/package/scripts/params_linux.py | 33 + .../services/HDFS/package/scripts/utils.py | 16 + 9 files changed, 1147 insertions(+) create mode 100644 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml create mode 100644 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py create mode 100644 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json index a050d4c5ef4..3025e610758 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json @@ -83,6 +83,18 @@ "hadoop-hdfs-namenode" ] }, + "ROUTER": { + "STACK-SELECT-PACKAGE": "hadoop-hdfs-dfsrouter", + "INSTALL": [ + "hadoop-hdfs-dfsrouter" + ], + "PATCH": [ + "hadoop-hdfs-dfsrouter" + ], + "STANDARD": [ + "hadoop-hdfs-dfsrouter" + ] + }, "JOURNALNODE": { "STACK-SELECT-PACKAGE": "hadoop-hdfs-journalnode", "INSTALL": [ diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml new file mode 100644 index 00000000000..6088b511122 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml @@ -0,0 +1,771 @@ + + + + + + + dfs.federation.router.rpc.enable + true + + boolean + + + If true, the RPC service to handle client requests in the router is + enabled. + + + + + + dfs.federation.router.rpc-address + 0.0.0.0:20010 + + RPC address that handles all clients requests. + The value of this property will take the form of router-host1:rpc-port. + + + + + + dfs.federation.router.rpc-bind-host + 0.0.0.0 + + The actual address the RPC server will bind to. If this optional address is + set, it overrides only the hostname portion of + dfs.federation.router.rpc-address. This is useful for making the name node + listen on all interfaces by setting it to 0.0.0.0. + + + + + + dfs.federation.router.handler.count + 10 + + int + + + The number of server threads for the router to handle RPC requests from + clients. + + + + + + dfs.federation.router.handler.queue.size + 100 + + int + + + The size of the queue for the number of handlers to handle RPC client requests. + + + + + + dfs.federation.router.reader.count + 1 + + int + + + The number of readers for the router to handle RPC client requests. + + + + + + dfs.federation.router.reader.queue.size + 100 + + int + + + The size of the queue for the number of readers for the router to handle RPC client requests. + + + + + + dfs.federation.router.connection.creator.queue-size + 100 + + int + + + Size of async connection creator queue. + + + + + + dfs.federation.router.connection.pool-size + 1 + + int + + + Size of the pool of connections from the router to namenodes. + + + + + + dfs.federation.router.connection.min-active-ratio + 0.5f + + Minimum active ratio of connections from the router to namenodes. + + + + + + dfs.federation.router.connection.clean.ms + 10000 + + int + + + Time interval, in milliseconds, to check if the connection pool should + remove unused connections. + + + + + + dfs.federation.router.connection.pool.clean.ms + 60000 + + int + + + Time interval, in milliseconds, to check if the connection manager should + remove unused connection pools. + + + + + + dfs.federation.router.metrics.enable + true + + boolean + + + If the metrics in the router are enabled. + + + + + + + dfs.federation.router.dn-report.time-out + 1000 + + int + + + Time out, in milliseconds for getDatanodeReport. + + + + + + dfs.federation.router.dn-report.cache-expire + 10s + + Expiration time in seconds for datanodereport. + + + + + + dfs.federation.router.metrics.class + org.apache.hadoop.hdfs.server.federation.metrics.FederationRPCPerformanceMonitor + + Class to monitor the RPC system in the router. It must implement the + RouterRpcMonitor interface. + + + + + + dfs.federation.router.admin.enable + true + + boolean + + + If true, the RPC admin service to handle client requests in the router is + enabled. + + + + + + dfs.federation.router.admin-address + 0.0.0.0:8111 + + RPC address that handles the admin requests. + The value of this property will take the form of router-host1:rpc-port. + + + + + + dfs.federation.router.admin-bind-host + 0.0.0.0 + + The actual address the RPC admin server will bind to. If this optional + address is set, it overrides only the hostname portion of + dfs.federation.router.admin-address. This is useful for making the name + node listen on all interfaces by setting it to 0.0.0.0. + + + + + + dfs.federation.router.admin.handler.count + 1 + + int + + + The number of server threads for the router to handle RPC requests from + admin. + + + + + + dfs.federation.router.http-address + 0.0.0.0:50071 + + HTTP address that handles the web requests to the Router. + The value of this property will take the form of router-host1:http-port. + + + + + + dfs.federation.router.http-bind-host + 0.0.0.0 + + The actual address the HTTP server will bind to. If this optional + address is set, it overrides only the hostname portion of + dfs.federation.router.http-address. This is useful for making the name + node listen on all interfaces by setting it to 0.0.0.0. + + + + + + dfs.federation.router.https-address + 0.0.0.0:50072 + + HTTPS address that handles the web requests to the Router. + The value of this property will take the form of router-host1:https-port. + + + + + + dfs.federation.router.https-bind-host + 0.0.0.0 + + The actual address the HTTPS server will bind to. If this optional + address is set, it overrides only the hostname portion of + dfs.federation.router.https-address. This is useful for making the name + node listen on all interfaces by setting it to 0.0.0.0. + + + + + + dfs.federation.router.http.enable + true + + boolean + + + If the HTTP service to handle client requests in the router is enabled. + + + + + + dfs.federation.router.file.resolver.client.class + org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver + + Class to resolve files to subclusters. To enable multiple subclusters for a mount point, + set to org.apache.hadoop.hdfs.server.federation.resolver.MultipleDestinationMountTableResolver. + + + + + + dfs.federation.router.namenode.resolver.client.class + org.apache.hadoop.hdfs.server.federation.resolver.MembershipNamenodeResolver + + Class to resolve the namenode for a subcluster. + + + + + + dfs.federation.router.store.enable + true + + boolean + + + If true, the Router connects to the State Store. + + + + + + dfs.federation.router.store.serializer + org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreSerializerPBImpl + + Class to serialize State Store records. + + + + + + dfs.federation.router.store.driver.class + org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZooKeeperImpl + + Class to implement the State Store. There are three implementation classes currently + being supported: + org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreFileImpl, + org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreFileSystemImpl and + org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZooKeeperImpl. + These implementation classes use the local file, filesystem and ZooKeeper as a backend respectively. + By default it uses the ZooKeeper as the default State Store. + + + + + + dfs.federation.router.store.connection.test + 60000 + + int + + + How often to check for the connection to the State Store in milliseconds. + + + + + + dfs.federation.router.cache.ttl + 1m + + How often to refresh the State Store caches in milliseconds. This setting + supports multiple time unit suffixes as described in + dfs.heartbeat.interval. If no suffix is specified then milliseconds is + assumed. + + + + + + dfs.federation.router.store.membership.expiration + 300000 + + int + + + Expiration time in milliseconds for a membership record. + + + + + + dfs.federation.router.store.membership.expiration.deletion + -1 + + int + + + Deletion time in milliseconds for a membership record. If an expired + membership record exists beyond this time, it will be deleted. If this + value is negative, the deletion is disabled. + + + + + + dfs.federation.router.heartbeat.enable + true + + boolean + + + If true, the Router heartbeats into the State Store. + + + + + + dfs.federation.router.heartbeat.interval + 5000 + + int + + + How often the Router should heartbeat into the State Store in milliseconds. + + + + + + dfs.federation.router.heartbeat-state.interval + 5s + + How often the Router should heartbeat its state into the State Store in + milliseconds. This setting supports multiple time unit suffixes as + described in dfs.federation.router.quota-cache.update.interval. + + + + + + dfs.federation.router.namenode.heartbeat.enable + true + + boolean + + + If true, get namenode heartbeats and send into the State Store. + If not explicitly specified takes the same value as for + dfs.federation.router.heartbeat.enable. + + + + + + dfs.federation.router.store.router.expiration + 5m + + Expiration time in milliseconds for a router state record. This setting + supports multiple time unit suffixes as described in + dfs.federation.router.quota-cache.update.interval. + + + + + + dfs.federation.router.store.router.expiration.deletion + -1 + + int + + + Deletion time in milliseconds for a router state record. If an expired + router state record exists beyond this time, it will be deleted. If this + value is negative, the deletion is disabled. + + + + + + dfs.federation.router.safemode.enable + true + + boolean + + + + + + + + dfs.federation.router.safemode.extension + 30s + + Time after startup that the Router is in safe mode. This setting + supports multiple time unit suffixes as described in + dfs.heartbeat.interval. If no suffix is specified then milliseconds is + assumed. + + + + + + dfs.federation.router.safemode.expiration + 3m + + Time without being able to reach the State Store to enter safe mode. This + setting supports multiple time unit suffixes as described in + dfs.heartbeat.interval. If no suffix is specified then milliseconds is + assumed. + + + + + + dfs.federation.router.monitor.localnamenode.enable + true + + boolean + + + If true, the Router should monitor the namenode in the local machine. + + + + + + dfs.federation.router.mount-table.max-cache-size + 10000 + + int + + + Maximum number of mount table cache entries to have. + By default, remove cache entries if we have more than 10k. + + + + + + dfs.federation.router.mount-table.cache.enable + true + + boolean + + + Set to true to enable mount table cache (Path to Remote Location cache). + Disabling the cache is recommended when a large amount of unique paths are queried. + + + + + + dfs.federation.router.quota.enable + false + + boolean + + + Set to true to enable quota system in Router. When it's enabled, setting + or clearing sub-cluster's quota directly is not recommended since Router + Admin server will override sub-cluster's quota with global quota. + + + + + + dfs.federation.router.quota-cache.update.interval + 60s + + Interval time for updating quota usage cache in Router. + This property is used only if the value of + dfs.federation.router.quota.enable is true. + This setting supports multiple time unit suffixes as described + in dfs.heartbeat.interval. If no suffix is specified then milliseconds + is assumed. + + + + + + dfs.federation.router.client.thread-size + 32 + + int + + + Max threads size for the RouterClient to execute concurrent + requests. + + + + + + dfs.federation.router.client.retry.max.attempts + 3 + + int + + + Max retry attempts for the RouterClient talking to the Router. + + + + + + dfs.federation.router.client.reject.overload + false + + boolean + + + Set to true to reject client requests when we run out of RPC client + threads. + + + + + + dfs.federation.router.client.allow-partial-listing + true + + boolean + + + If the Router can return a partial list of files in a multi-destination mount point when one of the subclusters is unavailable. + True may return a partial list of files if a subcluster is down. + False will fail the request if one is unavailable. + + + + + + dfs.federation.router.client.mount-status.time-out + 1s + + Set a timeout for the Router when listing folders containing mount + points. In this process, the Router checks the mount table and then it + checks permissions in the subcluster. After the time out, we return the + default values. + + + + + + dfs.federation.router.connect.max.retries.on.timeouts + 0 + + int + + + Maximum number of retries for the IPC Client when connecting to the + subclusters. By default, it doesn't let the IPC retry and the Router + handles it. + + + + + + dfs.federation.router.connect.timeout + 2s + + Time out for the IPC client connecting to the subclusters. This should be + short as the Router has knowledge of the state of the Routers. + + + + + + + dfs.federation.router.mount-table.cache.update + true + + boolean + + Set true to enable MountTableRefreshService. This service + updates mount table cache immediately after adding, modifying or + deleting the mount table entries. If this service is not enabled + mount table cache are refreshed periodically by + StateStoreCacheUpdateService + + + + + + dfs.federation.router.mount-table.cache.update.timeout + 1m + This property defines how long to wait for all the + admin servers to finish their mount table cache update. This setting + supports multiple time unit suffixes as described in + dfs.federation.router.safemode.extension. + + + + + + dfs.federation.router.mount-table.cache.update.client.max.time + 5m + Remote router mount table cache is updated through + RouterClient(RPC call). To improve performance, RouterClient + connections are cached but it should not be kept in cache forever. + This property defines the max time a connection can be cached. This + setting supports multiple time unit suffixes as described in + dfs.federation.router.safemode.extension. + + + + + + dfs.federation.router.secret.manager.class + org.apache.hadoop.hdfs.server.federation.router.security.token.ZKDelegationTokenSecretManagerImpl + + Class to implement state store to delegation tokens. + Default implementation uses zookeeper as the backend to store delegation tokens. + + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json index 2ba6c636649..98b059eb352 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json @@ -146,6 +146,32 @@ } ] }, + { + "name": "ROUTER", + "identities": [ + { + "name": "dfsrouter_dr", + "principal": { + "value": "router/_HOST@${realm}", + "type" : "service", + "configuration": "hdfs-rbf-site/dfs.federation.router.kerberos.principal", + "local_username" : "${hadoop-env/hdfs_user}" + }, + "keytab": { + "file": "${keytab_dir}/dr.service.keytab", + "owner": { + "name": "${hadoop-env/hdfs_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "hdfs-rbf-site/dfs.federation.router.keytab.file" + } + } + ] + }, { "name": "SECONDARY_NAMENODE", "identities": [ diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml index a62758ea8ac..6c1dbb56398 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml @@ -223,6 +223,52 @@ + + ROUTER + Router + SLAVE + 0+ + true + true + router + + + PYTHON + 1800 + + + + hdfs_router + true + + + hdfs_audit + + + + + HDFS/HDFS_CLIENT + host + + true + + + + + hdfs-rbf-site + + + + DECOMMISSION + + + PYTHON + 600 + + + + + JOURNALNODE JournalNode diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py new file mode 100644 index 00000000000..15d04936c90 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py @@ -0,0 +1,143 @@ +""" +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 sys +import os +import json +import tempfile +import hashlib +from datetime import datetime +import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. + +from ambari_commons import constants + +from resource_management.libraries.resources.xml_config import XmlConfig + +from resource_management.libraries.script.script import Script +from resource_management.core.resources.system import Execute, File +from resource_management.core import shell +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import upgrade_summary +from resource_management.libraries.functions.constants import Direction +from resource_management.libraries.functions.format import format +from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop +from resource_management.libraries.functions.security_commons import build_expectations, \ + cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \ + FILE_TYPE_XML + +from resource_management.core.exceptions import Fail +from resource_management.core.shell import as_user +from resource_management.core.logger import Logger + + +from ambari_commons.os_family_impl import OsFamilyImpl +from ambari_commons import OSConst + +from hdfs_router import router + + +from hdfs import hdfs, reconfig +import hdfs_rebalance +from utils import initiate_safe_zkfc_failover, get_hdfs_binary, get_dfsrouteradmin_base_command +from resource_management.libraries.functions.namenode_ha_utils import get_hdfs_cluster_id_from_jmx + +# The hash algorithm to use to generate digests/hashes +HASH_ALGORITHM = hashlib.sha224 + +class Router(Script): + + def get_hdfs_binary(self): + """ + Get the name or path to the hdfs binary depending on the component name. + """ + return get_hdfs_binary("hadoop-hdfs-dfsrouter") + + def install(self, env): + import params + env.set_params(params) + self.install_packages(env) + self.configure(env) + + def configure(self, env): + import params + env.set_params(params) + hdfs("router") + hdfs_binary = self.get_hdfs_binary() + router(action="configure", hdfs_binary=hdfs_binary, env=env) + XmlConfig("hdfs-site.xml", + conf_dir=params.hadoop_conf_dir, + configurations=params.router_hdfs_site, + configuration_attributes=params.config['configurationAttributes']['hdfs-site'], + mode=0o644, + owner=params.hdfs_user, + group=params.user_group + ) + XmlConfig("core-site.xml", + conf_dir=params.hadoop_conf_dir, + configurations=params.router_core_site, + configuration_attributes=params.config['configurationAttributes']['core-site'], + mode=0o644, + owner=params.hdfs_user, + group=params.user_group + ) + + def save_configs(self, env): + import params + env.set_params(params) + hdfs() + + def reload_configs(self, env): + import params + env.set_params(params) + Logger.info("RELOAD CONFIGS") + reconfig("router", params.router_address) + + def start(self, env, upgrade_type=None): + import params + env.set_params(params) + self.configure(env) + hdfs_binary = self.get_hdfs_binary() + router(action="start", hdfs_binary=hdfs_binary, env=env) + + def stop(self, env, upgrade_type=None): + import params + env.set_params(params) + hdfs_binary = self.get_hdfs_binary() + router(action="stop", hdfs_binary=hdfs_binary, env=env) + + def status(self, env): + import status_params + env.set_params(status_params) + router(action="status", env=env) + + def get_log_folder(self): + import params + return params.hdfs_log_dir + + def get_user(self): + import params + return params.hdfs_user + + def get_pid_files(self): + import status_params + return [status_params.router_pid_file] + +def _print(line): + sys.stdout.write(line) + sys.stdout.flush() + +if __name__ == "__main__": + Router().execute() \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py index 31664c97447..93bd8f0c9e4 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py @@ -130,6 +130,15 @@ def hdfs(name=None): group=params.user_group ) + XmlConfig("hdfs-rbf-site.xml", + conf_dir=params.hadoop_conf_dir, + configurations=params.config['configurations']['hdfs-rbf-site'], + configuration_attributes=params.config['configurationAttributes']['hdfs-rbf-site'], + mode=0o644, + owner=params.hdfs_user, + group=params.user_group + ) + XmlConfig("core-site.xml", conf_dir=params.hadoop_conf_dir, configurations=params.config['configurations']['core-site'], diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py new file mode 100644 index 00000000000..a4064925a29 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py @@ -0,0 +1,91 @@ +""" +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 os.path +import time + +from ambari_commons import constants + +from resource_management.core import shell +from resource_management.core.source import Template +from resource_management.core.resources.system import File, Execute, Directory +from resource_management.core.resources.service import Service +from resource_management.libraries.functions.decorator import retry +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions.check_process_status import check_process_status +from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop +from resource_management.libraries.functions import Direction, upgrade_summary +from resource_management.libraries.functions.namenode_ha_utils import get_name_service_by_hostname +from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config +from ambari_commons import OSCheck, OSConst +from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl +from utils import get_dfsrouteradmin_base_command +from utils import set_up_zkfc_security + +if OSCheck.is_windows_family(): + from resource_management.libraries.functions.windows_service_utils import check_windows_service_status + +from resource_management.core.exceptions import Fail +from resource_management.core.logger import Logger + +from utils import service, safe_zkfc_op, is_previous_fs_image +from setup_ranger_hdfs import setup_ranger_hdfs, create_ranger_audit_hdfs_directories + + +@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) +def router(action=None, hdfs_binary=None, env=None): + + if action is None: + raise Fail('"action" parameter is required for function router().') + + if action in ["start", "stop"] and hdfs_binary is None: + raise Fail('"hdfs_binary" parameter is required for function router().') + + if action == "configure": + import params + generate_logfeeder_input_config('hdfs', Template("input.config-hdfs.json.j2", extra_imports=[default])) + # set up failover / secure zookeper ACLs, this feature is supported from VDP 2.6 ownwards + set_up_zkfc_security(params) + elif action == "start": + import params + service( + action="start", + name="dfsrouter", + user=params.hdfs_user, + create_pid_dir=True, + create_log_dir=True + ) + + if params.security_enabled: + Execute(format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name}"), + user = params.hdfs_user) + + name_service = get_name_service_by_hostname(params.hdfs_site, params.hostname) + ensure_safemode_off = True + + elif action == "stop": + import params + service( + action="stop", name="dfsrouter", + user=params.hdfs_user + ) + elif action == "status": + import status_params + check_process_status(status_params.router_pid_file) + + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py index cdd53657057..d6c99647e23 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py @@ -195,6 +195,7 @@ hs_host = default("/clusterHostInfo/historyserver_hosts", []) jtnode_host = default("/clusterHostInfo/jtnode_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) +router_host = default("/clusterHostInfo/router_hosts", []) nm_host = default("/clusterHostInfo/nodemanager_hosts", []) ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) journalnode_hosts = default("/clusterHostInfo/journalnode_hosts", []) @@ -295,6 +296,38 @@ data_dir_mount_file = "/var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist" +router_address = None +if 'dfs.federation.router.rpc-address' in config['configurations']['hdfs-rbf-site']: + router_rpcaddress = config['configurations']['hdfs-rbf-site']['dfs.federation.router.rpc-address'] + router_address = format("hdfs://{router_rpcaddress}") +else: + router_address = config['configurations']['core-site']['fs.defaultFS'] +if router_host: + router_hdfs_site = dict(config['configurations']['hdfs-site']) + router_core_site = dict(config['configurations']['core-site']) + nameservices = config['configurations']['hdfs-site'].get('dfs.nameservices') + if not isinstance(nameservices, str): + # handle the error, for example by raising an exception or setting a default value + print("The dfs.nameservices property is not set or not a string") + nameservices = '' + + router_hdfs_site['dfs.nameservices'] = nameservices + ",ns-fed" + router_hdfs_site['dfs.client.failover.proxy.provider.ns-fed'] = 'org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider' + router_hdfs_site['dfs.client.failover.random.order'] = 'true' + router_id_list = ["r" + str(i) for i in range(1, len(router_host) + 1)] + router_ids = ",".join(router_id_list) + router_hdfs_site['dfs.ha.namenodes.ns-fed'] = router_ids + for i, curr_router_host in enumerate(router_host): + id = router_id_list[i] + prop_name = "dfs.namenode.rpc-address.ns-fed." + id + prop_value = curr_router_host + ":" + "20010" + router_hdfs_site[prop_name] = prop_value + + router_core_site['fs.defaultFS'] = "hdfs://ns-fed" + router_core_site['hadoop.zk.address'] = config['configurations']['core-site'].get('ha.zookeeper.quorum') +else: + print("No router hosts found") + # HDFS High Availability properties dfs_ha_enabled = False dfs_ha_nameservices = default('/configurations/hdfs-site/dfs.internal.nameservices', None) diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py index 5ce8598bf5a..9bebc216637 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py @@ -403,6 +403,22 @@ def get_dfsadmin_base_command(hdfs_binary, use_specific_namenode = False): dfsadmin_base_command = format("{hdfs_binary} dfsadmin -fs {params.namenode_address}") return dfsadmin_base_command +def get_dfsrouteradmin_base_command(hdfs_binary, use_specific_router = False): + """ + Get the dfsrouteradmin base command constructed using hdfs_binary path and passing router address as explicit -fs argument + :param hdfs_binary: path to hdfs binary to use + :param use_specific_router: flag if set and Router HA is enabled, then the dfsrouteradmin command will use + current router's address + :return: the constructed dfsrouteradmin base command + """ + import params + dfsrouteradmin_base_command = "" + if params.dfs_ha_enabled and use_specific_router: + dfsrouteradmin_base_command = format("{hdfs_binary} dfsrouteradmin -fs hdfs://{params.router_rpc}") + else: + dfsadmin_base_command = format("{hdfs_binary} dfsrouteradmin -fs {params.router_address}") + return dfsrouteradmin_base_command + def set_up_zkfc_security(params): """ Sets up security for accessing zookeper on secure clusters """ From e1217f0d5915d95c1f9d047d70eea40ea902a4c9 Mon Sep 17 00:00:00 2001 From: xjmu <763669981@qq.com> Date: Mon, 12 Aug 2024 08:59:46 +0800 Subject: [PATCH 08/23] fix bootstrap.py RunCommand from python to python3 (#3808) --- ambari-server/src/main/python/bootstrap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index 7b3e36bd78e..13aed53801c 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -345,7 +345,7 @@ def getRunSetupCommand(self, expected_hostname): user_run_as = self.shared_state.user_run_as server = self.shared_state.ambari_server version = self.getAmbariVersion() - return ' '.join(['python', setupFile, expected_hostname, passphrase, server, user_run_as, version]) + return ' '.join(['python3', setupFile, expected_hostname, passphrase, server, user_run_as, version]) def runSetupAgent(self): self.host_log.write("==========================\n") @@ -609,7 +609,7 @@ def getRunSetupWithPasswordCommand(self, expected_hostname): version = self.getAmbariVersion() port = self.getAmbariPort() passwordFile = self.getPasswordFile() - return "{sudo} -S python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \ + return "{sudo} -S python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \ " " + str(passphrase) + " " + str(server)+ " " + quote_bash_args(str(user_run_as)) + " " + str(version) + \ " " + str(port) + " < " + str(passwordFile) @@ -620,7 +620,7 @@ def getRunSetupWithoutPasswordCommand(self, expected_hostname): user_run_as = self.shared_state.user_run_as version=self.getAmbariVersion() port=self.getAmbariPort() - return "{sudo} python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \ + return "{sudo} python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \ " " + str(passphrase) + " " + str(server)+ " " + quote_bash_args(str(user_run_as)) + " " + str(version) + \ " " + str(port) From 36473516631d389019c762920f5f3a9248c27696 Mon Sep 17 00:00:00 2001 From: Ananya Singh Date: Thu, 15 Aug 2024 06:17:51 +0530 Subject: [PATCH 09/23] AMBARI-26116 : Command script path is not correct for DFSRouter (#3812) --- .../resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml index 6c1dbb56398..fb70b2a6d14 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml @@ -232,7 +232,7 @@ true router - + PYTHON 1800 @@ -261,7 +261,7 @@ DECOMMISSION - + PYTHON 600 From 6e354a7a55817a918a466a1dad81b7730d77b18f Mon Sep 17 00:00:00 2001 From: zrain <2296342883@qq.com> Date: Thu, 15 Aug 2024 08:49:15 +0800 Subject: [PATCH 10/23] AMBARI-26115: $PYTHONPATH was not correctly resolved. #3811 --- ambari-agent/pom.xml | 4 ++-- ambari-server/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 1ecbab8c42d..0b919448a0a 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -250,7 +250,7 @@ ${python.test.mask} - ${path.python.1}${pathsep}$PYTHONPATH + ${path.python.1}${pathsep}${env.PYTHONPATH} ${skipPythonTests} @@ -269,7 +269,7 @@ ${target.cache.dir} - target${dirsep}ambari-agent-${project.version}${pathsep}$PYTHONPATH + target${dirsep}ambari-agent-${project.version}${pathsep}${env.PYTHONPATH} generate-hash-files diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 00bd6f5af2b..9ced079d8d9 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -754,7 +754,7 @@ ${python.test.mask} - ${path.python.1}${pathsep}$PYTHONPATH + ${path.python.1}${pathsep}${env.PYTHONPATH} ${skipPythonTests} From 69ed31c19c32531621056f0a55b16975e911ca2f Mon Sep 17 00:00:00 2001 From: Peng Lee <49220700+vivostar@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:51:57 +0800 Subject: [PATCH 11/23] AMBARI-26099. Ambari Common Stomp Module AttributeError (#3798) --- .../python/ambari_agent/TestAmbariStomp.py | 41 +++++++++++++++++++ .../src/main/python/ambari_stomp/transport.py | 8 ++-- .../src/test/python/coilmq/util/frames.py | 17 ++++---- 3 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py b/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py new file mode 100644 index 00000000000..021cfedfce9 --- /dev/null +++ b/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 + +''' +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 BaseStompServerTestCase import BaseStompServerTestCase +import ambari_stomp + +class TestAmbariStomp(BaseStompServerTestCase): + def test_ambari_stomp(self): + conn = ambari_stomp.Connection10([('127.0.0.1', 21613)]) + conn.set_listener('', MyListener()) + conn.start() + try: + conn.connect("test", "test", wait=False) + conn.subscribe(destination='/queue/test', id=1, ack='auto') + conn.send(body='some text', destination='/queue/test', headers={"test": 'aaa', "test2": "bbb"}) + except AttributeError as e: + raise AttributeError(e) + +class MyListener(ambari_stomp.ConnectionListener): + def on_error(self, headers, body): + print('received an error "%s"' % body) + + def on_message(self, headers, body): + print('received a message "%s"' % body) \ No newline at end of file diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py index 7c6a5071554..184254849dd 100644 --- a/ambari-common/src/main/python/ambari_stomp/transport.py +++ b/ambari-common/src/main/python/ambari_stomp/transport.py @@ -378,7 +378,7 @@ def __read(self): c = b'' if c is None or len(c) == 0: raise exception.ConnectionClosedException() - if c.encode() == b'\x0a' and not self.__recvbuf and not fastbuf.tell(): + if c == b'\x0a' and not self.__recvbuf and not fastbuf.tell(): # # EOL to an empty receive buffer: treat as heartbeat. # Note that this may misdetect an optional EOL at end of frame as heartbeat in case the @@ -386,9 +386,9 @@ def __read(self): # last byte of that read. But that should be harmless in practice. # fastbuf.close() - return [c.encode()] - fastbuf.write(c.encode()) - if b'\x00' in c.encode(): + return [c] + fastbuf.write(c) + if b'\x00' in c: # # Possible end of frame # diff --git a/ambari-common/src/test/python/coilmq/util/frames.py b/ambari-common/src/test/python/coilmq/util/frames.py index 3a3580e8b45..b50a7aba759 100644 --- a/ambari-common/src/test/python/coilmq/util/frames.py +++ b/ambari-common/src/test/python/coilmq/util/frames.py @@ -19,10 +19,11 @@ ABORT = 'ABORT' ACK = 'ACK' NACK = 'NACK' +STOMP_CMD = 'STOMP' DISCONNECT = 'DISCONNECT' -VALID_COMMANDS = ['message', 'connect', 'connected', 'error', 'send', - 'subscribe', 'unsubscribe', 'begin', 'commit', 'abort', 'ack', 'disconnect', 'nack'] +VALID_COMMANDS = [MESSAGE, CONNECT, CONNECTED, ERROR, SEND, + SUBSCRIBE, UNSUBSCRIBE, BEGIN, COMMIT, ABORT, ACK, DISCONNECT, NACK, STOMP_CMD] TEXT_PLAIN = 'text/plain' @@ -43,7 +44,9 @@ def parse_headers(buff): """ Parses buffer and returns command and headers as strings """ - preamble_lines = list([six.u(x).decode() for x in iter(lambda: buff.readline().strip(), b'')] + preamble_lines = list(map( + lambda x: six.u(x).decode(), + iter(lambda: buff.readline().strip(), b'')) ) if not preamble_lines: raise EmptyBuffer() @@ -141,7 +144,7 @@ def __init__(self, session, extra_headers=None): @type session: C{str} """ super(ConnectedFrame, self).__init__( - cmd='connected', headers=extra_headers or {}) + cmd=CONNECTED, headers=extra_headers or {}) self.headers['session'] = session @@ -196,7 +199,7 @@ def __init__(self, message, body=None, extra_headers=None): @param body: The message body bytes. @type body: C{str} """ - super(ErrorFrame, self).__init__(cmd='error', + super(ErrorFrame, self).__init__(cmd=ERROR, headers=extra_headers or {}, body=body) self.headers['message'] = message self.headers[ @@ -354,5 +357,5 @@ def __next__(self): raise StopIteration() return msg - def __next__(self): - return self.__next__() + def next(self): + return self.__next__() \ No newline at end of file From fa16a47215bd9d7ec0664498aad162f80d0c7f28 Mon Sep 17 00:00:00 2001 From: Ananya Singh Date: Thu, 15 Aug 2024 06:42:27 +0530 Subject: [PATCH 12/23] AMBARI-26109 : Adding DFSRouter via 'Actions Button' in HDFS summary page (#3807) Co-authored-by: ananysin <=ananysin@visa.com> --- ambari-web/app/controllers.js | 5 + .../routerBasedFederation/step1_controller.js | 26 +++ .../routerBasedFederation/step2_controller.js | 67 ++++++ .../routerBasedFederation/step3_controller.js | 191 ++++++++++++++++++ .../routerBasedFederation/step4_controller.js | 80 ++++++++ .../wizard_controller.js | 158 +++++++++++++++ .../main/admin/highAvailability_controller.js | 22 ++ .../app/controllers/main/service/item.js | 5 + .../wizards/router_federation_properties.js | 80 ++++++++ ambari-web/app/data/controller_route.js | 4 + ambari-web/app/messages.js | 22 ++ .../mixins/wizard/assign_master_components.js | 3 + ambari-web/app/models/host_component.js | 6 + ambari-web/app/models/service.js | 2 +- .../app/routes/dfsrouter_federation_routes.js | 166 +++++++++++++++ ambari-web/app/routes/main.js | 2 + .../routerBasedFederation/step1.hbs | 28 +++ .../routerBasedFederation/step3.hbs | 56 +++++ .../routerBasedFederation/step4.hbs | 19 ++ .../routerBasedFederation/wizard.hbs | 35 ++++ ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 5 + .../routerBasedFederation/step1_view.js | 28 +++ .../routerBasedFederation/step2_view.js | 25 +++ .../routerBasedFederation/step3_view.js | 31 +++ .../routerBasedFederation/step4_view.js | 35 ++++ .../routerBasedFederation/wizard_view.js | 32 +++ ambari-web/app/views/main/service/item.js | 7 + ambari-web/test/models/service_test.js | 2 +- 29 files changed, 1141 insertions(+), 2 deletions(-) create mode 100644 ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js create mode 100644 ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js create mode 100644 ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js create mode 100644 ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js create mode 100644 ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js create mode 100644 ambari-web/app/data/configs/wizards/router_federation_properties.js create mode 100644 ambari-web/app/routes/dfsrouter_federation_routes.js create mode 100644 ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs create mode 100644 ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs create mode 100644 ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs create mode 100644 ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs create mode 100644 ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js create mode 100644 ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js create mode 100644 ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js create mode 100644 ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js create mode 100644 ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index bd858a51b02..fbfa68d05c1 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -61,6 +61,11 @@ require('controllers/main/admin/federation/step1_controller'); require('controllers/main/admin/federation/step2_controller'); require('controllers/main/admin/federation/step3_controller'); require('controllers/main/admin/federation/step4_controller'); +require('controllers/main/admin/federation/routerBasedFederation/wizard_controller'); +require('controllers/main/admin/federation/routerBasedFederation/step1_controller'); +require('controllers/main/admin/federation/routerBasedFederation/step2_controller'); +require('controllers/main/admin/federation/routerBasedFederation/step3_controller'); +require('controllers/main/admin/federation/routerBasedFederation/step4_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/wizard_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controller'); require('controllers/main/admin/highAvailability/hawq/addStandby/step2_controller'); diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js new file mode 100644 index 00000000000..60ee0bb2683 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js @@ -0,0 +1,26 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep1Controller = Em.Controller.extend({ + name: "routerFederationWizardStep1Controller", + next: function () { + App.router.send('next'); + } +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js new file mode 100644 index 00000000000..a367c3d2b2e --- /dev/null +++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js @@ -0,0 +1,67 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep2Controller = Em.Controller.extend(App.AssignMasterComponents, { + + name: "routerFederationWizardStep2Controller", + + useServerValidation: false, + + mastersToShow: ['NAMENODE', 'ROUTER'], + + mastersToAdd: ['ROUTER'], + + showCurrentPrefix: ['NAMENODE', 'ROUTER'], + + showAdditionalPrefix: ['ROUTER'], + + mastersAddableInHA: ['ROUTER'], + + showInstalledMastersFirst: true, + + renderComponents: function (masterComponents) { + // check if we are restoring components assignment by checking existence of ROUTER component in array + var restoringComponents = masterComponents.someProperty('component_name', 'ROUTER'); + masterComponents = restoringComponents ? masterComponents : masterComponents.concat(this.generateRouterComponents()); + this._super(masterComponents); + // if you have similar functions for router, call them here + }, + + + generateRouterComponents: function () { + var router = []; + App.HostComponent.find().filterProperty('componentName', 'ROUTER').forEach(function (rbf) { + var rbfComponent = this.createComponentInstallationObject(Em.Object.create({ + serviceName: rbf.get('service.serviceName'), + componentName: rbf.get('componentName') + }), rbf.get('hostName')); + rbfComponent.isInstalled = true; + router.push(rbfComponent); + }, this); + return router; + }, + + actions: { + back() { + this.clearStep() + } + } + +}); diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js new file mode 100644 index 00000000000..364f125b1cf --- /dev/null +++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js @@ -0,0 +1,191 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep3Controller = Em.Controller.extend(App.BlueprintMixin, { + name: "routerFederationWizardStep3Controller", + selectedService: null, + stepConfigs: [], + serverConfigData: {}, + once: false, + isLoaded: false, + isConfigsLoaded: false, + versionLoaded: true, + hideDependenciesInfoBar: true, + + /** + * Map of sites and properties to delete + * @type Object + */ + + clearStep: function () { + this.get('stepConfigs').clear(); + this.set('serverConfigData', {}); + this.set('isConfigsLoaded', false); + this.set('isLoaded', false); + }, + + loadStep: function () { + this.clearStep(); + this.loadConfigsTags(); + }, + + loadConfigsTags: function () { + return App.ajax.send({ + name: 'config.tags', + sender: this, + success: 'onLoadConfigsTags' + }); + }, + + + onLoadConfigsTags: function (data) { + var urlParams = '(type=hdfs-rbf-site&tag=' + data.Clusters.desired_configs['hdfs-rbf-site'].tag + ')|'; + urlParams += '(type=hdfs-site&tag=' + data.Clusters.desired_configs['hdfs-site'].tag + ')|'; + urlParams += '(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')'; + App.ajax.send({ + name: 'admin.get.all_configurations', + sender: this, + data: { + urlParams: urlParams + }, + success: 'onLoadConfigs' + }); + }, + + onLoadConfigs: function (data) { + this.set('serverConfigData', data); + this.set('isConfigsLoaded', true); + }, + + onLoad: function () { + if (this.get('isConfigsLoaded') && App.router.get('clusterController.isHDFSNameSpacesLoaded')) { + var routerFederationConfig = $.extend(true, {}, require('data/configs/wizards/router_federation_properties').routerFederationConfig); + if (App.get('hasNameNodeFederation')) { + routerFederationConfig.configs = routerFederationConfig.configs.rejectProperty('firstRun'); + } + routerFederationConfig.configs = this.tweakServiceConfigs(routerFederationConfig.configs); + var configsFromServer = this.get('serverConfigData.items'); + var hdfsrbfConfigs = configsFromServer.findProperty('type', 'hdfs-rbf-site'); + var configToSave = { + type: 'hdfs-rbf-site', + properties: hdfsrbfConfigs&&hdfsrbfConfigs.properties, + }; + if (hdfsrbfConfigs && hdfsrbfConfigs.properties_attributes) { + configToSave.properties_attributes = hdfsrbfConfigs.properties_attributes; + } + for(const property of routerFederationConfig.configs){ + configToSave.properties[property.name]=property.value + } + App.ajax.send({ + name: 'common.service.configurations', + sender: self, + data: { + desired_config: configToSave + }, + error: 'onTaskError' + }); + + this.renderServiceConfigs(routerFederationConfig); + this.set('isLoaded', true); + } + }.observes('isConfigsLoaded', 'App.router.clusterController.isHDFSNameSpacesLoaded'), + + prepareDependencies: function () { + var ret = {}; + var configsFromServer = this.get('serverConfigData.items'); + var nameNodes = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE'); + var hdfsSiteConfigs = configsFromServer.findProperty('type', 'hdfs-site').properties; + var coreSiteConfigs = configsFromServer.findProperty('type', 'core-site').properties; + var nameServices = App.HDFSService.find().objectAt(0).get('masterComponentGroups').mapProperty('name'); + var modifiedNameServices = []; + var nnCounter = 1; + ret.nameServicesList = nameServices.join(','); + ret.nameservice1 = nameServices[0]; + for (let i = 0; i < nameServices.length; i++) { + let nameservice = nameServices[i]; + modifiedNameServices.push(`${nameservice}.nn${nnCounter}`); + nnCounter++; + modifiedNameServices.push(`${nameservice}.nn${nnCounter}`); + nnCounter++; + } + ret.modifiedNameServices = modifiedNameServices.join(','); + + ret.zkAddress = coreSiteConfigs['ha.zookeeper.quorum']; + + return ret; + }, + tweakServiceConfigs: function (configs) { + var dependencies = this.prepareDependencies(); + var result = []; + var configsToRemove = []; + var hdfsSiteConfigs = this.get('serverConfigData').items.findProperty('type', 'hdfs-site').properties; + var wizardController = App.router.get(this.get('content.controllerName')); + configs.forEach(function (config) { + config.isOverridable = false; + config.name = wizardController.replaceDependencies(config.name, dependencies); + config.displayName = wizardController.replaceDependencies(config.displayName, dependencies); + config.value = wizardController.replaceDependencies(config.value, dependencies); + config.recommendedValue = wizardController.replaceDependencies(config.recommendedValue, dependencies); + result.push(config); + + }, this); + + return result; + }, + + renderServiceConfigs: function (_serviceConfig) { + var serviceConfig = App.ServiceConfig.create({ + serviceName: _serviceConfig.serviceName, + displayName: _serviceConfig.displayName, + configCategories: [], + showConfig: true, + configs: [] + }); + + _serviceConfig.configCategories.forEach(function (_configCategory) { + if (App.Service.find().someProperty('serviceName', _configCategory.name)) { + serviceConfig.configCategories.pushObject(_configCategory); + } + }, this); + + this.loadComponentConfigs(_serviceConfig, serviceConfig); + + this.get('stepConfigs').pushObject(serviceConfig); + this.set('selectedService', this.get('stepConfigs').objectAt(0)); + this.set('once', true); + }, + + /** + * Load child components to service config object + * @param _componentConfig + * @param componentConfig + */ + loadComponentConfigs: function (_componentConfig, componentConfig) { + _componentConfig.configs.forEach(function (_serviceConfigProperty) { + var serviceConfigProperty = App.ServiceConfigProperty.create(_serviceConfigProperty); + componentConfig.configs.pushObject(serviceConfigProperty); + serviceConfigProperty.set('isEditable', serviceConfigProperty.get('isReconfigurable')); + }, this); + }, + + isNextDisabled: function () { + return !this.get('isLoaded') || (this.get('isLoaded') && this.get('selectedService.configs').someProperty('isValid', false)); + }.property('selectedService.configs.@each.isValid', 'isLoaded') +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js new file mode 100644 index 00000000000..8e0f5925f22 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js @@ -0,0 +1,80 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep4Controller = App.HighAvailabilityProgressPageController.extend(App.WizardEnableDone, { + + name: "routerFederationWizardStep4Controller", + + commands: ['installRouter', 'startRouters'], + + tasksMessagesPrefix: 'admin.routerFederation.wizard.step', + + initializeTasks: function () { + this._super(); + this.removeUnneededTasks(); + }, + + removeUnneededTasks: function () { + var installedServices = App.Service.find().mapProperty('serviceName'); + if (!installedServices.contains('RANGER')) { + this.removeTasks(['startInfraSolr', 'startRangerAdmin', 'startRangerUsersync']); + } + if (!installedServices.contains('AMBARI_INFRA_SOLR')) { + this.removeTasks(['startInfraSolr']); + } + }, + + reconfigureServices: function () { + var servicesModel = App.Service.find(); + var configs = []; + var data = this.get('content.serviceConfigProperties'); + var note = Em.I18n.t('admin.routerFederation.wizard,step4.save.configuration.note'); + configs.push({ + Clusters: { + desired_config: this.reconfigureSites(['hdfs-rbf-site'], data, note) + } + }); + return App.ajax.send({ + name: 'common.service.multiConfigurations', + sender: this, + data: { + configs: configs + }, + error: 'onTaskError', + success: 'installHDFSClients' + }); + }, + + installHDFSClients: function () { + var nnHostNames = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName'); + var jnHostNames = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').mapProperty('hostName'); + var hostNames = nnHostNames.concat(jnHostNames).uniq(); + this.createInstallComponentTask('HDFS_CLIENT', hostNames, 'HDFS'); + }, + + installRouter: function () { + this.createInstallComponentTask('ROUTER', this.get('content.masterComponentHosts').filterProperty('component', 'ROUTER').mapProperty('hostName'), "HDFS"); + }, + + startRouters: function () { + var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'ROUTER').mapProperty('hostName'); + this.updateComponent('ROUTER', hostNames, "HDFS", "Start"); + } +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js new file mode 100644 index 00000000000..588030821d1 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js @@ -0,0 +1,158 @@ +/** + * 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. + */ + + +var App = require('app'); + +App.RouterFederationWizardController = App.WizardController.extend({ + + name: 'routerFederationWizardController', + + totalSteps: 4, + + /** + * @type {string} + */ + displayName: Em.I18n.t('admin.routerFederation.wizard.header'), + + isFinished: false, + + content: Em.Object.create({ + controllerName: 'routerFederationWizardController' + }), + + /** + * Load data for all steps until current step + */ + loadMap: { + '1': [ + { + type: 'sync', + callback: function () { + this.load('cluster'); + } + } + ], + '2': [ + { + type: 'async', + callback: function () { + var self = this, + dfd = $.Deferred(); + this.loadServicesFromServer(); + this.loadMasterComponentHosts().done(function () { + self.loadConfirmedHosts(); + dfd.resolve(); + }); + return dfd.promise(); + } + } + ], + '3': [ + { + type: 'sync', + callback: function () { + this.load('cluster'); + } + } + ], + '4': [ + { + type: 'sync', + callback: function () { + this.loadServiceConfigProperties(); + this.loadTasksStatuses(); + this.loadTasksRequestIds(); + this.loadRequestIds(); + } + } + ] + }, + + init: function () { + this._super(); + this.clearStep(); + }, + + clearStep: function () { + this.set('isFinished', false); + }, + + setCurrentStep: function (currentStep, completed) { + this._super(currentStep, completed); + App.clusterStatus.setClusterStatus({ + clusterName: this.get('content.cluster.name'), + wizardControllerName: 'routerFederationWizardController', + localdb: App.db.data + }); + }, + + saveNNHosts: function (nnHosts) { + this.set('content.nnHosts', nnHosts); + this.setDBProperty('nnHosts', nnHosts); + }, + + /** + * Load hosts for additional and current ResourceManagers from local db to controller.content + */ + loadNNHosts: function() { + var nnHosts = this.getDBProperty('nnHosts'); + this.set('content.nnHosts', nnHosts); + }, + + saveServiceConfigProperties: function (stepController) { + var serviceConfigProperties = []; + var data = stepController.get('serverConfigData'); + + var _content = stepController.get('stepConfigs')[0]; + _content.get('configs').forEach(function (_configProperties) { + var siteObj = data.items.findProperty('type', _configProperties.get('filename')); + if (siteObj) { + siteObj.properties[_configProperties.get('name')] = _configProperties.get('value'); + } + }, this); + this.setDBProperty('serviceConfigProperties', data); + this.set('content.serviceConfigProperties', data); + }, + + /** + * Load serviceConfigProperties to model + */ + loadServiceConfigProperties: function () { + this.set('content.serviceConfigProperties', this.getDBProperty('serviceConfigProperties')); + }, + + /** + * Remove all loaded data. + * Created as copy for App.router.clearAllSteps + */ + clearAllSteps: function () { + this.clearInstallOptions(); + // clear temporary information stored during the install + this.set('content.cluster', this.getCluster()); + }, + + /** + * Clear all temporary data + */ + finish: function () { + this.resetDbNamespace(); + App.router.get('updateController').updateAll(); + this.set('isFinished', true); + } +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js index 3ac72149799..f73f895ec7b 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js @@ -142,6 +142,28 @@ App.MainAdminHighAvailabilityController = App.WizardController.extend({ return true; }, + /** + * enable router Based Federation + * @return {Boolean} + */ + enableRouterFederation: function () { + //Prerequisite Checks + var message = []; + if (!App.HostComponent.find().filterProperty('componentName', 'ZOOKEEPER_SERVER').everyProperty('workStatus', 'STARTED')) { + message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.zookeepers')); + } + + if (!App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').everyProperty('workStatus', 'STARTED')) { + message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.journalnodes')); + } + if (message.length > 0) { + this.showErrorPopup(message); + return false; + } + App.router.transitionTo('main.services.enableRouterFederation'); + return true; + }, + /** * open Manage JournalNode Wizard if there are two started NameNodes with defined active/standby state * @returns {boolean} diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index d749c313f70..380c94aaabf 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -1518,6 +1518,11 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow highAvailabilityController.enableNameNodeFederation(); }, + openRouterFederationWizard: function () { + var highAvailabilityController = App.router.get('mainAdminHighAvailabilityController'); + highAvailabilityController.enableRouterFederation(); + }, + /** * This method is called when user event to download configs for "All Clients" * is made from service action menu diff --git a/ambari-web/app/data/configs/wizards/router_federation_properties.js b/ambari-web/app/data/configs/wizards/router_federation_properties.js new file mode 100644 index 00000000000..c87f2eb4d4c --- /dev/null +++ b/ambari-web/app/data/configs/wizards/router_federation_properties.js @@ -0,0 +1,80 @@ +/** + * 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. + */ + +module.exports = + { + "routerFederationConfig": { + serviceName: 'MISC', + displayName: 'MISC', + configCategories: [ + App.ServiceConfigCategory.create({ name: 'HDFS', displayName: 'HDFS'}) + ], + sites: ['core-site', 'hdfs-rbf-site'], + configs: [ + { + "name": "dfs.federation.router.monitor.namenode", + "displayName": "dfs.federation.router.monitor.namenode", + "description": "RPC address for HDFS Services communication.", + "isReconfigurable": false, + "recommendedValue": "{{nameservice1}}.nn1, {{nameservice1}}.nn2, {{newNameservice}}.{{newNameNode1Index}},{{newNameservice}}.{{newNameNode2Index}}", + "value": "{{modifiedNameServices}}", + "category": "HDFS", + "filename": "hdfs-rbf-site", + "serviceName": 'MISC', + "isRouterConfigs" : true + }, + { + "name": "dfs.federation.router.default.nameserviceId", + "displayName": "dfs.federation.router.default.nameserviceId", + "description": "Nameservice identifier of the default subcluster to monitor.", + "isReconfigurable": false, + "recommendedValue": "{{nameservice1}}", + "value": "{{nameservice1}}", + "category": "HDFS", + "filename": "hdfs-rbf-site", + "serviceName": 'MISC', + "isRouterConfigs" : true + }, + { + "name": "zk-dt-secret-manager.zkAuthType", + "displayName": "zk-dt-secret-manager.zkAuthType", + "description": "Secret Manager Zookeeper Authentication Type", + "isReconfigurable": false, + "recommendedValue": "none", + "value": "none", + "category": "HDFS", + "filename": "hdfs-rbf-site", + "serviceName": 'MISC', + "isRouterConfigs" : true + }, + { + "name": "zk-dt-secret-manager.zkConnectionString", + "displayName": "zk-dt-secret-manager.zkConnectionString", + "description": "Secret Manager Zookeeper Connection String", + "isReconfigurable": false, + "recommendedValue": "zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181", + "value": "{{zkAddress}}", + "category": "HDFS", + "filename": "hdfs-rbf-site", + "serviceName": 'MISC', + "isRouterConfigs" : true + } + ] + } + + }; \ No newline at end of file diff --git a/ambari-web/app/data/controller_route.js b/ambari-web/app/data/controller_route.js index 8f6f385bff3..914ee88f152 100644 --- a/ambari-web/app/data/controller_route.js +++ b/ambari-web/app/data/controller_route.js @@ -85,6 +85,10 @@ module.exports = [ wizardControllerName: App.router.get('nameNodeFederationWizardController.name'), route: 'main.services.enableNameNodeFederation' }, + { + wizardControllerName: App.router.get('routerFederationWizardController.name'), + route: 'main.services.enableRouterFederation' + }, { wizardControllerName: App.router.get('manageJournalNodeWizardController.name'), route: 'main.services.manageJournalNode' diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 78626c1989d..350883769db 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1727,6 +1727,28 @@ Em.I18n.translations = { 'admin.nameNodeFederation.wizard.step4.task16.title': 'Start NameNode', 'admin.nameNodeFederation.wizard.step4.task17.title': 'Restart Required Services', + 'admin.routerFederation.button.enable':'Add DFSRouter', + 'admin.routerFederation.wizard.header': 'Add HDFS Router', + 'admin.routerFederation.closePopup': 'Are you sure you want to quit?', + 'admin.routerFederation.closePopup2': 'Add HDFS Router Wizard is in progress. Are you sure you want to exit the wizard?', + 'admin.routerFederation.wizard.step1.header': 'Get Started', + 'admin.routerFederation.wizard.step1.body':'This wizard will walk you through the process of enabling DFSRouter to manage federated cluster.', + 'admin.routerFederation.wizard.step2.header': 'Select Hosts', + 'admin.routerFederation.wizard.step2.body': 'Select hosts running the Routers for {0}', + 'admin.routerFederation.wizard.step3.header': 'Review', + 'admin.routerFederation.wizard.step3.addRouter': 'Add Router: ', + 'admin.routerFederation.wizard.step3.toBeInstalled': 'Router TO BE INSTALLED', + 'admin.routerFederation.wizard.step3.confirm.config.body': '
' + + '

Review Configuration Changes.

' + + 'The following lists the configuration changes that will be made by the Wizard to enable Router. This information is for review only and is not editable' + + '
', + 'admin.routerFederation.wizard.step4.header': 'Configure Router', + 'admin.routerFederation.wizard,step4.save.configuration.note':'This configuration is created by Enable DFSRouter wizard', + 'admin.routerFederation.wizard.step4.notice.inProgress':'Please wait while your Router is being deployed.', + 'admin.routerFederation.wizard.step4.notice.completed':'Add DFSRouter Wizard has been completed successfully.', + 'admin.routerFederation.wizard.step4.task0.title': 'Install Routers', + 'admin.routerFederation.wizard.step4.task1.title': 'Start Routers', + 'admin.security.title':'Kerberos security has not been enabled', 'admin.security.enabled': 'Kerberos security is enabled', 'admin.security.disabled': 'Kerberos security is disabled', diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 25bf86c38ba..53b566212e9 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1120,6 +1120,9 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A } newMaster.set("selectedHost", suggestedHost); + if(!currentMasters.get("lastObject.serviceComponentId")){ + currentMasters.get("lastObject").set("serviceComponentId",0) + } newMaster.set("serviceComponentId", (currentMasters.get("lastObject.serviceComponentId") + 1)); this.get("selectedServicesMasters").insertAt(this.get("selectedServicesMasters").indexOf(lastMaster) + 1, newMaster); diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js index 428bca3a16a..c404e5691ba 100644 --- a/ambari-web/app/models/host_component.js +++ b/ambari-web/app/models/host_component.js @@ -575,6 +575,12 @@ App.HostComponentActionMap = { cssClass: 'icon icon-sitemap', disabled: !App.get('isHaEnabled') || App.get('allHostNames.length') < 4 }, + TOGGLE_RBF_FEDERATION: { + action: 'openRouterFederationWizard', + label: Em.I18n.t('admin.routerFederation.button.enable'), + cssClass: 'icon icon-sitemap', + disabled: !App.get('hasNameNodeFederation') + }, UPDATE_REPLICATION: { action: 'updateHBaseReplication', customCommand: 'UPDATE_REPLICATION', diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js index 06d108297e0..a1bb73ba37f 100644 --- a/ambari-web/app/models/service.js +++ b/ambari-web/app/models/service.js @@ -117,7 +117,7 @@ App.Service = DS.Model.extend({ serviceTypes: function() { var typeServiceMap = { GANGLIA: ['MONITORING'], - HDFS: ['HA_MODE', 'FEDERATION'], + HDFS: ['HA_MODE', 'FEDERATION', 'DFSRouter'], YARN: ['HA_MODE'], RANGER: ['HA_MODE'], HAWQ: ['HA_MODE'] diff --git a/ambari-web/app/routes/dfsrouter_federation_routes.js b/ambari-web/app/routes/dfsrouter_federation_routes.js new file mode 100644 index 00000000000..bc7f8388e9a --- /dev/null +++ b/ambari-web/app/routes/dfsrouter_federation_routes.js @@ -0,0 +1,166 @@ +/** + * 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. + */ + +var App = require('app'); + +module.exports = App.WizardRoute.extend({ + route: '/NameNode/federation/routerBasedFederation', + + breadcrumbs: { + label: Em.I18n.t('admin.routerFederation.wizard.header') + }, + + enter: function (router, transition) { + var routerFederationWizardController = router.get('routerFederationWizardController'); + routerFederationWizardController.dataLoading().done(function () { + //Set HDFS as current service + App.router.set('mainServiceItemController.content', App.Service.find().findProperty('serviceName', 'HDFS')); + App.router.get('updateController').set('isWorking', false); + var popup = App.ModalPopup.show({ + classNames: ['wizard-modal-wrapper'], + modalDialogClasses: ['modal-xlg'], + header: Em.I18n.t('admin.routerFederation.wizard.header'), + bodyClass: App.RouterFederationWizardView.extend({ + controller: routerFederationWizardController + }), + primary: Em.I18n.t('form.cancel'), + showFooter: false, + secondary: null, + + onClose: function () { + var routerFederationWizardController = router.get('routerFederationWizardController'), + currStep = routerFederationWizardController.get('currentStep'); + App.showConfirmationPopup(function () { + routerFederationWizardController.resetOnClose(routerFederationWizardController, 'main.services.index'); + }, Em.I18n.t(parseInt(currStep) === 4 ? 'admin.routerFederation.closePopup2' : 'admin.routerFederation.closePopup')); + }, + didInsertElement: function () { + this._super(); + this.fitHeight(); + } + }); + routerFederationWizardController.set('popup', popup); + var currentClusterStatus = App.clusterStatus.get('value'); + if (currentClusterStatus) { + switch (currentClusterStatus.clusterState) { + case 'RBF_FEDERATION_DEPLOY' : + routerFederationWizardController.setCurrentStep(currentClusterStatus.localdb.RouterFederationWizard.currentStep); + break; + default: + var currStep = App.router.get('routerFederationWizardController.currentStep'); + routerFederationWizardController.setCurrentStep(currStep); + break; + } + } + Em.run.next(function () { + App.router.get('wizardWatcherController').setUser(routerFederationWizardController.get('name')); + router.transitionTo('step' + routerFederationWizardController.get('currentStep')); + }); + }); + }, + + step1: Em.Route.extend({ + route: '/step1', + connectOutlets: function (router) { + var controller = router.get('routerFederationWizardController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('1'); + controller.connectOutlet('routerFederationWizardStep1', controller.get('content')); + }) + }, + unroutePath: function () { + return false; + }, + next: function (router) { + var controller = router.get('routerFederationWizardController'); + router.transitionTo('step2'); + } + }), + + step2: Em.Route.extend({ + route: '/step2', + connectOutlets: function (router) { + var controller = router.get('routerFederationWizardController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('2'); + controller.loadAllPriorSteps(); + controller.connectOutlet('routerFederationWizardStep2', controller.get('content')); + }) + }, + unroutePath: function () { + return false; + }, + next: function (router) { + var wizardController = router.get('routerFederationWizardController'); + var stepController = router.get('routerFederationWizardStep2Controller'); + wizardController.saveMasterComponentHosts(stepController); + router.transitionTo('step3'); + }, + back: function (router) { + router.transitionTo('step1'); + } + }), + + step3: Em.Route.extend({ + route: '/step3', + connectOutlets: function (router) { + var controller = router.get('routerFederationWizardController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('3'); + controller.loadAllPriorSteps(); + controller.connectOutlet('routerFederationWizardStep3', controller.get('content')); + }) + }, + unroutePath: function () { + return false; + }, + next: function (router) { + var controller = router.get('routerFederationWizardController'); + var stepController = router.get('routerFederationWizardStep3Controller'); + controller.saveServiceConfigProperties(stepController); + router.transitionTo('step4'); + }, + back: Em.Router.transitionTo('step2') + }), + + step4: Em.Route.extend({ + route: '/step4', + connectOutlets: function (router) { + var controller = router.get('routerFederationWizardController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('4'); + controller.setLowerStepsDisable(4); + controller.loadAllPriorSteps(); + controller.connectOutlet('routerFederationWizardStep4', controller.get('content')); + }) + }, + unroutePath: function (router, path) { + // allow user to leave route if wizard has finished + if (router.get('routerFederationWizardController').get('isFinished')) { + this._super(router, path); + } else { + return false; + } + }, + next: function (router) { + var controller = router.get('routerFederationWizardController'); + controller.resetOnClose(controller, 'main.services.index'); + } + }) + +}); \ No newline at end of file diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index bc2c542c8a6..6567a92f0d9 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -893,6 +893,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, { enableNameNodeFederation: require('routes/namenode_federation_routes'), + enableRouterFederation : require('routes/dfsrouter_federation_routes'), + addHawqStandby: require('routes/add_hawq_standby_routes'), removeHawqStandby: require('routes/remove_hawq_standby_routes'), diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs new file mode 100644 index 00000000000..1576e900d44 --- /dev/null +++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs @@ -0,0 +1,28 @@ +{{! +* 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. +}} +
+

{{t admin.routerFederation.wizard.step1.header}}

+
+

{{t admin.routerFederation.wizard.step1.body}}

+
+
+ \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs new file mode 100644 index 00000000000..41e14ab3b01 --- /dev/null +++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs @@ -0,0 +1,56 @@ +{{! +* 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. +}} +
+

{{t admin.highAvailability.wizard.step3.header}}

+

{{t admin.highAvailability.wizard.step3.confirm.host.body}}

+
+
+
+
+ + {{#each host in view.addRouters}} + + + + + + {{/each}} +
{{t admin.routerFederation.wizard.step3.addRouter}}{{host}} {{t admin.routerFederation.wizard.step3.toBeInstalled}}
+
+
+
+ {{#if controller.isLoaded}} + {{{t admin.routerFederation.wizard.step3.confirm.config.body}}} + {{view App.ServiceConfigView isNotEditableBinding="controller.isNotEditable"}} + {{else}} + {{view App.SpinnerView}} + {{/if}} +
+
+
+
+ + \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs new file mode 100644 index 00000000000..79f070ab5d8 --- /dev/null +++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs @@ -0,0 +1,19 @@ +{{! +* 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. +}} +{{template "templates/common/progress"}} + diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs new file mode 100644 index 00000000000..6f81321fd75 --- /dev/null +++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs @@ -0,0 +1,35 @@ +{{! +* 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. +}} + + \ No newline at end of file diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js index 78bc99af57d..701a70cca27 100644 --- a/ambari-web/app/utils/db.js +++ b/ambari-web/app/utils/db.js @@ -49,6 +49,7 @@ var InitialData = { 'ActivateHawqStandbyWizard': {}, 'RAHighAvailabilityWizard': {}, 'NameNodeFederationWizard': {}, + 'RouterFederationWizard': {}, 'RollbackHighAvailabilityWizard': {}, 'MainAdminStackAndUpgrade': {}, 'KerberosDisable': {}, diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index c11d1d63322..30aa6bc7ee3 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/app/views.js @@ -224,6 +224,11 @@ require('views/main/admin/federation/step1_view'); require('views/main/admin/federation/step2_view'); require('views/main/admin/federation/step3_view'); require('views/main/admin/federation/step4_view'); +require('views/main/admin/federation/routerBasedFederation/wizard_view'); +require('views/main/admin/federation/routerBasedFederation/step1_view'); +require('views/main/admin/federation/routerBasedFederation/step2_view'); +require('views/main/admin/federation/routerBasedFederation/step3_view'); +require('views/main/admin/federation/routerBasedFederation/step4_view'); require('views/main/admin/serviceAccounts_view'); require('views/main/admin/stack_upgrade/upgrade_wizard_view'); require('views/main/admin/stack_upgrade/upgrade_version_box_view'); diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js new file mode 100644 index 00000000000..cb4a2086a97 --- /dev/null +++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js @@ -0,0 +1,28 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep1View = Em.View.extend({ + + templateName: require('templates/main/admin/federation/routerBasedFederation/step1'), + + didInsertElement: function() { + } + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js new file mode 100644 index 00000000000..07c4f3bab00 --- /dev/null +++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js @@ -0,0 +1,25 @@ +/** + * 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. + */ + + +var App = require('app'); + +App.RouterFederationWizardStep2View = App.AssignMasterComponentsView.extend({ + title: Em.I18n.t('admin.routerFederation.wizard.step2.header'), + alertMessage: Em.computed.i18nFormat('admin.routerFederation.wizard.step2.body', 'controller.content.nameServiceId') +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js new file mode 100644 index 00000000000..d79b9f4e0b8 --- /dev/null +++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js @@ -0,0 +1,31 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep3View = Em.View.extend({ + + templateName: require('templates/main/admin/federation/routerBasedFederation/step3'), + + didInsertElement: function () { + this.get('controller').loadStep(); + }, + addRouters: function () { + return this.get('controller.content.masterComponentHosts').filterProperty('component', 'ROUTER').filterProperty('isInstalled', false).mapProperty('hostName'); + }.property('controller.content.masterComponentHosts'), +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js new file mode 100644 index 00000000000..b4ef26551f6 --- /dev/null +++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js @@ -0,0 +1,35 @@ +/** + * 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. + */ + +var App = require('app'); + +App.RouterFederationWizardStep4View = App.HighAvailabilityProgressPageView.extend({ + + templateName: require('templates/main/admin/federation/routerBasedFederation/step4'), + + headerTitle: Em.I18n.t('admin.routerFederation.wizard.step4.header'), + + noticeInProgress: Em.I18n.t('admin.routerFederation.wizard.step4.notice.inProgress'), + + noticeCompleted: Em.I18n.t('admin.routerFederation.wizard.step4.notice.completed'), + + submitButtonText: Em.I18n.t('common.complete'), + + labelWidth: 'col-md-5' + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js new file mode 100644 index 00000000000..6c15e364aa7 --- /dev/null +++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js @@ -0,0 +1,32 @@ +/** + * 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. + */ + + +var App = require('app'); + +App.RouterFederationWizardView = Em.View.extend(App.WizardMenuMixin, App.WizardHostsLoading, { + + templateName: require('templates/main/admin/federation/routerBasedFederation/wizard'), + + didInsertElement: function() { + var currentStep = this.get('controller.currentStep'); + if (currentStep > 3) { + this.get('controller').setLowerStepsDisable(currentStep); + } + } +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index bb61663e0e3..b887e1eae14 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -241,6 +241,13 @@ App.MainServiceItemView = Em.View.extend(App.HiveInteractiveCheck, { break; } } + if (service.get('serviceTypes').contains('DFSRouter') && App.isAuthorized('SERVICE.ENABLE_HA')) { + switch (service.get('serviceName')) { + case 'HDFS': + options.push(actionMap.TOGGLE_RBF_FEDERATION); + break; + } + } if (serviceCheckSupported) { options.push(actionMap.RUN_SMOKE_TEST); } diff --git a/ambari-web/test/models/service_test.js b/ambari-web/test/models/service_test.js index c600af67817..fdcd0eb08b6 100644 --- a/ambari-web/test/models/service_test.js +++ b/ambari-web/test/models/service_test.js @@ -137,7 +137,7 @@ describe('App.Service', function () { }, { serviceName: 'HDFS', - result: ['HA_MODE', 'FEDERATION'] + result: ['HA_MODE', 'FEDERATION', 'DFSRouter'] }, { serviceName: 'YARN', From badf86c2e8faeae344dd06b7071b0a9b59590b44 Mon Sep 17 00:00:00 2001 From: jialiang Date: Fri, 16 Aug 2024 13:42:26 +0800 Subject: [PATCH 13/23] Revert "AMBARI-26099. Ambari Common Stomp Module AttributeError (#3798)" (#3814) This reverts commit 69ed31c19c32531621056f0a55b16975e911ca2f. --- .../python/ambari_agent/TestAmbariStomp.py | 41 ------------------- .../src/main/python/ambari_stomp/transport.py | 8 ++-- .../src/test/python/coilmq/util/frames.py | 17 ++++---- 3 files changed, 11 insertions(+), 55 deletions(-) delete mode 100644 ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py b/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py deleted file mode 100644 index 021cfedfce9..00000000000 --- a/ambari-agent/src/test/python/ambari_agent/TestAmbariStomp.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python3 - -''' -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 BaseStompServerTestCase import BaseStompServerTestCase -import ambari_stomp - -class TestAmbariStomp(BaseStompServerTestCase): - def test_ambari_stomp(self): - conn = ambari_stomp.Connection10([('127.0.0.1', 21613)]) - conn.set_listener('', MyListener()) - conn.start() - try: - conn.connect("test", "test", wait=False) - conn.subscribe(destination='/queue/test', id=1, ack='auto') - conn.send(body='some text', destination='/queue/test', headers={"test": 'aaa', "test2": "bbb"}) - except AttributeError as e: - raise AttributeError(e) - -class MyListener(ambari_stomp.ConnectionListener): - def on_error(self, headers, body): - print('received an error "%s"' % body) - - def on_message(self, headers, body): - print('received a message "%s"' % body) \ No newline at end of file diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py index 184254849dd..7c6a5071554 100644 --- a/ambari-common/src/main/python/ambari_stomp/transport.py +++ b/ambari-common/src/main/python/ambari_stomp/transport.py @@ -378,7 +378,7 @@ def __read(self): c = b'' if c is None or len(c) == 0: raise exception.ConnectionClosedException() - if c == b'\x0a' and not self.__recvbuf and not fastbuf.tell(): + if c.encode() == b'\x0a' and not self.__recvbuf and not fastbuf.tell(): # # EOL to an empty receive buffer: treat as heartbeat. # Note that this may misdetect an optional EOL at end of frame as heartbeat in case the @@ -386,9 +386,9 @@ def __read(self): # last byte of that read. But that should be harmless in practice. # fastbuf.close() - return [c] - fastbuf.write(c) - if b'\x00' in c: + return [c.encode()] + fastbuf.write(c.encode()) + if b'\x00' in c.encode(): # # Possible end of frame # diff --git a/ambari-common/src/test/python/coilmq/util/frames.py b/ambari-common/src/test/python/coilmq/util/frames.py index b50a7aba759..3a3580e8b45 100644 --- a/ambari-common/src/test/python/coilmq/util/frames.py +++ b/ambari-common/src/test/python/coilmq/util/frames.py @@ -19,11 +19,10 @@ ABORT = 'ABORT' ACK = 'ACK' NACK = 'NACK' -STOMP_CMD = 'STOMP' DISCONNECT = 'DISCONNECT' -VALID_COMMANDS = [MESSAGE, CONNECT, CONNECTED, ERROR, SEND, - SUBSCRIBE, UNSUBSCRIBE, BEGIN, COMMIT, ABORT, ACK, DISCONNECT, NACK, STOMP_CMD] +VALID_COMMANDS = ['message', 'connect', 'connected', 'error', 'send', + 'subscribe', 'unsubscribe', 'begin', 'commit', 'abort', 'ack', 'disconnect', 'nack'] TEXT_PLAIN = 'text/plain' @@ -44,9 +43,7 @@ def parse_headers(buff): """ Parses buffer and returns command and headers as strings """ - preamble_lines = list(map( - lambda x: six.u(x).decode(), - iter(lambda: buff.readline().strip(), b'')) + preamble_lines = list([six.u(x).decode() for x in iter(lambda: buff.readline().strip(), b'')] ) if not preamble_lines: raise EmptyBuffer() @@ -144,7 +141,7 @@ def __init__(self, session, extra_headers=None): @type session: C{str} """ super(ConnectedFrame, self).__init__( - cmd=CONNECTED, headers=extra_headers or {}) + cmd='connected', headers=extra_headers or {}) self.headers['session'] = session @@ -199,7 +196,7 @@ def __init__(self, message, body=None, extra_headers=None): @param body: The message body bytes. @type body: C{str} """ - super(ErrorFrame, self).__init__(cmd=ERROR, + super(ErrorFrame, self).__init__(cmd='error', headers=extra_headers or {}, body=body) self.headers['message'] = message self.headers[ @@ -357,5 +354,5 @@ def __next__(self): raise StopIteration() return msg - def next(self): - return self.__next__() \ No newline at end of file + def __next__(self): + return self.__next__() From 32b91bbbf21b0fae56cec5432e5aa71bd91980f0 Mon Sep 17 00:00:00 2001 From: zhenye zhang Date: Mon, 19 Aug 2024 12:23:38 +0800 Subject: [PATCH 14/23] AMBARI-26118: Fix the default SSL Ciphers of port 8440/8441 are too weak issue #3815 --- ambari-server/conf/unix/ambari-env.sh | 2 +- ambari-server/conf/windows/ambari-env.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh index 95eb6c1a85a..d080f46fc70 100644 --- a/ambari-server/conf/unix/ambari-env.sh +++ b/ambari-server/conf/unix/ambari-env.sh @@ -16,7 +16,7 @@ AMBARI_PASSHPHRASE="DEV" -export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000" +export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000" export PATH=$PATH:$ROOT/var/lib/ambari-server export PYTHONPATH=$ROOT/usr/lib/ambari-server/lib:$PYTHONPATH diff --git a/ambari-server/conf/windows/ambari-env.cmd b/ambari-server/conf/windows/ambari-env.cmd index 23600d4330d..07dc6b1ad22 100644 --- a/ambari-server/conf/windows/ambari-env.cmd +++ b/ambari-server/conf/windows/ambari-env.cmd @@ -16,4 +16,4 @@ rem limitations under the License. set AMBARI_PASSHPHRASE=DEV -set AMBARI_JVM_ARGS=%AMBARI_JVM_ARGS% -Xms512m -Xmx2048m -Djava.security.auth.login.config=conf\krb5JAASLogin.conf -Djava.security.krb5.conf=conf\krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false +set AMBARI_JVM_ARGS=%AMBARI_JVM_ARGS% -Xms512m -Xmx2048m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.security.auth.login.config=conf\krb5JAASLogin.conf -Djava.security.krb5.conf=conf\krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false From 411be3ada1a52859bf22e48794f347e7b19b8cec Mon Sep 17 00:00:00 2001 From: xjmu <763669981@qq.com> Date: Fri, 23 Aug 2024 10:43:58 +0800 Subject: [PATCH 15/23] AMBARI-26119: Add dependency python3-distro for ambari-server #3816 --- ambari-server/src/main/package/dependencies.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/package/dependencies.properties b/ambari-server/src/main/package/dependencies.properties index 1ea214864c1..027a3328d30 100644 --- a/ambari-server/src/main/package/dependencies.properties +++ b/ambari-server/src/main/package/dependencies.properties @@ -28,6 +28,6 @@ # Such a format is respected by install_ambari_tarball.py by default, # however should be encouraged manually in pom.xml. -rpm.dependency.list=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python3 +rpm.dependency.list=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python3,\nRequires: python3-distro rpm.dependency.list.suse=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python-xml,\nRequires: python3 -deb.dependency.list=openssl, postgresql (>= 8.1), python3, curl \ No newline at end of file +deb.dependency.list=openssl, postgresql (>= 8.1), python3, curl From b868d097ad4080068ab00f279c157af97c7cfb5b Mon Sep 17 00:00:00 2001 From: zhenye zhang Date: Fri, 30 Aug 2024 10:14:25 +0800 Subject: [PATCH 16/23] AMBARI-26120:When selecting all hosts in install wizard step 6 page, the disabled host should be excluded (#3817) --- ambari-web/app/controllers/wizard/step6_controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js index 5952ed7219f..c17514768c5 100644 --- a/ambari-web/app/controllers/wizard/step6_controller.js +++ b/ambari-web/app/controllers/wizard/step6_controller.js @@ -250,7 +250,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.HostComponentValidationMixi this.get('hosts').forEach(function (host) { host.checkboxes.filterProperty('isInstalled', false).forEach(function (checkbox) { if (checkbox.component === component) { - Em.set(checkbox, 'checked', checked); + if (!checkbox.isDisabled) { + Em.set(checkbox, 'checked', checked); + } } }); }); From 1908c13d0f943a589a05f49fef048739bc21204e Mon Sep 17 00:00:00 2001 From: piaolingzxh Date: Fri, 30 Aug 2024 10:46:01 +0800 Subject: [PATCH 17/23] AMBARI-26121: Fix Python3 compilation error when packaging Ambari on CentOS 7 (#3818) AMBARI-26121: Fix Python3 compilation error when packaging Ambari on CentOS 7 (#3818) --- ambari-agent/pom.xml | 3 +++ ambari-server/pom.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 0b919448a0a..1f98701e55b 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -314,6 +314,9 @@ 2012, Apache Software Foundation Development Maven Recipe: RPM Package. + + __python 3 + ${rpm.dependency.list} diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 9ced079d8d9..8c128d0c369 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -529,6 +529,9 @@ 2012, Apache Software Foundation Development Maven Recipe: RPM Package. + + __python 3 + no / From 98b4cb01896e01e9a96ffd9025eeb7500160dcab Mon Sep 17 00:00:00 2001 From: Prabhjyot Date: Mon, 2 Sep 2024 20:54:59 -0400 Subject: [PATCH 18/23] AMBARI-26107: Migrate away from DOMNodeInserted to MutationObserver (ambari-admin) (#3819) --- .../app/scripts/controllers/SideNavCtrl.js | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js index 6bf356d7967..2e3e820513b 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js @@ -35,14 +35,27 @@ angular.module('ambariAdminConsole') } function initNavigationBar () { - $('body').on('DOMNodeInserted', '.navigation-bar', function() { - $('.navigation-bar').navigationBar({ - fitHeight: true, - collapseNavBarClass: 'fa-angle-double-left', - expandNavBarClass: 'fa-angle-double-right' - }); - //initTooltips(); - $('body').off('DOMNodeInserted', '.navigation-bar'); + const observer = new MutationObserver(mutations => { + var targetNode + if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $('.navigation-bar')).length)) { + observer.disconnect(); + //initTooltips(); + targetNode.navigationBar({ + fitHeight: true, + collapseNavBarClass: 'fa-angle-double-left', + expandNavBarClass: 'fa-angle-double-right' + }); + } + }); + + setTimeout(() => { + // remove observer if selected element is not found in 10secs. + observer.disconnect(); + }, 10000) + + observer.observe(document.body, { + childList: true, + subtree: true }); } From 2cbf3fcc15f21a766b71ff3ef174a9ba2cff88ca Mon Sep 17 00:00:00 2001 From: jialiang Date: Wed, 4 Sep 2024 09:52:01 +0800 Subject: [PATCH 19/23] AMBARI-26114: Configure Chromium Browser in Jenkins file for Ambari (#3810) * AMBARI-26114: Configure Chromium Browser in Jenkins file for Ambari --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 638b6c8a212..489683ba863 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,11 +96,8 @@ pipeline { parallel { stage('Ambari WebUI Tests') { steps { - withEnv(['OPENSSL_CONF=/dev/null']) { - sh 'lsb_release -a' - sh 'mvn -T 2C -am test -pl ambari-web,ambari-admin -Dmaven.artifact.threads=10 -Drat.skip' - - } + sh 'export CHROME_BIN=/usr/bin/chromium-browser' + sh 'mvn -T 2C -am test -pl ambari-web,ambari-admin -Dmaven.artifact.threads=10 -Drat.skip' } } From 831d589b3b5dfba29c84094568e0fe844af852e2 Mon Sep 17 00:00:00 2001 From: zrain Date: Thu, 5 Sep 2024 11:07:44 +0800 Subject: [PATCH 20/23] AMBARI-26113: Switch the PhantomJS used by Karma tests to chromium-browser (#3809) --- .gitignore | 1 + Jenkinsfile | 5 +++-- ambari-admin/pom.xml | 4 ++-- .../main/resources/ui/admin-web/package.json | 4 +--- .../resources/ui/admin-web/test/karma.conf.js | 19 +++++++++++++++++-- ambari-web/app/router.js | 2 +- ambari-web/app/utils/helper.js | 13 +++++++++++++ .../main/admin/stack_upgrade/versions_view.js | 2 +- ambari-web/karma.conf.js | 11 +++++++++-- ambari-web/package.json | 3 +-- .../manage_config_groups_controller_test.js | 16 ++++++++-------- ambari-web/test/router_test.js | 6 +++--- .../admin/stack_upgrade/version_view_test.js | 12 ++++++------ 13 files changed, 66 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 2f961002639..6ed020ba068 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ createDDL.jdbc /dist /build ambari_python.egg-info +**/Crashpad diff --git a/Jenkinsfile b/Jenkinsfile index 489683ba863..2d0da33bf84 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,8 +96,9 @@ pipeline { parallel { stage('Ambari WebUI Tests') { steps { - sh 'export CHROME_BIN=/usr/bin/chromium-browser' - sh 'mvn -T 2C -am test -pl ambari-web,ambari-admin -Dmaven.artifact.threads=10 -Drat.skip' + withEnv(['CHROME_BIN=/usr/bin/chromium-browser']) { + sh 'mvn -T 2C -am test -pl ambari-web,ambari-admin -Dmaven.artifact.threads=10 -Drat.skip' + } } } diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index c88eb5e641d..d0c1bef4a59 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -135,7 +135,7 @@ ${args.shell} ${basedir}${dirsep}set-ambari-version.${fileextension.shell} ${ambariVersion} - + diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json b/ambari-admin/src/main/resources/ui/admin-web/package.json index d9995ac0239..a3b442c2b13 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/package.json +++ b/ambari-admin/src/main/resources/ui/admin-web/package.json @@ -21,11 +21,9 @@ "http-server": "0.6.1", "jasmine-core": "^3.1.0", "karma": "^2.0.4", - "karma-chrome-launcher": "0.1.4", "karma-jasmine": "^1.1.2", "karma-ng-html2js-preprocessor": "^1.0.0", - "karma-phantomjs-launcher": "^1.0.4", - "phantomjs": "^2.1.7", + "karma-chrome-launcher": "3.2.0", "protractor": "1.0.0" }, "scripts": { diff --git a/ambari-admin/src/main/resources/ui/admin-web/test/karma.conf.js b/ambari-admin/src/main/resources/ui/admin-web/test/karma.conf.js index bb514cd473f..fb6353e3b15 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/test/karma.conf.js +++ b/ambari-admin/src/main/resources/ui/admin-web/test/karma.conf.js @@ -42,13 +42,28 @@ module.exports = function(config){ autoWatch : true, + colors: true, + + logLevel: config.LOG_INFO, + + captureTimeout: 60000, + + browserNoActivityTimeout: 30000, + frameworks: ['jasmine'], - browsers: ['PhantomJS'], + customLaunchers: { + ChromeHeadlessCustom: { + base: 'ChromeHeadless', + flags: ['--no-sandbox', '--disable-gpu', '--disable-translate', '--disable-extensions'] + } + }, + + browsers: ['ChromeHeadlessCustom'], plugins : [ 'karma-jasmine', - 'karma-phantomjs-launcher', + 'karma-chrome-launcher', 'karma-ng-html2js-preprocessor' ], diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index c0a754a7eba..4d96cee6cdc 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -665,7 +665,7 @@ App.Router = Em.Router.extend({ }), sortedMappedVersions = mappedVersions.sort(), latestVersion = sortedMappedVersions[sortedMappedVersions.length-1].replace(/[^\d.-]/g, ''); - window.location.replace(App.appURLRoot + 'views/ADMIN_VIEW/' + latestVersion + '/INSTANCE/#/'); + App.replaceWindowLocation(App.appURLRoot + 'views/ADMIN_VIEW/' + latestVersion + '/INSTANCE/#/') } }, diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js index d05724d4d40..7cc652e31a2 100644 --- a/ambari-web/app/utils/helper.js +++ b/ambari-web/app/utils/helper.js @@ -1101,3 +1101,16 @@ App.logger = function() { }; }(); + +/** + * Replce cruuent window location. + * `window.location.replace` is a native function and cannot be intercepted by Sinon, + * it needs to be intercepted manually. See https://stackoverflow.com/a/52141931/14792586. + * + * Simple function, no test cases available. + * + * @param {string} location new location + **/ +App.replaceWindowLocation = function(location) { + window.location.replace(location); +} \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js index 386ec4db937..b7c048a4201 100644 --- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js +++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js @@ -230,7 +230,7 @@ App.MainAdminStackVersionsView = Em.View.extend({ }), sortedMappedVersions = mappedVersions.sort(), latestVersion = sortedMappedVersions[sortedMappedVersions.length-1].replace(/[^\d.-]/g, ''); - window.location.replace(App.appURLRoot + 'views/ADMIN_VIEW/' + latestVersion + '/INSTANCE/#!/stackVersions'); + App.replaceWindowLocation(App.appURLRoot + 'views/ADMIN_VIEW/' + latestVersion + '/INSTANCE/#/') } }); }, diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js index b19287f779e..b9e9212407b 100644 --- a/ambari-web/karma.conf.js +++ b/ambari-web/karma.conf.js @@ -23,7 +23,7 @@ module.exports = function(config) { basePath: '', plugins: [ - 'karma-phantomjs-launcher', + 'karma-chrome-launcher', 'karma-mocha', 'karma-chai', 'karma-sinon', @@ -159,6 +159,13 @@ module.exports = function(config) { // enable / disable watching file and executing tests whenever any file changes autoWatch: true, + + customLaunchers: { + ChromeHeadlessCustom: { + base: 'ChromeHeadless', + flags: ['--no-sandbox', '--disable-gpu', '--disable-translate', '--disable-extensions'] + } + }, // Start these browsers, currently available: // - Chrome @@ -167,7 +174,7 @@ module.exports = function(config) { // - Opera (has to be installed with `npm install karma-opera-launcher`) // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) - browsers: ['PhantomJS'], + browsers: ['ChromeHeadlessCustom'], // If browser does not capture in given timeout [ms], kill it captureTimeout: 60000, diff --git a/ambari-web/package.json b/ambari-web/package.json index 7fcc59dc820..b4203d97c80 100644 --- a/ambari-web/package.json +++ b/ambari-web/package.json @@ -27,7 +27,7 @@ "chai": "~3.5.0", "express": "2.5.8", "karma": ">=0.11.14", - "karma-phantomjs-launcher": "1.0.2", + "karma-chrome-launcher": "3.2.0", "karma-babel-preprocessor": "^6.0.1", "karma-chai": "~0.1.0", "karma-commonjs-require": "~0.0.3", @@ -36,7 +36,6 @@ "karma-mocha": "0.1.1", "karma-sinon": "~1.0.2", "mocha": "2.5.3", - "phantomjs": "~2.1.0", "sinon": "=1.7.3", "sinon-chai": "~2.8.0" }, diff --git a/ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js b/ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js index db3151ebec7..2995669d965 100644 --- a/ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js +++ b/ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js @@ -511,6 +511,7 @@ describe('App.ManageConfigGroupsController', function() { c._onLoadPropertiesSuccess(data, null, params); expect(JSON.stringify(c.get('configGroups'))).to.equal(JSON.stringify([ Em.Object.create({ + name: 'group1', properties: [ { name: 'prop1', @@ -522,32 +523,31 @@ describe('App.ManageConfigGroupsController', function() { value: 'val2', type: 'type1' } - ], - name: 'group1' + ] }), Em.Object.create({ + name: 'group2', properties: [ { name: 'prop3', value: 'val3', type: 'type1' } - ], - name: 'group2' + ] }), Em.Object.create({ + name: 'group3', properties: [ { name: 'prop4', value: 'val4', type: 'type2' } - ], - name: 'group3' + ] }), Em.Object.create({ - properties: [], - name: 'group4' + name: 'group4', + properties: [] }) ])); }); diff --git a/ambari-web/test/router_test.js b/ambari-web/test/router_test.js index c177bbf7490..88ee910492f 100644 --- a/ambari-web/test/router_test.js +++ b/ambari-web/test/router_test.js @@ -88,10 +88,10 @@ describe('App.Router', function () { describe('#adminViewInfoSuccessCallback', function () { beforeEach(function () { - sinon.stub(window.location, 'replace', Em.K); + sinon.stub(App, 'replaceWindowLocation', Em.K); }); afterEach(function () { - window.location.replace.restore(); + App.replaceWindowLocation.restore(); }); var tests = [{ @@ -138,7 +138,7 @@ describe('App.Router', function () { tests.forEach(function (data, index) { it('should redirect to the latest version of admin view ("' + data.expected + '") #' + (index + 1), function () { router.adminViewInfoSuccessCallback(data.mockData); - expect(window.location.replace.calledWith(data.expected)).to.be.true; + expect(App.replaceWindowLocation.calledWith(data.expected)).to.be.true; }); }); }); diff --git a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js index b274c32fb3d..11058e779e0 100644 --- a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js +++ b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js @@ -472,11 +472,11 @@ describe('App.mainAdminStackVersionsView', function () { }; before(function () { sinon.spy(App, 'showConfirmationPopup'); - sinon.stub(window.location, 'replace', Em.K); + sinon.stub(App, 'replaceWindowLocation', Em.K); }); after(function () { App.showConfirmationPopup.restore(); - window.location.replace.restore(); + App.replaceWindowLocation.restore(); }); beforeEach(function () { @@ -494,7 +494,7 @@ describe('App.mainAdminStackVersionsView', function () { popup.onPrimary(); var args = testHelpers.findAjaxRequest('name', 'ambari.service.load_server_version'); expect(args[0]).exists; - expect(window.location.replace.calledWith('/views/ADMIN_VIEW/2.1.0/INSTANCE/#!/stackVersions')).to.be.true; + expect(App.replaceWindowLocation.calledWith('/views/ADMIN_VIEW/2.1.0/INSTANCE/#/')).to.be.true; }); }); @@ -516,11 +516,11 @@ describe('App.mainAdminStackVersionsView', function () { }; before(function () { sinon.spy(App, 'showConfirmationPopup'); - sinon.stub(window.location, 'replace', Em.K); + sinon.stub(App, 'replaceWindowLocation', Em.K); }); after(function () { App.showConfirmationPopup.restore(); - window.location.replace.restore(); + App.replaceWindowLocation.restore(); }); beforeEach(function () { @@ -538,7 +538,7 @@ describe('App.mainAdminStackVersionsView', function () { popup.onPrimary(); var args = testHelpers.findAjaxRequest('name', 'ambari.service.load_server_version'); expect(args[0]).exists; - expect(window.location.replace.calledWith('/views/ADMIN_VIEW/2.1.0/INSTANCE/#!/stackVersions')).to.be.true; + expect(App.replaceWindowLocation.calledWith('/views/ADMIN_VIEW/2.1.0/INSTANCE/#/')).to.be.true; }); }); From 5aa5048fbb172441131ff3e10f5faae1dc500c2c Mon Sep 17 00:00:00 2001 From: jialiang Date: Sat, 7 Sep 2024 09:44:33 +0800 Subject: [PATCH 21/23] AMBARI-25971: Add yarn TimelineService V2 and Registrydns support (#3786) --- .../3.2.0/services/YARN/YARN_widgets.json | 61 +- .../BIGTOP/3.2.0/services/YARN/alerts.json | 86 +- .../YARN/configuration/container-executor.xml | 223 ++++ .../YARN/configuration/resource-types.xml | 47 + .../services/YARN/configuration/yarn-env.xml | 323 +++-- .../YARN/configuration/yarn-hbase-env.xml | 272 ++++ .../YARN/configuration/yarn-hbase-log4j.xml | 188 +++ .../YARN/configuration/yarn-hbase-policy.xml | 53 + .../YARN/configuration/yarn-hbase-site.xml | 634 +++++++++ .../services/YARN/configuration/yarn-site.xml | 1181 +++++++++++++++-- .../BIGTOP/3.2.0/services/YARN/kerberos.json | 223 +++- .../BIGTOP/3.2.0/services/YARN/metainfo.xml | 88 ++ .../YARN/package/alerts/alert_ats_hbase.py | 246 ++++ .../YARN/package/scripts/functions.py | 43 + .../YARN/package/scripts/hbase_service.py | 167 +++ .../YARN/package/scripts/historyserver.py | 22 + .../YARN/package/scripts/params_linux.py | 254 +++- .../services/YARN/package/scripts/service.py | 150 ++- .../YARN/package/scripts/status_params.py | 29 + .../YARN/package/scripts/timelinereader.py | 119 ++ .../services/YARN/package/scripts/yarn.py | 245 +++- .../YARN/package/scripts/yarn_registry_dns.py | 93 ++ .../hadoop-metrics2-hbase.properties.j2 | 62 + .../templates/input.config-yarn.json.j2 | 86 ++ .../package/templates/yarn_ats_jaas.conf.j2 | 9 + .../templates/yarn_hbase_grant_permissions.j2 | 39 + .../templates/yarn_hbase_master_jaas.conf.j2 | 36 + .../yarn_hbase_package_preparation.j2 | 76 ++ .../yarn_hbase_regionserver_jaas.conf.j2 | 36 + .../templates/yarn_hbase_secure.yarnfile.j2 | 172 +++ .../templates/yarn_hbase_unsecure.yarnfile.j2 | 168 +++ .../package/templates/yarn_nm_jaas.conf.j2 | 9 + .../templates/yarn_registry_dns_jaas.conf.j2 | 37 + .../YARN/properties/container-executor.cfg.j2 | 19 + .../services/YARN/quicklinks/quicklinks.json | 2 +- .../services/YARN/role_command_order.json | 4 +- 36 files changed, 5280 insertions(+), 222 deletions(-) create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/resource-types.xml create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-env.xml create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-log4j.xml create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-policy.xml create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-site.xml create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_ats_hbase.py create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/functions.py create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/hbase_service.py create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/timelinereader.py create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_registry_dns.py create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/hadoop-metrics2-hbase.properties.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/input.config-yarn.json.j2 mode change 100644 => 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_ats_jaas.conf.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_grant_permissions.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_master_jaas.conf.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_package_preparation.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_regionserver_jaas.conf.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_secure.yarnfile.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_unsecure.yarnfile.j2 create mode 100755 ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_registry_dns_jaas.conf.j2 diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/YARN_widgets.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/YARN_widgets.json index bef0dc03feb..ac91ad05692 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/YARN_widgets.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/YARN_widgets.json @@ -71,6 +71,35 @@ "time_range": "1" } }, + { + "widget_name": "Bad Local Disks", + "description": "Number of unhealthy local disks across all NodeManagers.", + "widget_type": "NUMBER", + "is_visible": true, + "metrics": [ + { + "name": "yarn.NodeManagerMetrics.BadLocalDirs", + "metric_path": "metrics/yarn/BadLocalDirs", + "service_name": "YARN", + "component_name": "NODEMANAGER" + }, + { + "name": "yarn.NodeManagerMetrics.BadLogDirs", + "metric_path": "metrics/yarn/BadLogDirs", + "service_name": "YARN", + "component_name": "NODEMANAGER" + } + ], + "values": [ + { + "name": "Number of unhealthy local disks for NodeManager", + "value": "${yarn.NodeManagerMetrics.BadLocalDirs + yarn.NodeManagerMetrics.BadLogDirs}" + } + ], + "properties": { + "display_unit": "" + } + }, { "widget_name": "Container Failures", "description": "Percentage of all containers failing in the cluster.", @@ -372,10 +401,40 @@ "section_name": "YARN_HEATMAPS", "widgetLayoutInfo": [ { - "widget_name": "Total Allocatable RAM Utilized per NodeManager", + "widget_name": "YARN local disk space utilization per NodeManager", "description": "", "widget_type": "HEATMAP", "is_visible": true, + "metrics": [ + { + "name": "yarn.NodeManagerMetrics.GoodLocalDirsDiskUtilizationPerc", + "metric_path": "metrics/yarn/GoodLocalDirsDiskUtilizationPerc", + "service_name": "YARN", + "component_name": "NODEMANAGER" + }, + { + "name": "yarn.NodeManagerMetrics.GoodLogDirsDiskUtilizationPerc", + "metric_path": "metrics/yarn/GoodLogDirsDiskUtilizationPerc", + "service_name": "YARN", + "component_name": "NODEMANAGER" + } + ], + "values": [ + { + "name": "YARN local disk space utilization per NodeManager", + "value": "${(yarn.NodeManagerMetrics.GoodLocalDirsDiskUtilizationPerc + yarn.NodeManagerMetrics.GoodLogDirsDiskUtilizationPerc)/2}" + } + ], + "properties": { + "display_unit": "%", + "max_limit": "100" + } + }, + { + "widget_name": "Total Allocatable RAM Utilized per NodeManager", + "description": "", + "widget_type": "HEATMAP", + "is_visible": false, "metrics": [ { "name": "yarn.NodeManagerMetrics.AllocatedGB", diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/alerts.json index f2962dc6f14..08b5e131e72 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/alerts.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/alerts.json @@ -99,7 +99,7 @@ "warning": { "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", "value": 3000 - }, + }, "critical": { "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", "value": 5000 @@ -316,7 +316,7 @@ "warning": { "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", "value": 3000 - }, + }, "critical": { "text": "Average Queue Time:[{0}], Average Processing Time:[{1}]", "value": 5000 @@ -387,6 +387,88 @@ } } } + ], + "YARN_REGISTRY_DNS": [ + { + "name": "YARN_REGISTRY_DNS_PROCESS", + "label": "Registry DNS", + "description": "This host-level alert is triggered if the Registry DNS Service cannot be determined to be up and listening on the network.", + "interval": 1, + "scope": "HOST", + "source": { + "type": "PORT", + "uri": "{{yarn-env/registry.dns.bind-port}}", + "default_port": 53, + "reporting": { + "ok": { + "text": "TCP OK - {0:.3f}s response on port {1}" + }, + "warning": { + "text": "TCP OK - {0:.3f}s response on port {1}", + "value": 1.5 + }, + "critical": { + "text": "Connection failed: {0} to {1}:{2}", + "value": 5 + } + } + } + } + ], + "TIMELINE_READER": [ + { + "name": "yarn_timeline_reader_webui", + "label": "Timeline Reader Web UI", + "description": "This host-level alert is triggered if Timeline Reader Web UI is unreachable.", + "interval": 1, + "scope": "ANY", + "source": { + "type": "WEB", + "uri": { + "http": "{{yarn-site/yarn.timeline-service.reader.webapp.address}}/ws/v2/timeline", + "https": "{{yarn-site/yarn.timeline-service.reader.webapp.https.address}}/ws/v2/timeline", + "https_property": "{{yarn-site/yarn.http.policy}}", + "https_property_value": "HTTPS_ONLY", + "kerberos_keytab": "{{cluster-env/smokeuser_keytab}}", + "kerberos_principal": "{{cluster-env/smokeuser_principal_name}}", + "connection_timeout": 5.0 + }, + "reporting": { + "ok": { + "text": "HTTP {0} response in {2:.3f}s" + }, + "warning":{ + "text": "HTTP {0} response from {1} in {2:.3f}s ({3})" + }, + "critical": { + "text": "Connection failed to {1} ({3})" + } + } + } + }, + { + "name": "ats_hbase", + "label": "ATSv2 HBase Application", + "description": "This alert is triggered if the ats hbase cannot be determined to be up and responding to requests.", + "interval": 5, + "scope": "ANY", + "enabled": true, + "source": { + "type": "SCRIPT", + "path": "BIGTOP/3.2.0/services/YARN/package/alerts/alert_ats_hbase.py", + "parameters": [ + { + "name": "check.command.timeout", + "display_name": "Command Timeout", + "value": 120.0, + "type": "NUMERIC", + "description": "The maximum time before check command will be killed by timeout", + "units": "seconds", + "threshold": "CRITICAL" + } + ] + } + } ] } } diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/container-executor.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/container-executor.xml index e19fe9049b6..bce09f90ebd 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/container-executor.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/container-executor.xml @@ -20,6 +20,229 @@ */ --> + + docker_module_enabled + false + Docker Runtime + Need user to pre-install docker environment first. + + + value-list + + + true + + + + false + + + + 1 + + + + + + docker_binary + /usr/bin/docker + Docker Binary + The binary used to launch docker containers. + + directory + true + + + + + + docker_allowed_devices + + Docker Allowed Devices + Comma seperated list of devices that can be mounted into a + container. + + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + + + docker_allowed_ro-mounts + + Docker Allowed Read-only Mounts + + Comma seperated volumes that can be mounted as read-only. + + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + + + docker_allowed_rw-mounts + + Docker Allowed Read-write Mounts + + Comma seperate volumes that can be mounted as read-write. Add the + yarn + local and log dirs to this list to run Hadoop jobs. + + + true + + + + + + docker_allowed_volume-drivers + + Docker Allowed Volume-drivers + + Comma seperated list of allowed volume-drivers. + + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + + + docker_privileged-containers_enabled + false + Enable Launching Privileged Containers + + Whether to enable launching privileged docker containers. + + + boolean + + + + + + docker_trusted_registries + + Docker Trusted Registries + + List of registries whose docker images are allowed to mount volumes and launch privileged docker containers. + + + true + + + + + + min_user_id + 1000 + Minimum user ID for submitting job + Set to 0 to disallow root from submitting jobs. Set to 1000 to + disallow all superusers from submitting jobs + + int + + + + + + gpu_module_enabled + false + GPU Scheduling and Isolation + Whether to enable gpu scheduling and isolation. + + + value-list + + + true + + + + false + + + + 1 + + + + + + cgroup_root + /sys/fs/cgroup + CGroup Root Path + This should be same as + yarn.nodemanager.linux-container-executor.cgroups.mount-path inside + yarn-site.xml + + + container-executor + gpu_module_enabled + + + + directory + true + + + + + + yarn_hierarchy + yarn + Yarn CGroup Hierarchy + This should be same as + yarn.nodemanager.linux-container-executor.cgroups.hierarchy + inside yarn-site.xml + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + content container-executor configuration template diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/resource-types.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/resource-types.xml new file mode 100755 index 00000000000..65e8254513a --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/resource-types.xml @@ -0,0 +1,47 @@ + + + + + yarn.resource-types + + Enable resource types other than memory and vcores, values split by comma. For example value=yarn.io/gpu enables GPU resource types + + true + + + + container-executor + gpu_module_enabled + + + + + + yarn.resource-types.yarn.io_gpu.maximum-allocation + 8 + Maximum Container Size (GPU) + Maximum GPU Allocation + + int + 0 + 8 + 1 + + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-env.xml index 81ff757f7a7..726bd83027e 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-env.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-env.xml @@ -59,7 +59,25 @@ - + + + + yarn_ats_user + Yarn ATS User + yarn-ats + USER + YARN Client User for ATSv2 backend + + user + false + + + cluster-env + user_group + + + + yarn_heapsize @@ -121,138 +139,232 @@ yarn_user_nproc_limit 65536 Max number of processes limit setting for YARN user. - + + + + + + apptimelineserver_heapsize + 1024 + AppTimelineServer Java heap size + Max heapsize for AppTimelineServer using a numerical value in the scale of MB + + false + MB + int + + + + + + + yarn_cgroups_enabled + false + You can use CGroups to isolate CPU-heavy processes in a Hadoop cluster. + CPU Scheduling and Isolation + + value-list + + + true + + + + false + + + + 1 + + + + container-executor + gpu_module_enabled + + + + + + registry.dns.bind-port + RegistryDNS Bind Port + 53 + + The port number for the DNS listener. The default port is 53. + + + + content yarn-env template This is the jinja template for yarn-env.sh file -export HADOOP_YARN_HOME={{hadoop_yarn_home}} -USER="$(whoami)" -export HADOOP_LOG_DIR={{yarn_log_dir_prefix}}/$USER -export HADOOP_PID_DIR={{yarn_pid_dir_prefix}}/$USER -export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}} -export JAVA_HOME={{java64_home}} -export JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH}:{{hadoop_java_io_tmpdir}}" + export HADOOP_YARN_HOME={{hadoop_yarn_home}} + USER="$(whoami)" + export HADOOP_LOG_DIR={{yarn_log_dir_prefix}}/$USER + export HADOOP_PID_DIR={{yarn_pid_dir_prefix}}/$USER + export HADOOP_SECURE_LOG_DIR={{yarn_log_dir_prefix}}/$USER + export HADOOP_SECURE_PID_DIR={{yarn_pid_dir_prefix}}/$USER + export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}} + export JAVA_HOME={{java64_home}} + export JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH}:{{hadoop_java_io_tmpdir}}" + + # We need to add the EWMA and RFA appender for the yarn daemons only; + # however, HADOOP_ROOT_LOGGER is shared by the yarn client and the + # daemons. This is restrict the EWMA appender to daemons only. + export HADOOP_LOGLEVEL=${HADOOP_LOGLEVEL:-INFO} + export HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-INFO,console} + export HADOOP_DAEMON_ROOT_LOGGER=${HADOOP_DAEMON_ROOT_LOGGER:-${HADOOP_LOGLEVEL},EWMA,RFA} + + # User for YARN daemons + export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn} + # resolve links - $0 may be a softlink + export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/etc/hadoop}" + # some Java parameters + # export JAVA_HOME=/home/y/libexec/jdk1.6.0/ + if [ "$JAVA_HOME" != "" ]; then + #echo "run java in $JAVA_HOME" + JAVA_HOME=$JAVA_HOME + fi -# User for YARN daemons -export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn} + if [ "$JAVA_HOME" = "" ]; then + echo "Error: JAVA_HOME is not set." + exit 1 + fi -# resolve links - $0 may be a softlink -export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/etc/hadoop}" + JAVA=$JAVA_HOME/bin/java + JAVA_HEAP_MAX=-Xmx1000m -# some Java parameters -# export JAVA_HOME=/home/y/libexec/jdk1.6.0/ -if [ "$JAVA_HOME" != "" ]; then - #echo "run java in $JAVA_HOME" - JAVA_HOME=$JAVA_HOME -fi + # For setting YARN specific HEAP sizes please use this + # Parameter and set appropriately + YARN_HEAPSIZE={{yarn_heapsize}} -if [ "$JAVA_HOME" = "" ]; then - echo "Error: JAVA_HOME is not set." - exit 1 -fi + # check envvars which might override default args + if [ "$YARN_HEAPSIZE" != "" ]; then + JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m" + fi -JAVA=$JAVA_HOME/bin/java -JAVA_HEAP_MAX=-Xmx1000m + # Resource Manager specific parameters -# For setting YARN specific HEAP sizes please use this -# Parameter and set appropriately -YARN_HEAPSIZE={{yarn_heapsize}} + # Specify the max Heapsize for the ResourceManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either HADOOP_OPTS + # and/or YARN_RESOURCEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}} -# check envvars which might override default args -if [ "$YARN_HEAPSIZE" != "" ]; then - JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m" -fi + # Specify the JVM options to be used when starting the ResourceManager. + # These options will be appended to the options specified as HADOOP_OPTS + # and therefore may override any similar flags set in HADOOP_OPTS + {% if security_enabled %} + export YARN_RESOURCEMANAGER_OPTS="-Djava.security.auth.login.config={{yarn_jaas_file}}" + {% endif %} -# Resource Manager specific parameters + # Node Manager specific parameters -# Specify the max Heapsize for the ResourceManager using a numerical value -# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set -# the value to 1000. -# This value will be overridden by an Xmx setting specified in either HADOOP_OPTS -# and/or YARN_RESOURCEMANAGER_OPTS. -# If not specified, the default value will be picked from either YARN_HEAPMAX -# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. -export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}} + # Specify the max Heapsize for the NodeManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either HADOOP_OPTS + # and/or YARN_NODEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}} -# Specify the JVM options to be used when starting the ResourceManager. -# These options will be appended to the options specified as HADOOP_OPTS -# and therefore may override any similar flags set in HADOOP_OPTS -#export YARN_RESOURCEMANAGER_OPTS= + # Specify the max Heapsize for the timeline server using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1024. + # This value will be overridden by an Xmx setting specified in either HADOOP_OPTS + # and/or YARN_TIMELINESERVER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_TIMELINESERVER_HEAPSIZE={{apptimelineserver_heapsize}} -# Node Manager specific parameters + {% if security_enabled %} + export YARN_TIMELINESERVER_OPTS="-Djava.security.auth.login.config={{yarn_ats_jaas_file}}" + {% endif %} -# Specify the max Heapsize for the NodeManager using a numerical value -# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set -# the value to 1000. -# This value will be overridden by an Xmx setting specified in either HADOOP_OPTS -# and/or YARN_NODEMANAGER_OPTS. -# If not specified, the default value will be picked from either YARN_HEAPMAX -# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. -export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}} + {% if security_enabled %} + export YARN_TIMELINEREADER_OPTS="-Djava.security.auth.login.config={{yarn_ats_jaas_file}}" + {% endif %} -# Specify the max Heapsize for the HistoryManager using a numerical value -# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set -# the value to 1024. -# This value will be overridden by an Xmx setting specified in either HADOOP_OPTS -# and/or YARN_HISTORYSERVER_OPTS. -# If not specified, the default value will be picked from either YARN_HEAPMAX -# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. -export YARN_HISTORYSERVER_HEAPSIZE={{apptimelineserver_heapsize}} + {% if security_enabled %} + export YARN_REGISTRYDNS_OPTS="-Djava.security.auth.login.config={{yarn_registry_dns_jaas_file}}" + {% endif %} -# Specify the JVM options to be used when starting the NodeManager. -# These options will be appended to the options specified as HADOOP_OPTS -# and therefore may override any similar flags set in HADOOP_OPTS -#export YARN_NODEMANAGER_OPTS= + # Specify the JVM options to be used when starting the NodeManager. + # These options will be appended to the options specified as HADOOP_OPTS + # and therefore may override any similar flags set in HADOOP_OPTS + {% if security_enabled %} + export YARN_NODEMANAGER_OPTS="-Djava.security.auth.login.config={{yarn_nm_jaas_file}} -Dsun.security.krb5.rcache=none" + {% endif %} -# so that filenames w/ spaces are handled correctly in loops below -IFS= + # so that filenames w/ spaces are handled correctly in loops below + IFS= -# default log directory and file -if [ "$HADOOP_LOG_DIR" = "" ]; then - HADOOP_LOG_DIR="$HADOOP_YARN_HOME/logs" -fi -if [ "$HADOOP_LOGFILE" = "" ]; then - HADOOP_LOGFILE='yarn.log' -fi + # default log directory and file + if [ "$HADOOP_LOG_DIR" = "" ]; then + HADOOP_LOG_DIR="$HADOOP_YARN_HOME/logs" + fi + if [ "$HADOOP_LOGFILE" = "" ]; then + HADOOP_LOGFILE='yarn.log' + fi -# default policy file for service-level authorization -if [ "$YARN_POLICYFILE" = "" ]; then - YARN_POLICYFILE="hadoop-policy.xml" -fi + # default policy file for service-level authorization + if [ "$YARN_POLICYFILE" = "" ]; then + YARN_POLICYFILE="hadoop-policy.xml" + fi -# restore ordinary behaviour -unset IFS + # restore ordinary behaviour + unset IFS + # YARN now uses specific subcommand options of the pattern (command)_(subcommand)_OPTS for every + # component. Because of this, HADDOP_OPTS is now used as a simple way to specify common properties + # between all YARN components. + HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR" + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.log.dir=$HADOOP_LOG_DIR" + HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE" + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.log.file=$HADOOP_LOGFILE" + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME" + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.id.str=$HADOOP_IDENT_STRING" + HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}" + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}" + export YARN_NODEMANAGER_OPTS="$YARN_NODEMANAGER_OPTS -Dnm.audit.logger=INFO,NMAUDIT" + export YARN_RESOURCEMANAGER_OPTS="$YARN_RESOURCEMANAGER_OPTS -Drm.audit.logger=INFO,RMAUDIT" + if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then + HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" + fi + HADOOP_OPTS="$HADOOP_OPTS -Dyarn.policy.file=$YARN_POLICYFILE" + HADOOP_OPTS="$HADOOP_OPTS -Djava.io.tmpdir={{hadoop_java_io_tmpdir}}" -HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR" -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.log.dir=$HADOOP_LOG_DIR" -HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE" -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.log.file=$HADOOP_LOGFILE" -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME" -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.id.str=$HADOOP_IDENT_STRING" -HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}" -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}" -export YARN_NODEMANAGER_OPTS="$YARN_NODEMANAGER_OPTS -Dnm.audit.logger=INFO,NMAUDIT" -export YARN_RESOURCEMANAGER_OPTS="$YARN_RESOURCEMANAGER_OPTS -Drm.audit.logger=INFO,RMAUDIT" -if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then - HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" -fi -HADOOP_OPTS="$HADOOP_OPTS -Dyarn.policy.file=$YARN_POLICYFILE" -HADOOP_OPTS="$HADOOP_OPTS -Djava.io.tmpdir={{hadoop_java_io_tmpdir}}" + {% if security_enabled %} + HADOOP_OPTS="$HADOOP_OPTS -Djavax.security.auth.useSubjectCredsOnly=false" + {% endif %} -{% if rm_security_opts is defined %} -HADOOP_OPTS="{{rm_security_opts}} $HADOOP_OPTS" -{% endif %} + {% if rm_security_opts is defined %} + YARN_RESOURCEMANAGER_OPTS="{{rm_security_opts}} $YARN_RESOURCEMANAGER_OPTS" + {% endif %} + + export YARN_NODEMANAGER_OPTS="$YARN_NODEMANAGER_OPTS -Dnm.audit.logger=INFO,NMAUDIT" + export YARN_RESOURCEMANAGER_OPTS="$YARN_RESOURCEMANAGER_OPTS -Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY -Drm.audit.logger=INFO,RMAUDIT" + + {% if registry_dns_needs_privileged_access %} + # If the DNS server is configured to use the standard privileged port 53, + # the environment variables YARN_REGISTRYDNS_SECURE_USER and + # YARN_REGISTRYDNS_SECURE_EXTRA_OPTS must be set. + export YARN_REGISTRYDNS_SECURE_USER={{yarn_user}} + export YARN_REGISTRYDNS_SECURE_EXTRA_OPTS="-jvm server" + {% endif %} content - + service_check.queue.name @@ -268,4 +380,15 @@ HADOOP_OPTS="{{rm_security_opts}} $HADOOP_OPTS" + + yarn_ats_principal_name + Yarn Client principal name + KERBEROS_PRINCIPAL + + + + yarn_ats_user_keytab + Yarn Client keytab path + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-env.xml new file mode 100755 index 00000000000..66fe45c7663 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-env.xml @@ -0,0 +1,272 @@ + + + + + + + yarn_hbase_pid_dir_prefix + /var/run/hadoop-yarn-hbase + HBase PID Dir + Pid Directory for HBase. + + directory + false + true + + + + + hbase_java_io_tmpdir + /tmp + Used in hbase-env.sh as HBASE_OPTS=-Djava.io.tmpdir=java_io_tmpdir + + directory + + + + + + content + hbase-env template + This is the jinja template for hbase-env.sh file + + # Set environment variables here. + + # The java implementation to use. Java 1.6 required. + export JAVA_HOME={{java64_home}} + + # HBase Configuration directory + export HBASE_CONF_DIR=${HBASE_CONF_DIR:-{{yarn_hbase_conf_dir}}} + + # Extra Java CLASSPATH elements. Optional. + export HBASE_CLASSPATH=${HBASE_CLASSPATH} + + + # The maximum amount of heap to use. Default is left to JVM default. + # export HBASE_HEAPSIZE=4G + + # Extra Java runtime options. + # Below are what we set by default. May only work with SUN JVM. + # For more on why as well as other possible settings, + # see http://wiki.apache.org/hadoop/PerformanceTuning + export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{yarn_hbase_log_dir}}/gc.log-`date +'%Y%m%d%H%M'`" + # Uncomment below to enable java garbage collection logging. + # export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$HBASE_HOME/logs/gc-hbase.log" + + # Uncomment and adjust to enable JMX exporting + # See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access. + # More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html + # + # export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" + # If you want to configure BucketCache, specify '-XX: MaxDirectMemorySize=' with proper direct memory size + # export HBASE_THRIFT_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103" + # export HBASE_ZOOKEEPER_OPTS="$HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104" + + # File naming hosts on which HRegionServers will run. $HBASE_HOME/conf/regionservers by default. + export HBASE_REGIONSERVERS=${HBASE_CONF_DIR}/regionservers + + # Extra ssh options. Empty by default. + # export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR" + + # Where log files are stored. $HBASE_HOME/logs by default. + export HBASE_LOG_DIR=${HBASE_LOG_DIR:-{{yarn_hbase_log_dir}}} + + # A string representing this instance of hbase. $USER by default. + # export HBASE_IDENT_STRING=$USER + + # The scheduling priority for daemon processes. See 'man nice'. + # export HBASE_NICENESS=10 + + # The directory where pid files are stored. /tmp by default. + export HBASE_PID_DIR=${HBASE_PID_DIR:-{{yarn_hbase_pid_dir}}} + + # Seconds to sleep between slave commands. Unset by default. This + # can be useful in large clusters, where, e.g., slave rsyncs can + # otherwise arrive faster than the master can service them. + # export HBASE_SLAVE_SLEEP=0.1 + + # Tell HBase whether it should manage it's own instance of Zookeeper or not. + export HBASE_MANAGES_ZK=false + + {% if java_version < 8 %} + JDK_DEPENDED_OPTS="-XX:PermSize=128m -XX:MaxPermSize=128m" + {% endif %} + + export HBASE_OPTS="$HBASE_OPTS -XX:+UseConcMarkSweepGC -XX:ErrorFile=$HBASE_LOG_DIR/hs_err_pid%p.log -Djava.io.tmpdir={{yarn_hbase_java_io_tmpdir}}" + export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xmx{{yarn_hbase_master_heapsize}} $JDK_DEPENDED_OPTS" + export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:CMSInitiatingOccupancyFraction=70 -XX:ReservedCodeCacheSize=256m -Xms{{yarn_hbase_regionserver_heapsize}} -Xmx{{yarn_hbase_regionserver_heapsize}} $JDK_DEPENDED_OPTS" + + {% if security_enabled %} + export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Djava.security.auth.login.config={{yarn_hbase_master_jaas_file}}" + export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Djava.security.auth.login.config={{yarn_hbase_regionserver_jaas_file}}" + {% endif %} + + + content + + + + + is_hbase_system_service_launch + false + Should Hbase cluster started as system service. This + configuration depends on use_external_hbase property. If + use_external_hbase is set, then this property doesn't take effect. + + + boolean + + + + + yarn_hbase_system_service_queue_name + default + + The queue that used by service check. + + + + capacity-scheduler + yarn.scheduler.capacity.root.queues + + + + + + yarn_hbase_system_service_launch_mode + sync + Should services are launched as sync or async. + + + + + yarn_hbase_master_cpu + 1 + Number of CPU for master container. + + + + yarn_hbase_master_memory + 4096 + master container memory in MB. + + int + 2048 + 4096 + MB + 256 + + + + + yarn_hbase_master_containers + 1 + Number of containers to launch for master. + + + + + yarn_hbase_regionserver_cpu + 1 + Number of CPU for regionserver container. + + + + yarn_hbase_regionserver_memory + 4096 + regionserver container memory in MB. + + int + 2048 + 4096 + MB + 256 + + + + + yarn_hbase_regionserver_containers + 1 + Number of containers to launch for regionserver. + + + + + yarn_hbase_client_cpu + 1 + Number of CPU for client container. + + + + yarn_hbase_client_memory + 1536 + client container memory in MB. + + int + 1024 + 2048 + MB + 256 + + + + + yarn_hbase_client_containers + 1 + Number of containers to launch for client. + + + + yarn_hbase_heap_memory_factor + 0.8 + Heap memory is auto derived using this factor. + + + + use_external_hbase + false + Setting true, doesn't start embedded hbase or system service + hbase. Note: Admin/User need to take care of pointing right hbase-site.xml + into RM/NM classpath. If system service hbase is started, then admin must + clean up system service hbase before making this change. + + boolean + + + + + + hbase_within_cluster + false + Set to true, YARN will use the HBase installed on this cluster by Ambari for storage. + + boolean + + + + + + yarn_hbase_log_level + INFO + Setting log level to hmaster and regionserver. Default to info logs. Log levels could be INFO, DEBUG, WARN + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-log4j.xml new file mode 100755 index 00000000000..ee3dcce2325 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-log4j.xml @@ -0,0 +1,188 @@ + + + + + + hbase_log_maxfilesize + 256 + The maximum size of backup file before the log is rotated + HBase Log: backup file size + + MB + + + + + hbase_log_maxbackupindex + 20 + The number of backup files + HBase Log: # of backup files + + int + 0 + + + + + hbase_security_log_maxfilesize + 256 + The maximum size of security backup file before the log is rotated + HBase Security Log: backup file size + + MB + + + + + hbase_security_log_maxbackupindex + 20 + The number of security backup files + HBase Security Log: # of backup files + + int + 0 + + + + + content + hbase-log4j template + Custom log4j.properties + + # 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. + + + # Define some default values that can be overridden by system properties + hbase.root.logger=INFO,console + hbase.security.logger=INFO,console + hbase.log.dir=. + hbase.log.file=hbase.log + + # Define the root logger to the system property "hbase.root.logger". + log4j.rootLogger=${hbase.root.logger} + + # Logging Threshold + log4j.threshold=ALL + + # + # Daily Rolling File Appender + # + log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender + log4j.appender.DRFA.File=${hbase.log.dir}/${hbase.log.file} + + # Rollver at midnight + log4j.appender.DRFA.DatePattern=.yyyy-MM-dd + + # 30-day backup + #log4j.appender.DRFA.MaxBackupIndex=30 + log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout + + # Pattern format: Date LogLevel LoggerName LogMessage + log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n + + # Rolling File Appender properties + hbase.log.maxfilesize={{hbase_log_maxfilesize}}MB + hbase.log.maxbackupindex={{hbase_log_maxbackupindex}} + + # Rolling File Appender + log4j.appender.RFA=org.apache.log4j.RollingFileAppender + log4j.appender.RFA.File=${hbase.log.dir}/${hbase.log.file} + + log4j.appender.RFA.MaxFileSize=${hbase.log.maxfilesize} + log4j.appender.RFA.MaxBackupIndex=${hbase.log.maxbackupindex} + + log4j.appender.RFA.layout=org.apache.log4j.PatternLayout + log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n + + # + # Security audit appender + # + hbase.security.log.file=SecurityAuth.audit + hbase.security.log.maxfilesize={{hbase_security_log_maxfilesize}}MB + hbase.security.log.maxbackupindex={{hbase_security_log_maxbackupindex}} + log4j.appender.RFAS=org.apache.log4j.RollingFileAppender + log4j.appender.RFAS.File=${hbase.log.dir}/${hbase.security.log.file} + log4j.appender.RFAS.MaxFileSize=${hbase.security.log.maxfilesize} + log4j.appender.RFAS.MaxBackupIndex=${hbase.security.log.maxbackupindex} + log4j.appender.RFAS.layout=org.apache.log4j.PatternLayout + log4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n + log4j.category.SecurityLogger=${hbase.security.logger} + log4j.additivity.SecurityLogger=false + #log4j.logger.SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController=TRACE + + # + # Null Appender + # + log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender + + # + # console + # Add "console" to rootlogger above if you want to use this + # + log4j.appender.console=org.apache.log4j.ConsoleAppender + log4j.appender.console.target=System.err + log4j.appender.console.layout=org.apache.log4j.PatternLayout + log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n + + # Custom Logging levels + + log4j.logger.org.apache.zookeeper=INFO + #log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG + log4j.logger.org.apache.hadoop.hbase=INFO + # Make these two classes INFO-level. Make them DEBUG to see more zk debug. + log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKUtil=INFO + log4j.logger.org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher=INFO + #log4j.logger.org.apache.hadoop.dfs=DEBUG + # Set this class to log INFO only otherwise its OTT + # Enable this to get detailed connection error/retry logging. + # log4j.logger.org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation=TRACE + + + # Uncomment this line to enable tracing on _every_ RPC call (this can be a lot of output) + #log4j.logger.org.apache.hadoop.ipc.HBaseServer.trace=DEBUG + + # Uncomment the below if you want to remove logging of client region caching' + # and scan of .META. messages + # log4j.logger.org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation=INFO + # log4j.logger.org.apache.hadoop.hbase.client.MetaScanner=INFO + + + + content + false + + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-policy.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-policy.xml new file mode 100755 index 00000000000..548352b8221 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-policy.xml @@ -0,0 +1,53 @@ + + + + + + security.client.protocol.acl + * + ACL for HRegionInterface protocol implementations (ie. + clients talking to HRegionServers) + The ACL is a comma-separated list of user and group names. The user and + group list is separated by a blank. For e.g. "alice,bob users,wheel". + A special value of "*" means all users are allowed. + + + + security.admin.protocol.acl + * + ACL for HMasterInterface protocol implementation (ie. + clients talking to HMaster for admin operations). + The ACL is a comma-separated list of user and group names. The user and + group list is separated by a blank. For e.g. "alice,bob users,wheel". + A special value of "*" means all users are allowed. + + + + security.masterregion.protocol.acl + * + ACL for HMasterRegionInterface protocol implementations + (for HRegionServers communicating with HMaster) + The ACL is a comma-separated list of user and group names. The user and + group list is separated by a blank. For e.g. "alice,bob users,wheel". + A special value of "*" means all users are allowed. + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-site.xml new file mode 100755 index 00000000000..d6a34f8de82 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-hbase-site.xml @@ -0,0 +1,634 @@ + + + + + + + hbase.rootdir + /atsv2/hbase/data + + + + hbase.cluster.distributed + true + + The mode the cluster will be in. Possible values are false for + standalone mode and true for distributed mode. If false, startup will run + all HBase and ZooKeeper daemons together in the one JVM. + + + + hbase.master.port + 17000 + HBase Master Port + + int + false + + + + + hbase.tmp.dir + /tmp/hbase-${user.name} + HBase tmp directory + + directory + + + + + hbase.local.dir + ${hbase.tmp.dir}/local + + + + hbase.master.info.bindAddress + 0.0.0.0 + + + + hbase.master.info.port + 17010 + + + + hbase.regionserver.info.port + 17030 + + + + zookeeper.session.timeout + 90000 + Zookeeper Session Timeout + + int + 10000 + 180000 + milliseconds + 10000 + + + + + hbase.client.retries.number + 7 + Maximum retries. Used as maximum for all retryable + operations such as the getting of a cell's value, starting a row update, + etc. Retry interval is a rough function based on hbase.client.pause. At + first we retry at this interval but then with backoff, we pretty quickly reach + retrying every ten seconds. See HConstants#RETRY_BACKOFF for how the backup + ramps up. Change this setting and hbase.client.pause to suit your workload. + Maximum Client Retries + + int + 5 + 50 + 1 + + + + + hbase.rpc.timeout + 90000 + + This is for the RPC layer to define how long HBase client applications + take for a remote call to time out. It uses pings to check connections + but will eventually throw a TimeoutException. + + HBase RPC Timeout + + int + 10000 + 180000 + milliseconds + 10000 + + + + + hbase.zookeeper.quorum + {{zookeeper_quorum_hosts}} + + + + + hbase.zookeeper.property.clientPort + {{zookeeper_clientPort}} + + + + + zookeeper.znode.parent + {{zookeeper_znode_parent}} + + + + hbase.regionserver.port + 17020 + + + + + hbase.regionserver.handler.count + 30 + + Count of RPC Listener instances spun up on RegionServers. + Same property is used by the Master for count of master handlers. + + Number of Handlers per RegionServer + + int + 5 + 240 + 1 + + + + + hbase.hregion.majorcompaction + 604800000 + Time between major compactions, expressed in milliseconds. Set to 0 to disable + time-based automatic major compactions. User-requested and size-based major compactions will + still run. This value is multiplied by hbase.hregion.majorcompaction.jitter to cause + compaction to start at a somewhat-random time during a given window of time. The default value + is 7 days, expressed in milliseconds. If major compactions are causing disruption in your + environment, you can configure them to run at off-peak times for your deployment, or disable + time-based major compactions by setting this parameter to 0, and run major compactions in a + cron job or by another external mechanism. + Major Compaction Interval + + int + 0 + 2592000000 + milliseconds + + + + + hbase.hregion.memstore.block.multiplier + 4 + + Block updates if memstore has hbase.hregion.memstore.block.multiplier + times hbase.hregion.memstore.flush.size bytes. Useful preventing + runaway memstore during spikes in update traffic. Without an + upper-bound, memstore fills such that when it flushes the + resultant flush files take a long time to compact or split, or + worse, we OOME. + + HBase Region Block Multiplier + + value-list + + + 2 + + + 4 + + + 8 + + + 1 + + + + + hbase.hregion.memstore.flush.size + 134217728 + + The size of an individual memstore. Each column familiy within each region is allocated its own memstore. + + Memstore Flush Size + + int + 33554432 + 268435456 + 1048576 + B + + + + + hbase.hregion.memstore.mslab.enabled + true + + Enables the MemStore-Local Allocation Buffer, + a feature which works to prevent heap fragmentation under + heavy write loads. This can reduce the frequency of stop-the-world + GC pauses on large heaps. + + + boolean + + + + + hbase.hregion.max.filesize + 10737418240 + + Maximum HFile size. If the sum of the sizes of a region's HFiles has grown to exceed this + value, the region is split in two. + + Maximum Region File Size + + int + 1073741824 + 107374182400 + B + 1073741824 + + + + + hbase.client.scanner.caching + 100 + Number of rows that will be fetched when calling next + on a scanner if it is not served from (local, client) memory. Higher + caching values will enable faster scanners but will eat up more memory + and some calls of next may take longer and longer times when the cache is empty. + Do not set this value such that the time between invocations is greater + than the scanner timeout; i.e. hbase.regionserver.lease.period + + Number of Fetched Rows when Scanning from Disk + + int + 100 + 10000 + 100 + rows + + + + + hbase.client.keyvalue.maxsize + 1048576 + + Specifies the combined maximum allowed size of a KeyValue + instance. This is to set an upper boundary for a single entry saved in a + storage file. Since they cannot be split it helps avoiding that a region + cannot be split any further because the data is too large. It seems wise + to set this to a fraction of the maximum region size. Setting it to zero + or less disables the check. + + Maximum Record Size + + int + 1048576 + 31457280 + B + 262144 + + + + + hbase.hstore.compactionThreshold + 3 + + The maximum number of StoreFiles which will be selected for a single minor + compaction, regardless of the number of eligible StoreFiles. Effectively, the value of + hbase.hstore.compaction.max controls the length of time it takes a single compaction to + complete. Setting it larger means that more StoreFiles are included in a compaction. For most + cases, the default value is appropriate. + + Maximum Store Files before Minor Compaction + + int + + + 2 + + + 3 + + + 4 + + + + + + + hbase.hstore.blockingStoreFiles + hstore blocking storefiles + 10 + + If more than this number of StoreFiles in any one Store + (one StoreFile is written per flush of MemStore) then updates are + blocked for this HRegion until a compaction is completed, or + until hbase.hstore.blockingWaitTime has been exceeded. + + + int + + + + + hfile.block.cache.size + 0.40 + Percentage of RegionServer memory to allocate to read buffers. + % of RegionServer Allocated to Read Buffers + + float + 0 + 0.8 + 0.01 + + + + + + hbase.superuser + yarn + List of users or groups (comma-separated), who are allowed + full privileges, regardless of stored ACLs, across the cluster. + Only used when HBase security is enabled. + + + + hbase-env + hbase_user + + + + + + hbase.security.authentication + simple + + Select Simple or Kerberos authentication. Note: Kerberos must be set up before the Kerberos option will take effect. + + Enable Authentication + + value-list + + + + simple + + + + kerberos + + + 1 + + + + + hbase.security.authorization + false + Set Authorization Method. + Enable Authorization + + value-list + + + true + + + + false + + + + 1 + + + + + hbase.coprocessor.region.classes + + A comma-separated list of Coprocessors that are loaded by + default on all tables. For any override coprocessor method, these classes + will be called in order. After implementing your own Coprocessor, just put + it in HBase's classpath and add the fully qualified class name here. + A coprocessor can also be loaded on demand by setting HTableDescriptor. + + + true + + + + + hbase.coprocessor.master.classes + + A comma-separated list of + org.apache.hadoop.hbase.coprocessor.MasterObserver coprocessors that are + loaded by default on the active HMaster process. For any implemented + coprocessor methods, the listed classes will be called in order. After + implementing your own MasterObserver, just put it in HBase's classpath + and add the fully qualified class name here. + + + true + + + + hbase-site + hbase.security.authorization + + + + + + hbase.zookeeper.useMulti + true + Instructs HBase to make use of ZooKeeper's multi-update functionality. + This allows certain ZooKeeper operations to complete more quickly and prevents some issues + with rare Replication failure scenarios (see the release note of HBASE-2611 for an example).· + IMPORTANT: only set this to true if all ZooKeeper servers in the cluster are on version 3.4+ + and will not be downgraded. ZooKeeper versions before 3.4 do not support multi-update and will + not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495). + + + + + hbase.defaults.for.version.skip + true + Disables version verification. + + + + dfs.domain.socket.path + /var/lib/hadoop-hdfs/dn_socket + Path to domain socket. + + + + hbase.rpc.protection + authentication + + + + + + hbase.hregion.majorcompaction.jitter + 0.50 + A multiplier applied to hbase.hregion.majorcompaction to cause compaction to occur + a given amount of time either side of hbase.hregion.majorcompaction. The smaller the number, + the closer the compactions will happen to the hbase.hregion.majorcompaction + interval. + + + + hbase.bucketcache.ioengine + + Where to store the contents of the bucketcache. One of: onheap, + offheap, or file. If a file, set it to file:PATH_TO_FILE. + + true + + + + + hbase.bucketcache.size + + The size of the buckets for the bucketcache if you only use a single size. + + true + + + + + hbase.table.sanity.checks + false + + + + hbase.bucketcache.percentage.in.combinedcache + + Value to be set between 0.0 and 1.0 + + true + + + + + hbase.coprocessor.regionserver.classes + + + true + + + + hbase-site + hbase.security.authorization + + + + + + hbase.hstore.compaction.max + 10 + The maximum number of StoreFiles which will be selected for a single minor + compaction, regardless of the number of eligible StoreFiles. Effectively, the value of + hbase.hstore.compaction.max controls the length of time it takes a single compaction to + complete. Setting it larger means that more StoreFiles are included in a compaction. For most + cases, the default value is appropriate. + + Maximum Files for Compaction + + int + + + 8 + + + 9 + + + 10 + + + 11 + + + 12 + + + 13 + + + 14 + + + 15 + + + + + + + hbase.regionserver.global.memstore.size + 0.4 + Percentage of RegionServer memory to allocate to write buffers. + Each column family within each region is allocated a smaller pool (the memstore) within this shared write pool. + If this buffer is full, updates are blocked and data is flushed from memstores until a global low watermark + (hbase.regionserver.global.memstore.size.lower.limit) is reached. + + % of RegionServer Allocated to Write Buffers + + float + 0 + 0.8 + 0.01 + + + + + + + hbase.master.ui.readonly + false + + + + zookeeper.recovery.retry + 6 + + + + + + hbase.regionserver.executor.openregion.threads + 20 + The number of threads region server uses to open regions + + + + + hbase.master.namespace.init.timeout + 2400000 + The number of milliseconds master waits for hbase:namespace table to be initialized + + + + + hbase.master.wait.on.regionservers.timeout + 30000 + The number of milliseconds master waits for region servers to report in + + + + + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml index c79391a67fd..b1017fcaffd 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml @@ -120,7 +120,7 @@ yarn.admin.acl - + yarn,yarn-ats ACL of who can be admin of the YARN cluster. true @@ -183,25 +183,32 @@ hadoop Unix group of the NodeManager + + yarn-env + yarn_cgroups_enabled + cluster-env user_group + + container-executor + gpu_module_enabled + - + yarn.nodemanager.aux-services - mapreduce_shuffle - Auxilliary services of NodeManager. A valid service name should only contain a-zA-Z0-9_ and can - not start with numbers - + mapreduce_shuffle,{{timeline_collector}} + Auxilliary services of NodeManager. A valid service name should only contain a-zA-Z0-9_ and cannot start with numbers + yarn.nodemanager.aux-services.mapreduce_shuffle.class org.apache.hadoop.mapred.ShuffleHandler The auxiliary service class to use - + yarn.nodemanager.log-dirs @@ -491,139 +498,1145 @@ - - Time to live for timeline store data in milliseconds. yarn.timeline-service.ttl-ms + Time to live for timeline store data in milliseconds. 2678400000 int - + - Length of time to wait between deletion cycles of leveldb timeline store in milliseconds. yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms + Length of time to wait between deletion cycles of leveldb timeline store in milliseconds. 300000 int + + - yarn.timeline-service.recovery.enabled + hadoop.registry.zk.quorum + localhost:2181 - Enable timeline server to recover state after starting. If - true, then yarn.timeline-service.state-store-class must be specified. + List of hostname:port pairs defining the zookeeper quorum binding for the registry - true - + - yarn.acl.enable - false - Are acls enabled. - + hadoop.registry.dns.bind-port + 53 + + The port number for the DNS listener. The default port is 53. + + + + true + false + + + + yarn-env + registry.dns.bind-port + + - yarn.authorization-provider - Yarn authorization provider class. - + hadoop.registry.dns.zone-mask + 255.255.255.0 + + The network mask associated with the zone IP range. If specified, it is utilized to ascertain the IP range possible and come up with an appropriate reverse zone name. + + - yarn.admin.acl - yarn - ACL of who can be admin of the YARN cluster. - - true - - + hadoop.registry.dns.zone-subnet + 172.17.0.0 + + An indicator of the IP range associated with the cluster containers. The setting is utilized for the + generation of the reverse zone name. + + - - yarn.timeline-service.store-class - org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore - Main storage class for YARN timeline server. - + hadoop.registry.dns.enabled + true + + An indicator of the IP range associated with the cluster containers. The setting is utilized for the + generation of the reverse zone name. + + - yarn.timeline-service.entity-group-fs-store.active-dir - /ats/active/ - DFS path to store active application’s timeline data - + hadoop.registry.dns.domain-name + EXAMPLE.COM + + The domain name for Hadoop cluster. + + - yarn.timeline-service.entity-group-fs-store.done-dir - /ats/done/ - DFS path to store done application’s timeline data - + yarn.nodemanager.recovery.enabled + true + Enable the node manager to recover after starting + - yarn.timeline-service.entity-group-fs-store.group-id-plugin-classes - - Plugins that can translate a timeline entity read request into a list of timeline cache ids, separated by commas. - - true - - + yarn.nodemanager.recovery.dir + YARN NodeManager Recovery directory + {{yarn_log_dir_prefix}}/nodemanager/recovery-state + + The local filesystem directory in which the node manager will store + state when recovery is enabled. + + - - yarn.timeline-service.entity-group-fs-store.summary-store - Summary storage for ATS v1.5 - - org.apache.hadoop.yarn.server.timeline.RollingLevelDBTimelineStore - + yarn.client.nodemanager-connect.retry-interval-ms + 10000 + Time interval between each attempt to connect to NM + - yarn.timeline-service.entity-group-fs-store.scan-interval-seconds + yarn.client.nodemanager-connect.max-wait-ms + 60000 + Max time to wait to establish a connection to NM + + + + yarn.resourcemanager.recovery.enabled + true - Scan interval for ATS v1.5 entity group file system storage reader.This - value controls how frequent the reader will scan the HDFS active directory - for application status. + Enable RM to recover state after starting. + If true, then yarn.resourcemanager.store.class must be specified. - - 60 - + - yarn.timeline-service.entity-group-fs-store.cleaner-interval-seconds + yarn.resourcemanager.work-preserving-recovery.enabled + true - Scan interval for ATS v1.5 entity group file system storage cleaner.This - value controls how frequent the reader will scan the HDFS done directory - for stale application data. + Enable RM work preserving recovery. This configuration is private to YARN for experimenting the feature. - - 3600 - + Enable Work Preserving Restart + + boolean + + - yarn.timeline-service.entity-group-fs-store.retain-seconds + yarn.resourcemanager.store.class + org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore - How long the ATS v1.5 entity group file system storage will keep an - application's data in the done directory. + The class to use as the persistent store. + If org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore is used, + the store is implicitly fenced; meaning a single ResourceManager + is able to use the store at any point in time. - - 604800 - yarn.log.server.web-service.url - http://localhost:8188/ws/v1/applicationhistory - Log Server Web Service URL. + yarn.resourcemanager.zk-address + localhost:2181 + + List Host:Port of the ZooKeeper servers to be used by the RM. comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If the optional chroot suffix is used the example would look like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" where the client would be rooted at "/app/a" and all paths would be relative to this root - ie getting/setting/etc... "/foo/bar" would result in operations being run on "/app/a/foo/bar" (from the server perspective). + + + + + yarn.resourcemanager.zk-state-store.parent-path + /rmstore + Full path of the ZooKeeper znode where RM state will be stored. This must be supplied when using org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore as the value for yarn.resourcemanager.store.class + + + + yarn.resourcemanager.zk-acl + world:anyone:rwcda + ACL's to be used for ZooKeeper znodes. + + + + yarn.resourcemanager.work-preserving-recovery.scheduling-wait-ms + 10000 + Set the amount of time RM waits before allocating new containers on work-preserving-recovery. Such wait period gives RM a chance to settle down resyncing with NMs in the cluster on recovery, before assigning new containers to applications. + + + + yarn.resourcemanager.connect.retry-interval.ms + 30000 + How often to try connecting to the ResourceManager. + + + + yarn.resourcemanager.connect.max-wait.ms + 900000 + Maximum time to wait to establish connection to ResourceManager + + + + yarn.resourcemanager.zk-retry-interval-ms + 1000 + "Retry interval in milliseconds when connecting to ZooKeeper. + When HA is enabled, the value here is NOT used. It is generated + automatically from yarn.resourcemanager.zk-timeout-ms and + yarn.resourcemanager.zk-num-retries." + + + + + yarn.resourcemanager.zk-num-retries + 1000 + Number of times RM tries to connect to ZooKeeper. + + + + yarn.resourcemanager.zk-timeout-ms + 10000 + ZooKeeper session timeout in milliseconds. Session expiration is managed by the ZooKeeper cluster itself, not by the client. This value is used by the cluster to determine when the client's session expires. Expirations happens when the cluster does not hear from the client within the specified session timeout period (i.e. no heartbeat). + + + + yarn.resourcemanager.state-store.max-completed-applications + ${yarn.resourcemanager.max-completed-applications} + The maximum number of completed applications RM state store keeps, less than or equals to ${yarn.resourcemanager.max-completed-applications}. By default, it equals to ${yarn.resourcemanager.max-completed-applications}. This ensures that the applications kept in the state store are consistent with the applications remembered in RM memory. Any values larger than ${yarn.resourcemanager.max-completed-applications} will be reset to ${yarn.resourcemanager.max-completed-applications}. Note that this value impacts the RM recovery performance.Typically, a smaller value indicates better performance on RM recovery. + + + + yarn.resourcemanager.fs.state-store.retry-policy-spec + 2000, 500 + hdfs client retry policy specification. hdfs client retry is always enabled. Specified in pairs of sleep-time and number-of-retries and (t0, n0), (t1, n1), ..., the first n0 retries sleep t0 milliseconds on average, the following n1 retries sleep t1 milliseconds on average, and so on. + + + + yarn.resourcemanager.fs.state-store.uri + + RI pointing to the location of the FileSystem path where RM state will be stored. This must be supplied when using org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore as the value for yarn.resourcemanager.store.class + + + + yarn.resourcemanager.ha.enabled + false + enable RM HA or not + + + + yarn.nodemanager.linux-container-executor.resources-handler.class + org.apache.hadoop.yarn.server.nodemanager.util.DefaultLCEResourcesHandler + Pre-requisite to use CGroups - yarn-site - yarn.http.policy + yarn-env + yarn_cgroups_enabled - yarn-site - yarn.timeline-service.webapp.address + container-executor + gpu_module_enabled + + + + + + yarn.nodemanager.linux-container-executor.cgroups.hierarchy + /yarn + Name of the Cgroups hierarchy under which all YARN jobs will be launched + + + yarn-env + yarn_cgroups_enabled + + + container-executor + gpu_module_enabled + + + + + + yarn.nodemanager.linux-container-executor.cgroups.mount + false + If true, YARN will automount the CGroup, however the directory needs to already exist; else, the cgroup should be mounted by the admin + + + yarn-env + yarn_cgroups_enabled + + + container-executor + gpu_module_enabled + + + + + + yarn.nodemanager.linux-container-executor.cgroups.mount-path + /cgroup + Path used by the LCE to mount cgroups if not found. This path must exist before the NodeManager is launched. + + + yarn-env + yarn_cgroups_enabled + + container-executor + gpu_module_enabled + + + + + + yarn.nodemanager.linux-container-executor.cgroups.strict-resource-usage + false + Strictly limit CPU resource usage to allocated usage even if spare CPU is available + + + + yarn.nodemanager.resource.cpu-vcores + 8 + Number of vcores that can be allocated + for containers. This is used by the RM scheduler when allocating + resources for containers. This is not used to limit the number of + CPUs used by YARN containers. If it is set to -1 and + yarn.nodemanager.resource.detect-hardware-capabilities is true, it is + automatically determined from the hardware in case of Windows and Linux. + In other cases, number of vcores is 8 by default. + + Number of virtual cores + + int + 0 + 32 + + yarn-site - yarn.timeline-service.webapp.https.address + yarn.nodemanager.resource.percentage-physical-cpu-limit - + + + + yarn.nodemanager.resource.percentage-physical-cpu-limit + 80 + The amount of CPU allocated for YARN containers - only effective when used with CGroups + Percentage of physical CPU allocated for all containers on a node + + int + 0 + 100 + 1 + + + + + yarn.node-labels.fs-store.retry-policy-spec + 2000, 500 + + Retry policy used for FileSystem node label store. The policy is + specified by N pairs of sleep-time in milliseconds and number-of-retries + "s1,n1,s2,n2,...". + + + + + yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb + 1000 + This is related to disk size on the machines, admins should set one of yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb or yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage but not both. If both are set, the more conservative value will be used + + + + yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage + 90 + This is related to disk size on the machines, admins should set one of yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb or yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage but not both. If both are set, the more conservative value will be used + + + + yarn.nodemanager.resource-plugins + + + Enable additional discovery/isolation of resources on the NodeManager, + split by comma. By default, this is empty. + Acceptable values: { "yarn-io/gpu"} + + + + container-executor + gpu_module_enabled + + + + + true + + + + yarn.nodemanager.resource-plugins.gpu.allowed-gpu-devices + auto + GPU allowed devices + Specify GPU devices which can be managed by YARN NodeManager, + split by comma. Number of GPU devices will be reported to RM to make + scheduling decisions. Set to auto (default) let YARN automatically + discover GPU resource from system + + + + container-executor + gpu_module_enabled + + + + true + + + + + yarn.nodemanager.resource-plugins.gpu.path-to-discovery-executables + + Absolute path of nvidia-smi on NodeManagers + When value is empty (default), YARN NodeManager will try to + locate discovery executable itself + + + directories + false + true + + + + yarn.nodemanager.log-aggregation.roll-monitoring-interval-seconds + Defines how often NMs wake up to upload log files. The default value is -1. By default, the logs will be uploaded whenthe application is finished. By setting this configure, logs can be uploaded periodically when the application is running. The minimum rolling-interval-seconds can be set is 3600. + 3600 + + + + yarn.nodemanager.log-aggregation.debug-enabled + false + + This configuration is for debug and test purpose. + By setting this configuration as true. + We can break the lower bound of yarn.nodemanager.log-aggregation.roll-monitoring-interval-seconds + + + + yarn.nodemanager.log-aggregation.num-log-files-per-app + 30 + This is temporary solution. The configuration will be deleted once, we find a more scalable method to only write a single log file per LRS. + + + + yarn.resourcemanager.system-metrics-publisher.enabled + true + + + + + yarn.resourcemanager.system-metrics-publisher.dispatcher.pool-size + 10 + Number of worker threads that send the yarn system metrics data. + + + + yarn.timeline-service.client.max-retries + 30 + + + + + yarn.timeline-service.client.retry-interval-ms + 1000 + + + + + yarn.timeline-service.ttl-enable + true + + Enable age off of timeline store data. + + + boolean + + + + + yarn.timeline-service.state-store-class + org.apache.hadoop.yarn.server.timeline.recovery.LeveldbTimelineStateStore + Store class name for timeline state store. + + + + yarn.timeline-service.leveldb-state-store.path + /hadoop/yarn/timeline + Store file name for leveldb state store. + + directory + + + + + yarn.timeline-service.leveldb-timeline-store.path + /hadoop/yarn/timeline + Store file name for leveldb timeline store. + + directory + + + + + yarn.timeline-service.leveldb-timeline-store.read-cache-size + 104857600 + + Size of read cache for uncompressed blocks for leveldb timeline store in bytes. + + + + + yarn.timeline-service.leveldb-timeline-store.start-time-read-cache-size + 10000 + + Size of cache for recently read entity start times for leveldb timeline store in number of entities. + + + + + yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size + 10000 + + Size of cache for recently written entity start times for leveldb timeline store in number of entities. + + + + + yarn.timeline-service.http-authentication.type + simple + + Defines authentication used for the Timeline Server HTTP endpoint. + Supported values are: simple | kerberos | $AUTHENTICATION_HANDLER_CLASSNAME + + + + + yarn.timeline-service.http-authentication.simple.anonymous.allowed + true + + + + + yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled + false + + Flag to enable override of the default kerberos authentication filter with + the RM authentication filter to allow authentication using delegation + tokens(fallback to kerberos if the tokens are missing). + Only applicable when the http authentication type is kerberos. + + + + + yarn.resourcemanager.bind-host + 0.0.0.0 + Default value is 0.0.0.0, when this is set the service will bind on all interfaces. If this optional address is set, the RPC and webapp servers will bind to this address and the port specified in yarn.resourcemanager.address and yarn.resourcemanager.webapp.address, respectively. + + + + yarn.nodemanager.bind-host + 0.0.0.0 + Default value is 0.0.0.0, when this is set the service will bind on all interfaces. If this optional address is set, the RPC and webapp servers will bind to this address and the port specified in yarn.nodemanager.address and yarn.nodemanager.webapp.address, respectively. + + + + yarn.timeline-service.bind-host + 0.0.0.0 + Default value is 0.0.0.0, when this is set the service will bind on all interfaces. If this optional address is set, the RPC and webapp servers will bind to this address and the port specified in yarn.timeline-service.address and yarn.timeline-service.webapp.address, respectively. + + + + yarn.node-labels.fs-store.root-dir + YARN Node Labels FS Store Root directory + /system/yarn/node-labels + + URI for NodeLabelManager. + + + + + yarn.scheduler.minimum-allocation-vcores + 1 + + Minimum Container Size (VCores) + + int + 0 + 8 + 1 + + + + yarn-site + yarn.nodemanager.resource.cpu-vcores + + + + + + yarn.scheduler.maximum-allocation-vcores + 8 + + Maximum Container Size (VCores) + + int + 0 + 8 + 1 + + + + yarn-site + yarn.nodemanager.resource.cpu-vcores + + + + + + yarn.node-labels.enabled + false + + Enable node labels to restrict YARN applications so that they run only on cluster nodes that have a specified node label. + + Node Labels + + value-list + + + true + + + + false + + + + 1 + + + + + yarn.nodemanager.container-executor.class + org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor + ContainerExecutor for launching containers + + + yarn-env + yarn_cgroups_enabled + + + core-site + hadoop.security.authentication + + + container-executor + gpu_module_enabled + + + + + + yarn.resourcemanager.scheduler.monitor.enable + + Enable a set of periodic monitors (specified in + yarn.resourcemanager.scheduler.monitor.policies) that affect the + scheduler. + + true + Pre-emption + + value-list + + + true + + + + false + + + + 1 + + + + + + + + yarn.timeline-service.recovery.enabled + + Enable timeline server to recover state after starting. If + true, then yarn.timeline-service.state-store-class must be specified. + + true + + + + yarn.authorization-provider + Yarn authorization provider class. + + + ranger-yarn-plugin-properties + ranger-yarn-plugin-enabled + + + + + + + + yarn.timeline-service.version + 2.0f + Timeline service version we’re currently using. + + + + yarn.timeline-service.versions + 1.5f,2.0f + Comma separated Timeline service versions we’re currently using. This overrides yarn.timeline-service.version. Acceptable values are 1.5f or 2.0f + + + + yarn.system-metricspublisher.enabled + true + Enables YARN to publish metrics to timeline v2 + + + + yarn.rm.system-metricspublisher.emit-container-events + true + Experimentally enable each container to post timeline events to timeline v2 + + + + yarn.nodemanager.recovery.supervised + true + Default of false causes NM to kill its containers on shutdown. Should be set to true when NM recovery is enabled. + + + + yarn.timeline-service.store-class + org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore + Main storage class for YARN timeline server. + + + + yarn.timeline-service.entity-group-fs-store.active-dir + YARN Timeline Service Entity Group FS Store Active directory + /ats/active/ + DFS path to store active application’s timeline data + + + + yarn.timeline-service.entity-group-fs-store.done-dir + YARN Timeline Service Entity Group FS Store Done directory + /ats/done/ + DFS path to store done application’s timeline data + + + + yarn.timeline-service.entity-group-fs-store.group-id-plugin-classes + org.apache.hadoop.yarn.applications.distributedshell.DistributedShellTimelinePlugin + Plugins that can translate a timeline entity read request into a list of timeline cache ids, separated by commas. + + true + + + + + + yarn.timeline-service.entity-group-fs-store.summary-store + Summary storage for ATS v1.5 + + org.apache.hadoop.yarn.server.timeline.RollingLevelDBTimelineStore + + + + yarn.timeline-service.entity-group-fs-store.scan-interval-seconds + + Scan interval for ATS v1.5 entity group file system storage reader.This + value controls how frequent the reader will scan the HDFS active directory + for application status. + + + 60 + + + + yarn.log.server.web-service.url + http://localhost:8188/ws/v1/applicationhistory + Log Server Web Service URL. + + + yarn-site + yarn.http.policy + + + yarn-site + yarn.timeline-service.webapp.address + + + yarn-site + yarn.timeline-service.webapp.https.address + + + + + + yarn.timeline-service.entity-group-fs-store.cleaner-interval-seconds + + Scan interval for ATS v1.5 entity group file system storage cleaner.This + value controls how frequent the reader will scan the HDFS done directory + for stale application data. + + + 3600 + + + + yarn.timeline-service.entity-group-fs-store.retain-seconds + + How long the ATS v1.5 entity group file system storage will keep an + application's data in the done directory. + + + 604800 + + + + + + + yarn.nodemanager.container-metrics.unregister-delay-ms + 60000 + The delay time ms to unregister container metrics after completion. + + + + yarn.timeline-service.entity-group-fs-store.group-id-plugin-classpath + + Classpath for all plugins defined in yarn.timeline-service.entity-group-fs-store.group-id-plugin-classes. + + true + + + + + yarn.resourcemanager.monitor.capacity.preemption.total_preemption_per_round + 0.1 + This option controls the pace at which containers-marked-for-preemption are actually preempted in each period. + + + + yarn.resourcemanager.monitor.capacity.preemption.natural_termination_factor + 1 + Similar to total_preemption_per_round, we can apply this factor to slowdown resource preemption after preemption-target is computed for each queue. + + + + yarn.resourcemanager.monitor.capacity.preemption.monitoring_interval + 15000 + Time in milliseconds between invocations of this ProportionalCapacityPreemptionPolicy policy. + + + + + + yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-users + true + + Whether all applications should be run as the NodeManager process' owner. + When false, applications are launched instead as the application owner. + + + boolean + + + + + yarn.nodemanager.runtime.linux.allowed-runtimes + default,docker + + Comma separated list of runtimes that are allowed when using + LinuxContainerExecutor. The allowed values are default, docker, and + javasandbox. + + + + + yarn.nodemanager.runtime.linux.docker.allowed-container-networks + host,none,bridge + + Optional. A comma-separated set of networks allowed when launching + containers. Valid values are determined by Docker networks available from + `docker network ls`. + + + + true + + + + yarn.nodemanager.runtime.linux.docker.default-container-network + host + + The network used when launching Docker containers when no + network is specified in the request. This network must be one of the + (configurable) set of allowed container networks. + + + + + yarn.nodemanager.runtime.linux.docker.privileged-containers.allowed + false + + Optional. Whether applications are allowed to run in privileged + containers. + + + boolean + + + + + yarn.nodemanager.runtime.linux.docker.privileged-containers.acl + + + Optional. A comma-separated list of users who are allowed to request + privileged contains if privileged containers are allowed. + + + + true + + + + yarn.nodemanager.runtime.linux.docker.capabilities + + CHOWN,DAC_OVERRIDE,FSETID,FOWNER,MKNOD,NET_RAW,SETGID,SETUID,SETFCAP, + SETPCAP,NET_BIND_SERVICE,SYS_CHROOT,KILL,AUDIT_WRITE + + + Optional. This configuration setting determines the capabilities + assigned to docker containers when they are launched. While these may not + be case-sensitive from a docker perspective, it is best to keep these + uppercase. To run without any capabilites, set this value to + "none" or "NONE" + + + + + yarn.webapp.ui2.enable + true + + This configuration setting enables YARN web ui2 server which is a revamped + UI for better user experience. + + + + + + + yarn.timeline-service.http-cross-origin.enabled + true + + + + + yarn.resourcemanager.webapp.cross-origin.enabled + true + + + + + yarn.nodemanager.webapp.cross-origin.enabled + true + + + + + yarn.nodemanager.resource-plugins.gpu.docker-plugin + nvidia-docker-v1 + GPU docker plugin + Specify docker command plugin for GPU. By default uses Nvidia + docker V1.0 + + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + + yarn.nodemanager.resource-plugins.gpu.docker-plugin.nvidiadocker-v1.endpoint + http://localhost:3476/v1.0/docker/cli + GPU docker plugin endpoint for Nvidia Docker Version 1 + Specify end point of nvidia-docker-plugin + + + container-executor + gpu_module_enabled + + + container-executor + docker_module_enabled + + + + true + + + + + + yarn.webapp.api-service.enable + true + + Whether to enable Yarn API Service. + + + boolean + + + + + yarn.service.framework.path + /bigtop/apps/3.2.0/yarn/service-dep.tar.gz + + YARN Service AM dependency tarball location. Enables faster app submission. + + + + + + + yarn.nodemanager.aux-services.timeline_collector.class + org.apache.hadoop.yarn.server.timelineservice.collector.PerNodeTimelineCollectorsAuxService + The auxiliary service class to use + + + + yarn.timeline-service.reader.webapp.address + localhost:8198 + + The http address of the timeline reader web application. + + + + + yarn.timeline-service.reader.webapp.https.address + localhost:8199 + + The http address of the timeline reader web application. + + + + + + + yarn.timeline-service.hbase-schema.prefix + prod. + HBase table prefix. + + + + yarn.timeline-service.hbase.configuration.file + file://{{yarn_hbase_conf_dir}}/hbase-site.xml + HBase configuration location. + + + + yarn.timeline-service.hbase.coprocessor.jar.hdfs.location + {{yarn_timeline_jar_location}} + HBase table creation jar location. + + + + yarn.resourcemanager.monitor.capacity.preemption.intra-queue-preemption.enabled + true + This property need to be set to make preemption within a Leaf Queue based on user-limit and application priority. + + + yarn-site + yarn.resourcemanager.scheduler.monitor.enable + + + + + + yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled + true + This property need to be set to make preemption can happen under a fragmented cluster. + + + yarn-site + yarn.resourcemanager.scheduler.monitor.enable + + + + + + yarn.resourcemanager.display.per-user-apps + true + + Flag to enable display of applications per user as an admin + configuration. + + + boolean + + + + + yarn.service.system-service.dir + /services + FS directory path to load and deploy admin configured services + + + + yarn.timeline-service.generic-application-history.save-non-am-container-meta-info + false + Defines if RM will save non am container meta-info in history store. + + boolean + + + + + hadoop.registry.dns.bind-address + 0.0.0.0 + Address associated with the network interface to which the DNS listener should bind. + + + + hadoop.http.cross-origin.allowed-origins + {{cross_origins}} + Comma separated list of origins that are allowed for web services + needing cross-origin (CORS) support. + + + + yarn.nodemanager.resourcemanager.connect.wait.secs + 1800 + Max time, in seconds, to wait to establish a connection to RM when NM starts. The NM will shutdown if it cannot connect to RM within the specified max time period. If the value is set as -1, then NM will retry forever. + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/kerberos.json index e5ce2b861aa..a34c458a161 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/kerberos.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/kerberos.json @@ -10,14 +10,78 @@ { "name": "yarn_smokeuser", "reference": "/smokeuser" + }, + { + "name": "yarn_ats", + "principal": { + "value": "${yarn-env/yarn_ats_user}${principal_suffix}@${realm}", + "type" : "user", + "configuration": "yarn-env/yarn_ats_principal_name", + "local_username": "${yarn-env/yarn_ats_user}" + }, + "keytab": { + "file": "${keytab_dir}/yarn-ats.hbase-client.headless.keytab", + "owner": { + "name": "${yarn-env/yarn_ats_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "yarn-env/yarn_ats_user_keytab" + } + }, + { + "name": "yarn_ats_hbase_master", + "principal": { + "value": "yarn-ats-hbase/_HOST@${realm}", + "type" : "service", + "configuration": "yarn-hbase-site/hbase.master.kerberos.principal", + "local_username": "${yarn-env/yarn_ats_user}" + }, + "keytab": { + "file": "${keytab_dir}/yarn-ats.hbase-master.service.keytab", + "owner": { + "name": "${yarn-env/yarn_ats_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "yarn-hbase-site/hbase.master.keytab.file" + } + }, + { + "name": "yarn_ats_hbase_regionserver", + "principal": { + "value": "yarn-ats-hbase/_HOST@${realm}", + "type" : "service", + "configuration": "yarn-hbase-site/hbase.regionserver.kerberos.principal", + "local_username": "${yarn-env/yarn_ats_user}" + }, + "keytab": { + "file": "${keytab_dir}/yarn-ats.hbase-regionserver.service.keytab", + "owner": { + "name": "${yarn-env/yarn_ats_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "yarn-hbase-site/hbase.regionserver.keytab.file" + } } ], "configurations": [ { "yarn-site": { - "yarn.timeline-service.enabled": "false", + "yarn.timeline-service.enabled": "true", "yarn.timeline-service.http-authentication.type": "kerberos", "yarn.acl.enable": "true", + "yarn.admin.acl": "${yarn-env/yarn_user}", "yarn.timeline-service.http-authentication.signature.secret": "", "yarn.timeline-service.http-authentication.signature.secret.file": "", "yarn.timeline-service.http-authentication.signer.secret.provider": "", @@ -33,8 +97,11 @@ "yarn.resourcemanager.proxyuser.*.hosts": "", "yarn.resourcemanager.proxyuser.*.users": "", "yarn.resourcemanager.proxy-user-privileges.enabled": "true", + "yarn.resourcemanager.zk-acl" : "sasl:${principals/YARN/RESOURCEMANAGER/resource_manager_rm|principalPrimary()}:rwcda", "hadoop.registry.secure" : "true", - "hadoop.registry.system.accounts" : "sasl:yarn,sasl:mapred,sasl:hadoop,sasl:hdfs,sasl:rm" + "hadoop.registry.system.accounts" : "sasl:${principals/YARN/APP_TIMELINE_SERVER/app_timeline_server_yarn|principalPrimary()},sasl:${principals/MAPREDUCE2/HISTORYSERVER/history_server_jhs|principalPrimary()},sasl:${principals/HDFS/NAMENODE/hdfs|principalPrimary()},sasl:${principals/YARN/RESOURCEMANAGER/resource_manager_rm|principalPrimary()},sasl:${principals/HIVE/HIVE_SERVER/hive_server_hive|principalPrimary()},sasl:${principals/SPARK2/spark_service_keytab|principalPrimary()}", + "hadoop.registry.client.auth" : "kerberos", + "hadoop.registry.jaas.context" : "Client" } }, { @@ -42,6 +109,34 @@ "hadoop.proxyuser.${yarn-env/yarn_user}.groups": "*", "hadoop.proxyuser.${yarn-env/yarn_user}.hosts": "${clusterHostInfo/resourcemanager_hosts}" } + }, + { + "capacity-scheduler": { + "yarn.scheduler.capacity.root.acl_submit_applications": "${yarn-env/yarn_user},${cluster-env/smokeuser}", + "yarn.scheduler.capacity.root.acl_administer_queue": "${yarn-env/yarn_user}", + "yarn.scheduler.capacity.root.default.acl_administer_queue": "${yarn-env/yarn_user}", + "yarn.scheduler.capacity.root.default.acl_administer_jobs": "${yarn-env/yarn_user}", + "yarn.scheduler.capacity.root.default.acl_submit_applications": "${yarn-env/yarn_user},${yarn-env/yarn_ats_user}" + } + }, + { + "ranger-yarn-audit": { + "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", + "xasecure.audit.jaas.Client.loginModuleControlFlag": "required", + "xasecure.audit.jaas.Client.option.useKeyTab": "true", + "xasecure.audit.jaas.Client.option.storeKey": "false", + "xasecure.audit.jaas.Client.option.serviceName": "solr", + "xasecure.audit.destination.solr.force.use.inmemory.jaas.config": "true" + } + }, + { + "yarn-hbase-site": { + "hbase.security.authentication": "kerberos", + "hbase.security.authorization": "true", + "hbase.coprocessor.master.classes": "org.apache.hadoop.hbase.security.access.AccessController", + "hbase.coprocessor.region.classes": "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.AccessController", + "zookeeper.znode.parent": "/atsv2-hbase-secure" + } } ], "components": [ @@ -69,6 +164,42 @@ "configuration": "yarn-site/yarn.nodemanager.keytab" } }, + { + "name": "yarn_nodemanager_hive_server_hive", + "reference": "/HIVE/HIVE_SERVER/hive_server_hive", + "principal": { + "configuration": "hive-interactive-site/hive.llap.daemon.service.principal" + }, + "keytab": { + "configuration": "hive-interactive-site/hive.llap.daemon.keytab.file" + }, + "when" : { + "contains" : ["services", "HIVE"] + } + }, + { + "name": "llap_task_hive", + "principal": { + "value": "hive/_HOST@${realm}", + "type" : "service", + "configuration": "hive-interactive-site/hive.llap.task.principal" + }, + "keytab": { + "file": "${keytab_dir}/hive.llap.task.keytab", + "owner": { + "name": "${yarn-env/yarn_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "r" + }, + "configuration": "hive-interactive-site/hive.llap.task.keytab.file" + }, + "when" : { + "contains" : ["services", "HIVE"] + } + }, { "name": "yarn_nodemanager_spnego", "reference": "/spnego", @@ -91,6 +222,10 @@ { "name": "RESOURCEMANAGER", "identities": [ + { + "name": "yarn_resourcemanager_hdfs", + "reference": "/HDFS/NAMENODE/hdfs" + }, { "name": "resource_manager_rm", "principal": { @@ -121,6 +256,16 @@ "keytab": { "configuration": "yarn-site/yarn.resourcemanager.webapp.spnego-keytab-file" } + }, + { + "name": "yarn_resourcemanager_resource_manager_rm", + "reference": "/YARN/RESOURCEMANAGER/resource_manager_rm", + "principal": { + "configuration": "ranger-yarn-audit/xasecure.audit.jaas.Client.option.principal" + }, + "keytab": { + "configuration": "ranger-yarn-audit/xasecure.audit.jaas.Client.option.keyTab" + } } ] }, @@ -163,6 +308,72 @@ "reference": "/HDFS/NAMENODE/hdfs" } ] + }, + { + "name": "TIMELINE_READER", + "identities": [ + { + "name": "yarn_timeline_reader", + "principal": { + "value": "yarn/_HOST@${realm}", + "type" : "service", + "configuration": "yarn-site/yarn.timeline-service.principal", + "local_username": "${yarn-env/yarn_user}" + }, + "keytab": { + "file": "${keytab_dir}/yarn.service.keytab", + "owner": { + "name": "${yarn-env/yarn_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "yarn-site/yarn.timeline-service.keytab" + } + }, + { + "name": "yarn_timeline_reader_spnego", + "reference": "/spnego", + "principal": { + "configuration": "yarn-site/yarn.timeline-service.http-authentication.kerberos.principal" + }, + "keytab": { + "configuration": "yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab" + } + }, + { + "name": "yarn_timeline_reader_hdfs", + "reference": "/HDFS/NAMENODE/hdfs" + } + ] + }, + { + "name": "YARN_REGISTRY_DNS", + "identities": [ + { + "name": "registry_dns_yarn", + "principal": { + "value": "yarn/_HOST@${realm}", + "type" : "service", + "configuration": "yarn-env/yarn.registry-dns.principal", + "local_username": "${yarn-env/yarn_user}" + }, + "keytab": { + "file": "${keytab_dir}/yarn.service.keytab", + "owner": { + "name": "${yarn-env/yarn_user}", + "access": "r" + }, + "group": { + "name": "${cluster-env/user_group}", + "access": "" + }, + "configuration": "yarn-env/yarn.registry-dns.keytab" + } + } + ] } ] }, @@ -178,6 +389,14 @@ "reference": "/smokeuser" } ], + "configurations": [ + { + "mapred-site": { + "mapreduce.cluster.acls.enabled": "true", + "mapreduce.jobhistory.admin.acl": "${mapred-env/mapred_user}" + } + } + ], "components": [ { "name": "HISTORYSERVER", diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml index 64b41343d22..cbfadc20281 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml @@ -26,6 +26,72 @@ 3.3.4-1 + + TIMELINE_READER + Timeline Service V2.0 Reader + MASTER + 1+ + true + true + + true + YARN/RESOURCEMANAGER + + + + + PYTHON + 1200 + + + + + HDFS/HDFS_CLIENT + host + + true + + + + + + + YARN_REGISTRY_DNS + YARN Registry DNS + MASTER + 0-1 + true + true + + + + PYTHON + 1200 + + + + + APP_TIMELINE_SERVER + Timeline Service V2 + MASTER + 1 + true + true + + + + PYTHON + 1200 + + + + + yarn_timelineserver + + + + + RESOURCEMANAGER ResourceManager @@ -72,6 +138,8 @@ capacity-scheduler hdfs-site + resource-types + container-executor @@ -98,6 +166,11 @@ yarn_nodemanager + + + resource-types + container-executor +
@@ -137,6 +210,16 @@ capacity-scheduler.xml capacity-scheduler + + xml + resource-types.xml + resource-types + + + properties + container-executor.cfg + container-executor + @@ -186,13 +269,16 @@ hdfs-site hadoop-env core-site + viewfs-mount-table mapred-site yarn-log4j + ams-ssl-client ranger-yarn-plugin-properties ranger-yarn-audit ranger-yarn-policymgr-ssl ranger-yarn-security + YARN_widgets.json YARN_metrics.json @@ -326,10 +412,12 @@ hdfs-site hadoop-env core-site + viewfs-mount-table mapred-site mapred-env ssl-client ssl-server + ams-ssl-client yarn-site true diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_ats_hbase.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_ats_hbase.py new file mode 100755 index 00000000000..118062a5cf0 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_ats_hbase.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python + +""" +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 logging +import json +import subprocess +import time +import traceback + +from resource_management.core import global_lock +from resource_management.core import shell +from resource_management.core.exceptions import Fail +from resource_management.core.resources import Execute +from resource_management.libraries.functions import format +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.check_process_status import check_process_status +from resource_management.core.exceptions import ComponentIsNotRunning +from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl + +CRITICAL_RESULT_CODE = 'CRITICAL' +OK_RESULT_CODE = 'OK' +UKNOWN_STATUS_CODE = 'UNKNOWN' + +OK_MESSAGE = "The HBase application reported a '{0}' state in {1:.3f}s" +MESSAGE_WITH_STATE_AND_INSTANCES = "The application reported a '{0}' state in {1:.3f}s. [Live: {2}, Desired: {3}]" +CRITICAL_MESSAGE_WITH_STATE = "The HBase application reported a '{0}' state. Check took {1:.3f}s" +CRITICAL_MESSAGE = "ats-hbase service information could not be retrieved" + + +SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' +STACK_ROOT = '{{cluster-env/stack_root}}' +STACK_ROOT_DEFAULT = Script.get_stack_root() + + +ATS_HBASE_PRINCIPAL_KEY = '{{yarn-hbase-site/hbase.master.kerberos.principal}}' +ATS_HBASE_PRINCIPAL_KEYTAB_KEY = '{{yarn-hbase-site/hbase.master.keytab.file}}' +ATS_HBASE_USER_KEY = '{{yarn-env/yarn_ats_user}}' +ATS_HBASE_SYSTEM_SERVICE_LAUNCH_KEY = '{{yarn-hbase-env/is_hbase_system_service_launch}}' +USE_EXTERNAL_HBASE_KEY = '{{yarn-hbase-env/use_external_hbase}}' +ATS_HBASE_PID_DIR_PREFIX = '{{yarn-hbase-env/yarn_hbase_pid_dir_prefix}}' + +ATS_HBASE_APP_NOT_FOUND_KEY = format("Service ats-hbase not found") + +# The configured Kerberos executable search paths, if any +KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' + + +CHECK_COMMAND_TIMEOUT_KEY = 'check.command.timeout' +CHECK_COMMAND_TIMEOUT_DEFAULT = 120.0 + + +logger = logging.getLogger('ambari_alerts') + + +def get_tokens(): + """ + Returns a tuple of tokens in the format {{site/property}} that will be used + to build the dictionary passed into execute + """ + return (SECURITY_ENABLED_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, ATS_HBASE_PRINCIPAL_KEY, ATS_HBASE_PRINCIPAL_KEYTAB_KEY, + ATS_HBASE_USER_KEY, STACK_ROOT, USE_EXTERNAL_HBASE_KEY, ATS_HBASE_PID_DIR_PREFIX, ATS_HBASE_SYSTEM_SERVICE_LAUNCH_KEY) + + +def execute(configurations={}, parameters={}, host_name=None): + """ + Returns a tuple containing the result code and a pre-formatted result label + + Keyword arguments: + configurations (dictionary): a mapping of configuration key to value + parameters (dictionary): a mapping of script parameter key to value + host_name (string): the name of this host where the alert is running + """ + + if configurations is None: + return (UKNOWN_STATUS_CODE, ['There were no configurations supplied to the script.']) + + result_code = None + + try: + use_external_hbase = False + if USE_EXTERNAL_HBASE_KEY in configurations: + use_external_hbase = str(configurations[USE_EXTERNAL_HBASE_KEY]).upper() == 'TRUE' + + if use_external_hbase: + return (OK_RESULT_CODE, ['use_external_hbase set to true.']) + + is_hbase_system_service_launch = False + if ATS_HBASE_SYSTEM_SERVICE_LAUNCH_KEY in configurations: + is_hbase_system_service_launch = str(configurations[ATS_HBASE_SYSTEM_SERVICE_LAUNCH_KEY]).upper() == 'TRUE' + + yarn_hbase_user = "yarn-ats" + if ATS_HBASE_USER_KEY in configurations: + yarn_hbase_user = configurations[ATS_HBASE_USER_KEY] + + if not is_hbase_system_service_launch: + yarn_hbase_pid_dir_prefix = "" + if ATS_HBASE_PID_DIR_PREFIX in configurations: + yarn_hbase_pid_dir_prefix = configurations[ATS_HBASE_PID_DIR_PREFIX] + else: + return (UKNOWN_STATUS_CODE, ['The yarn_hbase_pid_dir_prefix is a required parameter.']) + yarn_hbase_pid_dir = format("{yarn_hbase_pid_dir_prefix}/{yarn_hbase_user}") + master_pid_file = format("{yarn_hbase_pid_dir}/hbase-{yarn_hbase_user}-master.pid") + rs_pid_file = format("{yarn_hbase_pid_dir}/hbase-{yarn_hbase_user}-regionserver.pid") + + if host_name is None: + host_name = socket.getfqdn() + + master_process_running = is_monitor_process_live(master_pid_file) + rs_process_running = is_monitor_process_live(rs_pid_file) + + alert_state = OK_RESULT_CODE if master_process_running and rs_process_running else CRITICAL_RESULT_CODE + + alert_label = 'ATS embedded HBase is running on {0}' if master_process_running and rs_process_running else 'ATS embedded HBase is NOT running on {0}' + alert_label = alert_label.format(host_name) + + return (alert_state, [alert_label]) + else: + security_enabled = False + if SECURITY_ENABLED_KEY in configurations: + security_enabled = str(configurations[SECURITY_ENABLED_KEY]).upper() == 'TRUE' + + check_command_timeout = CHECK_COMMAND_TIMEOUT_DEFAULT + if CHECK_COMMAND_TIMEOUT_KEY in configurations: + check_command_timeout = int(parameters[CHECK_COMMAND_TIMEOUT_KEY]) + + if security_enabled: + if ATS_HBASE_PRINCIPAL_KEY in configurations: + ats_hbase_app_principal = configurations[ATS_HBASE_PRINCIPAL_KEY] + ats_hbase_app_principal = ats_hbase_app_principal.replace('_HOST',host_name.lower()) + + if ATS_HBASE_PRINCIPAL_KEYTAB_KEY in configurations: + ats_hbase_app_keytab = configurations[ATS_HBASE_PRINCIPAL_KEYTAB_KEY] + + # Get the configured Kerberos executable search paths, if any + if KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY in configurations: + kerberos_executable_search_paths = configurations[KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY] + else: + kerberos_executable_search_paths = None + + kinit_path_local = get_kinit_path(kerberos_executable_search_paths) + kinitcmd=format("{kinit_path_local} -kt {ats_hbase_app_keytab} {ats_hbase_app_principal}; ") + + # prevent concurrent kinit + kinit_lock = global_lock.get_lock(global_lock.LOCK_TYPE_KERBEROS) + kinit_lock.acquire() + try: + Execute(kinitcmd, user=yarn_hbase_user, + path=["/bin/", "/usr/bin/", "/usr/sbin/"], + timeout=10) + finally: + kinit_lock.release() + + start_time = time.time() + ats_hbase_status_cmd = STACK_ROOT_DEFAULT + format("/current/hadoop-yarn-client/bin/yarn app -status ats-hbase") + + code, output, error = shell.checked_call(ats_hbase_status_cmd, user=yarn_hbase_user, stderr=subprocess.PIPE, + timeout=check_command_timeout, + logoutput=False) + if code != 0: + alert_label = traceback.format_exc() + result_code = UKNOWN_STATUS_CODE + return (result_code, [alert_label]) + + + # Call for getting JSON + ats_hbase_app_info = make_valid_json(output) + + if ats_hbase_app_info is None: + alert_label = CRITICAL_MESSAGE + result_code = CRITICAL_RESULT_CODE + return (result_code, [alert_label]) + + if 'state' not in ats_hbase_app_info: + alert_label = traceback.format_exc() + result_code = UKNOWN_STATUS_CODE + return (result_code, [alert_label]) + + retrieved_ats_hbase_app_state = ats_hbase_app_info['state'].upper() + + if retrieved_ats_hbase_app_state in ['STABLE']: + result_code = OK_RESULT_CODE + total_time = time.time() - start_time + alert_label = OK_MESSAGE.format(retrieved_ats_hbase_app_state, total_time) + else: + result_code = CRITICAL_RESULT_CODE + total_time = time.time() - start_time + alert_label = CRITICAL_MESSAGE_WITH_STATE.format(retrieved_ats_hbase_app_state, total_time) + except: + alert_label = traceback.format_exc() + traceback.format_exc() + result_code = CRITICAL_RESULT_CODE + return (result_code, [alert_label]) + + +def make_valid_json(output): + splits = output.split("\n") + ats_hbase_app_info = None + json_element = None # To detect where from to start reading for JSON data + for idx, split in enumerate(splits): + curr_elem = split.strip() + if curr_elem.startswith( '{' ) and curr_elem.endswith( '}' ): + json_element = curr_elem + break + elif ATS_HBASE_APP_NOT_FOUND_KEY in curr_elem: + return ats_hbase_app_info + + # Remove extra logging from possible JSON output + if json_element is None: + raise Fail("Couldn't validate the received output for JSON parsing.") + + ats_hbase_app_info = json.loads(json_element) + return ats_hbase_app_info + +@OsFamilyFuncImpl(OsFamilyImpl.DEFAULT) +def is_monitor_process_live(pid_file): + """ + Gets whether the Metrics Monitor represented by the specified file is running. + :param pid_file: the PID file of the monitor to check + :return: True if the monitor is running, False otherwise + """ + live = False + + try: + check_process_status(pid_file) + live = True + except ComponentIsNotRunning: + pass + + return live \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/functions.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/functions.py new file mode 100755 index 00000000000..c436c62ac39 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/functions.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +""" +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 re +import math + +def calc_heap_memory(memorysize, heapmemory_factor): + """ + @param memorysize_str: str (e.g '4096m') + @param heapmemory_factor: float (e.g 0.8) + """ + return int(math.floor(memorysize*heapmemory_factor)) + +def ensure_unit_for_memory(memory_size): + memory_size_values = re.findall('\d+', str(memory_size)) + memory_size_unit = re.findall('\D+', str(memory_size)) + + if len(memory_size_values) > 0: + unit = 'm' + if len(memory_size_unit) > 0: + unit = memory_size_unit[0] + if unit not in ['b', 'k', 'm', 'g', 't', 'p']: + raise Exception("Memory size unit error. %s - wrong unit" % unit) + return "%s%s" % (memory_size_values[0], unit) + else: + raise Exception('Memory size can not be calculated') diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/hbase_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/hbase_service.py new file mode 100755 index 00000000000..8e9e69a2eac --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/hbase_service.py @@ -0,0 +1,167 @@ +#!/usr/bin/env python +""" +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 ambari_commons.constants import AMBARI_SUDO_BINARY +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions.show_logs import show_logs +from resource_management.core.shell import as_sudo +from resource_management.core.resources.system import Execute, File +from resource_management.core.source import Template +from resource_management.core.logger import Logger + +def hbase_service( + name, + action = 'start'): # 'start' or 'stop' + + import params + + sudo = AMBARI_SUDO_BINARY + daemon_script = format("{yarn_hbase_bin}/hbase-daemon.sh") + role = name + cmd = format("{daemon_script} --config {yarn_hbase_conf_dir}") + pid_file = format("{yarn_hbase_pid_dir}/hbase-{yarn_hbase_user}-{role}.pid") + pid_expression = as_sudo(["cat", pid_file]) + no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p `{pid_expression}` >/dev/null 2>&1") + + if action == 'start': + daemon_cmd = format("{cmd} start {role}") + + try: + Execute ( daemon_cmd, + not_if = no_op_test, + user = params.yarn_hbase_user + ) + except: + show_logs(params.yarn_hbase_log_dir, params.yarn_hbase_user) + raise + elif action == 'stop': + daemon_cmd = format("{cmd} stop {role}") + + try: + Execute ( daemon_cmd, + user = params.yarn_hbase_user, + only_if = no_op_test, + timeout = 30, + on_timeout = format("! ( {no_op_test} ) || {sudo} -H -E kill -9 `{pid_expression}`"), + ) + except: + show_logs(params.yarn_hbase_log_dir, params.yarn_hbase_user) + raise + + File(pid_file, + action = "delete", + ) + +def hbase(action): + if action == 'stop': + Logger.info("Stopping HBase daemons") + hbase_service('regionserver', action=action) + hbase_service('master', action=action) + else: + Logger.info("Starting HBase daemons") + hbase_service('master', action=action) + hbase_service('regionserver', action=action) + createTables() + + +def configure_hbase(env): + import params + env.set_params(params) + params.HdfsResource(params.yarn_hbase_hdfs_root_dir, + type="directory", + action="create_on_execute", + owner=params.yarn_hbase_user + ) + params.HdfsResource(None, action="execute") + +def create_hbase_package(): + import params + file_path = format("{yarn_hbase_package_preparation_file}") + Logger.info("Executing hbase package creation script file '" + file_path +"'") + try: + File( file_path, + mode = 0o755, + content = Template('yarn_hbase_package_preparation.j2') + ) + Execute( file_path, + timeout = 300, + logoutput = True + ) + except: + Logger.error( + "Error occured while executing hbase package creation file '" + file_path + "'.") + raise + +def copy_hbase_package_to_hdfs(): + import params + + try: + + Logger.info( + "Copying hbase tarball into hdfs path'" + params.yarn_hbase_app_hdfs_path + "'.") + params.HdfsResource(format("{yarn_hbase_app_hdfs_path}"), + type="directory", + action="create_on_execute", + owner=params.hdfs_user, + group=params.hdfs_user, + mode=0o555, + ) + params.HdfsResource(format("{yarn_hbase_app_hdfs_path}/hbase.tar.gz"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_user_tmp}/hbase.tar.gz"), + owner=params.hdfs_user, + group=params.user_group, + mode=0o444, + ) + params.HdfsResource(None, action="execute") + except: + Logger.error( + "Error occured while copying hbase tarball into hdfs '" + params.yarn_hbase_app_hdfs_path + "'.") + raise + + +def createTables(): + import params + try: + Logger.info("Creating HBase tables") + Execute(format("sleep 10;{yarn_hbase_table_create_cmd}"), + user=params.yarn_hbase_user, + timeout = 300, + logoutput=True) + except: + show_logs(params.yarn_hbase_log_dir, params.yarn_hbase_user) + raise + + if params.security_enabled: + try: + File( format("{yarn_hbase_grant_premissions_file}"), + owner = params.yarn_hbase_user, + group = params.user_group, + mode = 0o644, + content = Template('yarn_hbase_grant_permissions.j2') + ) + Execute( format("{yarn_hbase_table_grant_premission_cmd}"), + user = params.yarn_hbase_user, + timeout = 300, + logoutput = True + ) + except: + show_logs(params.yarn_hbase_log_dir, params.yarn_hbase_user) + raise \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py index 4217990f953..9846b959543 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py @@ -76,12 +76,34 @@ def pre_upgrade_restart(self, env, upgrade_type=None): if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): stack_select.select_packages(params.version) + # MC Hammer said, "Can't touch this" + copy_to_hdfs("mapreduce", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) + copy_to_hdfs("tez", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) + params.HdfsResource(None, action="execute") def start(self, env, upgrade_type=None): import params env.set_params(params) self.configure(env) # FOR SECURITY + if params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major): + # MC Hammer said, "Can't touch this" + resource_created = copy_to_hdfs( + "mapreduce", + params.user_group, + params.hdfs_user, + skip=params.sysprep_skip_copy_tarballs_hdfs) + resource_created = copy_to_hdfs( + "tez", + params.user_group, + params.hdfs_user, + skip=params.sysprep_skip_copy_tarballs_hdfs) or resource_created + if resource_created: + params.HdfsResource(None, action="execute") + else: + # In stack versions before copy_tarball_to_hdfs support tez.tar.gz was copied to a different folder in HDFS. + install_tez_jars() + service('historyserver', action='start', serviceName='mapreduce') def status(self, env): diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py index ef2d437b413..a61701de18b 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py @@ -36,12 +36,15 @@ from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources from resource_management.libraries.functions.version import format_stack_version, get_major_version from resource_management.libraries.functions.default import default +from resource_management.libraries.functions.expect import expect from resource_management.libraries import functions from resource_management.libraries.functions import is_empty from resource_management.libraries.functions.get_architecture import get_architecture from resource_management.libraries.functions.setup_ranger_plugin_xml import get_audit_configs, generate_ranger_service_config import status_params +from functions import calc_heap_memory, ensure_unit_for_memory + service_name = 'yarn' # a map of the Ambari role to the component name @@ -55,7 +58,9 @@ 'APP_TIMELINE_SERVER' : 'hadoop-yarn-timelineserver', 'NODEMANAGER' : 'hadoop-yarn-nodemanager', 'RESOURCEMANAGER' : 'hadoop-yarn-resourcemanager', - 'YARN_CLIENT' : 'hadoop-yarn-client' + 'YARN_CLIENT' : 'hadoop-yarn-client', + 'TIMELINE_READER' : 'hadoop-yarn-timelinereader', + 'YARN_REGISTRY_DNS' : 'hadoop-yarn-registrydns' } # server configurations @@ -152,6 +157,12 @@ def get_spark_version(service_name, component_name, yarn_version): yarn_container_bin = format("{hadoop_yarn_home}/bin") hadoop_java_io_tmpdir = os.path.join(tmp_dir, "hadoop_java_io_tmpdir") +# MapR directory root +mapred_role_root = "hadoop-mapreduce-client" +command_role = default("/role", "") +if command_role in MAPR_SERVER_ROLE_DIRECTORY_MAP: + mapred_role_root = MAPR_SERVER_ROLE_DIRECTORY_MAP[command_role] + if stack_supports_timeline_state_store: # Timeline Service property that was added timeline_state_store stack feature @@ -191,6 +202,8 @@ def get_spark_version(service_name, component_name, yarn_version): toggle_nm_security = (current_nm_security_state and not security_enabled) or (not current_nm_security_state and security_enabled) smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab'] +mapred2_service_check_test_file = format('{tmp_dir}/mapred2-service-check') + yarn_executor_container_group = config['configurations']['yarn-site']['yarn.nodemanager.linux-container-executor.group'] yarn_nodemanager_container_executor_class = config['configurations']['yarn-site']['yarn.nodemanager.container-executor.class'] is_linux_container_executor = (yarn_nodemanager_container_executor_class == 'org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor') @@ -209,6 +222,7 @@ def get_spark_version(service_name, component_name, yarn_version): java64_home = config['ambariLevelParams']['java_home'] java_exec = format("{java64_home}/bin/java") hadoop_ssl_enabled = default("/configurations/core-site/hadoop.ssl.enabled", False) +java_version = expect("/ambariLevelParams/java_version", int) yarn_heapsize = config['configurations']['yarn-env']['yarn_heapsize'] resourcemanager_heapsize = config['configurations']['yarn-env']['resourcemanager_heapsize'] @@ -292,6 +306,12 @@ def get_spark_version(service_name, component_name, yarn_version): ats_host = set(default("/clusterHostInfo/app_timeline_server_hosts", [])) has_ats = not len(ats_host) == 0 +atsv2_host = set(default("/clusterHostInfo/timeline_reader_hosts", [])) +has_atsv2 = not len(atsv2_host) == 0 + +registry_dns_host = set(default("/clusterHostInfo/yarn_registry_dns_hosts", [])) +has_registry_dns = not len(registry_dns_host) == 0 + # don't using len(nm_hosts) here, because check can take too much time on large clusters number_of_nm = 1 @@ -322,13 +342,19 @@ def get_spark_version(service_name, component_name, yarn_version): rm_security_opts = format('-Dzookeeper.sasl.client=true -Dzookeeper.sasl.client.username={zk_principal_user} -Djava.security.auth.login.config={yarn_jaas_file} -Dzookeeper.sasl.clientconfig=Client') # YARN timeline security options - if has_ats: + if has_ats or has_atsv2: yarn_timelineservice_principal_name = config['configurations']['yarn-site']['yarn.timeline-service.principal'] yarn_timelineservice_principal_name = yarn_timelineservice_principal_name.replace('_HOST', hostname.lower()) yarn_timelineservice_keytab = config['configurations']['yarn-site']['yarn.timeline-service.keytab'] yarn_timelineservice_kinit_cmd = format("{kinit_path_local} -kt {yarn_timelineservice_keytab} {yarn_timelineservice_principal_name};") yarn_ats_jaas_file = os.path.join(hadoop_conf_dir, 'yarn_ats_jaas.conf') + if has_registry_dns: + yarn_registry_dns_principal_name = config['configurations']['yarn-env']['yarn.registry-dns.principal'] + yarn_registry_dns_principal_name = yarn_registry_dns_principal_name.replace('_HOST', hostname.lower()) + yarn_registry_dns_keytab = config['configurations']['yarn-env']['yarn.registry-dns.keytab'] + yarn_registry_dns_jaas_file = os.path.join(hadoop_conf_dir, 'yarn_registry_dns_jaas.conf') + if 'yarn.nodemanager.principal' in config['configurations']['yarn-site']: nodemanager_principal_name = default('/configurations/yarn-site/yarn.nodemanager.principal', None) if nodemanager_principal_name: @@ -421,6 +447,7 @@ def get_spark_version(service_name, component_name, yarn_version): rm_active_port = rm_https_port if yarn_https_on else rm_port rm_ha_enabled = False +rm_ha_id = None rm_ha_ids_list = [] rm_webapp_addresses_list = [yarn_rm_address] rm_ha_ids = default("/configurations/yarn-site/yarn.resourcemanager.ha.rm-ids", None) @@ -436,6 +463,9 @@ def get_spark_version(service_name, component_name, yarn_version): rm_webapp_address_property = format('yarn.resourcemanager.webapp.address.{rm_id}') if not yarn_https_on else format('yarn.resourcemanager.webapp.https.address.{rm_id}') rm_webapp_address = config['configurations']['yarn-site'][rm_webapp_address_property] rm_webapp_addresses_list.append(rm_webapp_address) + rm_host_name = config['configurations']['yarn-site'][format('yarn.resourcemanager.hostname.{rm_id}')] + if rm_host_name == hostname.lower(): + rm_ha_id = rm_id # for curl command in ranger plugin to get db connector jdk_location = config['ambariLevelParams']['jdk_location'] @@ -574,3 +604,223 @@ def get_spark_version(service_name, component_name, yarn_version): # need this to capture cluster name from where ranger yarn plugin is enabled cluster_name = config['clusterName'] + +# ranger yarn plugin end section + +# container-executor properties +min_user_id = config['configurations']['container-executor']['min_user_id'] +docker_module_enabled = str(config['configurations']['container-executor']['docker_module_enabled']).lower() +docker_binary = config['configurations']['container-executor']['docker_binary'] +docker_allowed_capabilities = config['configurations']['yarn-site']['yarn.nodemanager.runtime.linux.docker.capabilities'] +if docker_allowed_capabilities: + docker_allowed_capabilities = ','.join(x.strip() for x in docker_allowed_capabilities.split(',')) +else: + docker_allowed_capabilities = "" +docker_allowed_devices = config['configurations']['container-executor']['docker_allowed_devices'] +docker_allowed_networks = config['configurations']['yarn-site']['yarn.nodemanager.runtime.linux.docker.allowed-container-networks'] +if docker_allowed_networks: + docker_allowed_networks = ','.join(x.strip() for x in docker_allowed_networks.split(',')) +else: + docker_allowed_networks = "" +docker_allowed_ro_mounts = config['configurations']['container-executor']['docker_allowed_ro-mounts'] +docker_allowed_rw_mounts = config['configurations']['container-executor']['docker_allowed_rw-mounts'] +docker_privileged_containers_enabled = str(config['configurations']['container-executor']['docker_privileged-containers_enabled']).lower() +docker_trusted_registries = config['configurations']['container-executor']['docker_trusted_registries'] +docker_allowed_volume_drivers = config['configurations']['container-executor']['docker_allowed_volume-drivers'] + +# ATSv2 integration properties started. +yarn_timelinereader_pid_file = status_params.yarn_timelinereader_pid_file + +yarn_atsv2_hbase_versioned_home = format("{stack_root}/{version}/usr/lib/hbase") +yarn_hbase_bin = format("{yarn_atsv2_hbase_versioned_home}/bin") +yarn_hbase_hdfs_root_dir = config['configurations']['yarn-hbase-site']['hbase.rootdir'] +cluster_zookeeper_quorum_hosts = ",".join(config['clusterHostInfo']['zookeeper_server_hosts']) +if 'zoo.cfg' in config['configurations'] and 'clientPort' in config['configurations']['zoo.cfg']: + cluster_zookeeper_clientPort = config['configurations']['zoo.cfg']['clientPort'] +else: + cluster_zookeeper_clientPort = '2181' + +zookeeper_quorum_hosts = cluster_zookeeper_quorum_hosts +zookeeper_clientPort = cluster_zookeeper_clientPort +yarn_hbase_user = status_params.yarn_hbase_user +hbase_user = config['configurations']['hbase-env']['hbase_user'] +yarn_hbase_user_home = format("/user/{yarn_hbase_user}") +yarn_hbase_user_version_home = format("{yarn_hbase_user_home}/{version}") +yarn_hbase_app_hdfs_path = format("/bigtop/apps/{version}/hbase") +yarn_service_app_hdfs_path = format("/bigtop/apps/{version}/yarn") +if rm_ha_id is not None: + yarn_hbase_app_hdfs_path = format("{yarn_hbase_app_hdfs_path}/{rm_ha_id}") + yarn_service_app_hdfs_path = format("{yarn_service_app_hdfs_path}/{rm_ha_id}") +yarn_service_dep_source_path = format("{stack_root}/{version}/usr/lib/hadoop-yarn/lib/service-dep.tar.gz") +yarn_hbase_user_version_path = format("{yarn_hbase_user}/{version}") +yarn_hbase_user_tmp = format("{tmp_dir}/{yarn_hbase_user_version_path}") +yarn_hbase_log_dir = os.path.join(yarn_log_dir_prefix, "embedded-yarn-ats-hbase") +yarn_hbase_pid_dir_prefix = status_params.yarn_hbase_pid_dir_prefix +yarn_hbase_pid_dir = status_params.yarn_hbase_pid_dir +yarn_hbase_conf_dir = os.path.join(hadoop_conf_dir, "embedded-yarn-ats-hbase") +yarn_hbase_env_sh_template = config['configurations']['yarn-hbase-env']['content'] +yarn_hbase_java_io_tmpdir = default("/configurations/yarn-hbase-env/hbase_java_io_tmpdir", "/tmp") +yarn_hbase_tmp_dir = config['configurations']['yarn-hbase-site']['hbase.tmp.dir'] +yarn_hbase_local_dir = config['configurations']['yarn-hbase-site']['hbase.local.dir'] +yarn_hbase_master_info_port = config['configurations']['yarn-hbase-site']['hbase.master.info.port'] +yarn_hbase_regionserver_info_port = config['configurations']['yarn-hbase-site']['hbase.regionserver.info.port'] + +if (('yarn-hbase-log4j' in config['configurations']) and ('content' in config['configurations']['yarn-hbase-log4j'])): + yarn_hbase_log4j_props = config['configurations']['yarn-hbase-log4j']['content'] +else: + yarn_hbase_log4j_props = None + +timeline_collector = "" +yarn_timeline_service_version = config['configurations']['yarn-site']['yarn.timeline-service.version'] +yarn_timeline_service_versions = config['configurations']['yarn-site']['yarn.timeline-service.versions'] +yarn_timeline_service_enabled = config['configurations']['yarn-site']['yarn.timeline-service.enabled'] + +if yarn_timeline_service_enabled: + if is_empty(yarn_timeline_service_versions): + if yarn_timeline_service_version == '2.0' or yarn_timeline_service_version == '2': + timeline_collector = "timeline_collector" + else: + ts_version_list = yarn_timeline_service_versions.split(',') + for ts_version in ts_version_list: + if '2.0' in ts_version or ts_version == '2': + timeline_collector = "timeline_collector" + break + +coprocessor_jar_name = "hadoop-yarn-server-timelineservice-hbase-coprocessor.jar" +yarn_timeline_jar_location = format("file://{stack_root}/{version}/usr/lib/hadoop-yarn/timelineservice/{coprocessor_jar_name}") +yarn_user_hbase_permissions = "RWXCA" + +yarn_hbase_kinit_cmd = "" +if security_enabled and has_atsv2: + yarn_hbase_jaas_file = os.path.join(yarn_hbase_conf_dir, 'yarn_hbase_jaas.conf') + yarn_hbase_master_jaas_file = os.path.join(yarn_hbase_conf_dir, 'yarn_hbase_master_jaas.conf') + yarn_hbase_regionserver_jaas_file = os.path.join(yarn_hbase_conf_dir, 'yarn_hbase_regionserver_jaas.conf') + + yarn_hbase_master_principal_name = config['configurations']['yarn-hbase-site']['hbase.master.kerberos.principal'] + yarn_hbase_master_principal_name = yarn_hbase_master_principal_name.replace('_HOST', hostname.lower()) + yarn_hbase_master_keytab = config['configurations']['yarn-hbase-site']['hbase.master.keytab.file'] + + yarn_hbase_regionserver_principal_name = config['configurations']['yarn-hbase-site']['hbase.regionserver.kerberos.principal'] + yarn_hbase_regionserver_principal_name = yarn_hbase_regionserver_principal_name.replace('_HOST', hostname.lower()) + yarn_hbase_regionserver_keytab = config['configurations']['yarn-hbase-site']['hbase.regionserver.keytab.file'] + + # User master principal name as AM principal in system service. Don't replace _HOST. + yarn_ats_hbase_principal_name = config['configurations']['yarn-hbase-site']['hbase.master.kerberos.principal'] + yarn_ats_hbase_keytab = config['configurations']['yarn-hbase-site']['hbase.master.keytab.file'] + yarn_ats_principal_name = config['configurations']['yarn-env']['yarn_ats_principal_name'] + yarn_ats_user_keytab = config['configurations']['yarn-env']['yarn_ats_user_keytab'] + yarn_hbase_kinit_cmd = format("{kinit_path_local} -kt {yarn_ats_user_keytab} {yarn_ats_principal_name};") + + +hbase_within_cluster = config['configurations']['yarn-hbase-env']['hbase_within_cluster'] +is_hbase_installed = False +master_configs = config['clusterHostInfo'] + +if hbase_within_cluster: + if 'hbase_master_hosts' in master_configs and 'hbase-site' in config['configurations']: + is_hbase_installed = True + zookeeper_znode_parent = config['configurations']['hbase-site']['zookeeper.znode.parent'] + else: + zookeeper_znode_parent = "/hbase-unsecure" + hbase_site_conf = config['configurations']['hbase-site'] + hbase_site_attributes = config['configurationAttributes']['hbase-site'] + yarn_hbase_conf_dir = "/etc/hbase/conf" +else: + zookeeper_znode_parent = "/atsv2-hbase-unsecure" + hbase_site_conf = config['configurations']['yarn-hbase-site'] + hbase_site_attributes = config['configurationAttributes']['yarn-hbase-site'] + +yarn_hbase_grant_premissions_file = format("{yarn_hbase_conf_dir}/hbase_grant_permissions.sh") +yarn_hbase_package_preparation_file = format("{tmp_dir}/hbase_package_preparation.sh") +is_hbase_system_service_launch = config['configurations']['yarn-hbase-env']['is_hbase_system_service_launch'] +use_external_hbase = config['configurations']['yarn-hbase-env']['use_external_hbase'] + +hbase_cmd = format("{yarn_hbase_bin}/hbase --config {yarn_hbase_conf_dir}") +class_name = format("org.apache.hadoop.yarn.server.timelineservice.storage.TimelineSchemaCreator -Dhbase.client.retries.number=35 -create -s") +yarn_hbase_table_create_cmd = format("export HBASE_CLASSPATH_PREFIX={stack_root}/{version}/usr/lib/hadoop-yarn/timelineservice/*;{yarn_hbase_kinit_cmd} {hbase_cmd} {class_name}") +yarn_hbase_table_grant_premission_cmd = format("{yarn_hbase_kinit_cmd} {hbase_cmd} shell {yarn_hbase_grant_premissions_file}") + +# System service configuration as part of ATSv2. +yarn_system_service_dir = config['configurations']['yarn-site']['yarn.service.system-service.dir'] +yarn_system_service_launch_mode = config['configurations']['yarn-hbase-env']['yarn_hbase_system_service_launch_mode'] +yarn_hbase_service_queue_name = config['configurations']['yarn-hbase-env']['yarn_hbase_system_service_queue_name'] + +yarn_hbase_master_cpu = config['configurations']['yarn-hbase-env']['yarn_hbase_master_cpu'] +yarn_hbase_master_memory = expect("/configurations/yarn-hbase-env/yarn_hbase_master_memory", int) +yarn_hbase_master_containers = config['configurations']['yarn-hbase-env']['yarn_hbase_master_containers'] +yarn_hbase_regionserver_cpu = config['configurations']['yarn-hbase-env']['yarn_hbase_regionserver_cpu'] +yarn_hbase_regionserver_memory = expect("/configurations/yarn-hbase-env/yarn_hbase_regionserver_memory", int) +yarn_hbase_regionserver_containers = config['configurations']['yarn-hbase-env']['yarn_hbase_regionserver_containers'] +yarn_hbase_client_cpu = config['configurations']['yarn-hbase-env']['yarn_hbase_client_cpu'] +yarn_hbase_client_memory = expect("/configurations/yarn-hbase-env/yarn_hbase_client_memory", int) +yarn_hbase_client_containers = config['configurations']['yarn-hbase-env']['yarn_hbase_client_containers'] + +yarn_hbase_heap_memory_factor = expect("/configurations/yarn-hbase-env/yarn_hbase_heap_memory_factor", float) +yarn_hbase_master_heapsize = ensure_unit_for_memory(calc_heap_memory(yarn_hbase_master_memory, yarn_hbase_heap_memory_factor)) +yarn_hbase_regionserver_heapsize = ensure_unit_for_memory(calc_heap_memory(yarn_hbase_regionserver_memory, yarn_hbase_heap_memory_factor)) + +yarn_hbase_log_level = str(config['configurations']['yarn-hbase-env']['yarn_hbase_log_level']).upper() +# ATSv2 integration properties ended + +gpu_module_enabled = str(config['configurations']['container-executor']['gpu_module_enabled']).lower() +cgroup_root = config['configurations']['container-executor']['cgroup_root'] +yarn_hierarchy = config['configurations']['container-executor']['yarn_hierarchy'] + +# registry dns service +registry_dns_needs_privileged_access = status_params.registry_dns_needs_privileged_access + +mount_table_content = None +if 'viewfs-mount-table' in config['configurations']: + xml_inclusion_file_name = 'viewfs-mount-table.xml' + mount_table = config['configurations']['viewfs-mount-table'] + + if 'content' in mount_table and mount_table['content'].strip(): + mount_table_content = mount_table['content'] + +hbase_log_maxfilesize = default('configurations/yarn-hbase-log4j/hbase_log_maxfilesize',256) +hbase_log_maxbackupindex = default('configurations/yarn-hbase-log4j/hbase_log_maxbackupindex',20) +hbase_security_log_maxfilesize = default('configurations/yarn-hbase-log4j/hbase_security_log_maxfilesize',256) +hbase_security_log_maxbackupindex = default('configurations/yarn-hbase-log4j/hbase_security_log_maxbackupindex',20) + +rm_cross_origin_enabled = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.cross-origin.enabled'] + +cross_origins = '*' +if rm_cross_origin_enabled: + host_suffix = rm_host.rsplit('.', 2)[1:] + if len(host_suffix) == 2 : + cross_origins = 'regex:.*[.]' + '[.]'.join(host_suffix) + "(:\d*)?" + +ams_collector_hosts = ",".join(default("/clusterHostInfo/metrics_collector_hosts", [])) +has_metric_collector = not len(ams_collector_hosts) == 0 +if has_metric_collector: + if 'cluster-env' in config['configurations'] and \ + 'metrics_collector_vip_port' in config['configurations']['cluster-env']: + metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port'] + else: + metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188") + if metric_collector_web_address.find(':') != -1: + metric_collector_port = metric_collector_web_address.split(':')[1] + else: + metric_collector_port = '6188' + if default("/configurations/ams-site/timeline.metrics.service.http.policy", "HTTP_ONLY") == "HTTPS_ONLY": + metric_collector_protocol = 'https' + else: + metric_collector_protocol = 'http' + metric_truststore_path= default("/configurations/ams-ssl-client/ssl.client.truststore.location", "") + metric_truststore_type= default("/configurations/ams-ssl-client/ssl.client.truststore.type", "") + metric_truststore_password= default("/configurations/ams-ssl-client/ssl.client.truststore.password", "") + host_in_memory_aggregation = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation", True) + host_in_memory_aggregation_port = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.port", 61888) + + pass +metrics_report_interval = default("/configurations/ams-site/timeline.metrics.sink.report.interval", 60) +metrics_collection_period = default("/configurations/ams-site/timeline.metrics.sink.collection.period", 10) + +host_in_memory_aggregation = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation", True) +host_in_memory_aggregation_port = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.port", 61888) +is_aggregation_https_enabled = False +if default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.http.policy", "HTTP_ONLY") == "HTTPS_ONLY": + host_in_memory_aggregation_protocol = 'https' + is_aggregation_https_enabled = True +else: + host_in_memory_aggregation_protocol = 'http' diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py index 276bad38f61..5e2e63e71f2 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py @@ -22,12 +22,14 @@ from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from ambari_commons import OSConst +from resource_management.core import shell from resource_management.core.shell import as_user, as_sudo +from resource_management.core.logger import Logger from resource_management.libraries.functions.show_logs import show_logs from resource_management.libraries.functions.format import format from resource_management.core.resources.system import Execute, File from resource_management.core.signal_utils import TerminateStrategy -from resource_management.core.logger import Logger +import subprocess @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def service(componentName, action='start', serviceName='yarn'): @@ -43,34 +45,58 @@ def service(componentName, action='start', serviceName='yarn'): @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def service(componentName, action='start', serviceName='yarn'): import params + import status_params - if serviceName == 'mapreduce' and componentName == 'historyserver': - if not params.hdfs_tmp_dir or params.hdfs_tmp_dir == None or params.hdfs_tmp_dir.lower() == 'null': - Logger.error("WARNING: HDFS tmp dir property (hdfs_tmp_dir) is empty or invalid. Ambari will change permissions for the folder on regular basis.") + hadoop_env_exports = { + 'HADOOP_LIBEXEC_DIR': params.hadoop_libexec_dir + } + if serviceName == 'mapreduce' and componentName == 'historyserver': delete_pid_file = True daemon = format("{mapred_bin}/mr-jobhistory-daemon.sh") pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-{componentName}.pid") usr = params.mapred_user log_dir = params.mapred_log_dir + cmd = format("export HADOOP_LIBEXEC_DIR={hadoop_libexec_dir} && {daemon} --config {hadoop_conf_dir}") else: # !!! yarn-daemon.sh deletes the PID for us; if we remove it the script # may not work correctly when stopping the service delete_pid_file = False daemon = format("{yarn_bin}/yarn-daemon.sh") - pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-{componentName}.pid") - usr = params.yarn_user + if componentName == 'registrydns' and status_params.registry_dns_needs_privileged_access: + pid_file = status_params.yarn_registry_dns_priv_pid_file + usr = status_params.root_user + else: + pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-{componentName}.pid") + usr = params.yarn_user + log_dir = params.yarn_log_dir + cmd = format("export HADOOP_LIBEXEC_DIR={hadoop_libexec_dir} && {daemon} --config {hadoop_conf_dir}") - cmd = format("export HADOOP_LIBEXEC_DIR={hadoop_libexec_dir} && {daemon} --config {hadoop_conf_dir}") + check_process = as_sudo(["test", "-f", pid_file]) + " && " + as_sudo(["pgrep", "-F", pid_file]) - if action == 'start': + if usr == 'root' and componentName == 'registrydns': + # these are needed for unknown reasons + hadoop_env_exports['HADOOP_PID_DIR'] = params.yarn_pid_dir + hadoop_env_exports['HADOOP_SECURE_PID_DIR'] = params.yarn_pid_dir + hadoop_env_exports['HADOOP_LOG_DIR'] = params.yarn_log_dir + hadoop_env_exports['HADOOP_SECURE_LOG_DIR'] = params.yarn_log_dir - daemon_cmd = format("{ulimit_cmd} {cmd} start {componentName}") - check_process = as_sudo(["test", "-f", pid_file]) + " && " + as_sudo(["pgrep", "-F", pid_file]) + cmd = [daemon, "--config", params.hadoop_conf_dir, action, componentName] + daemon_cmd = as_sudo(cmd) + else: + if action == 'start': + cmd = format("{ulimit_cmd} {cmd} start {componentName}") + else: + cmd = format("{cmd} stop {componentName}") + daemon_cmd = as_user(cmd, usr) - # Remove the pid file if its corresponding process is not running. - File(pid_file, action = "delete", not_if = check_process) + if action == 'start': + if componentName == 'registrydns': + checkAndStopRegistyDNS() + else: + # Remove the pid file if its corresponding process is not running. + File(pid_file, action = "delete", not_if = check_process) if componentName == 'timelineserver' and serviceName == 'yarn': File(params.ats_leveldb_lock_file, @@ -82,8 +108,8 @@ def service(componentName, action='start', serviceName='yarn'): try: # Attempt to start the process. Internally, this is skipped if the process is already running. - Execute(daemon_cmd, user = usr, not_if = check_process) - + Execute(daemon_cmd, not_if=check_process, environment=hadoop_env_exports) + # Ensure that the process with the expected PID exists. Execute(check_process, not_if = check_process, @@ -95,22 +121,22 @@ def service(componentName, action='start', serviceName='yarn'): raise elif action == 'stop': - daemon_cmd = format("{cmd} stop {componentName}") - try: - Execute(daemon_cmd, user=usr) - except: - show_logs(log_dir, usr) - raise - - # !!! yarn-daemon doesn't need us to delete PIDs - if delete_pid_file is True: - File(pid_file, action="delete") - + if componentName == 'registrydns': + checkAndStopRegistyDNS() + else: + try: + Execute(daemon_cmd, only_if=check_process, environment=hadoop_env_exports) + except: + show_logs(log_dir, usr) + raise + + # !!! yarn-daemon doesn't need us to delete PIDs + if delete_pid_file is True: + File(pid_file, action="delete") elif action == 'refreshQueues': rm_kinit_cmd = params.rm_kinit_cmd refresh_cmd = format("{rm_kinit_cmd} export HADOOP_LIBEXEC_DIR={hadoop_libexec_dir} && {yarn_container_bin}/yarn rmadmin -refreshQueues") - Execute(refresh_cmd, user = usr, timeout = 20, # when Yarn is not started command hangs forever and should be killed @@ -118,3 +144,75 @@ def service(componentName, action='start', serviceName='yarn'): try_sleep = 5, timeout_kill_strategy = TerminateStrategy.KILL_PROCESS_GROUP, # the process cannot be simply killed by 'kill -15', so kill pg group instread. ) + +def checkAndStopRegistyDNS(): + import params + import status_params + + componentName = 'registrydns' + action = 'stop' + daemon = format("{yarn_bin}/yarn-daemon.sh") + hadoop_env_exports = { + 'HADOOP_LIBEXEC_DIR': params.hadoop_libexec_dir + } + + # When registry dns is switched from non-privileged to privileged mode or the other way, + # then the previous instance of registry dns has a different pid/user. + # Checking if either of the processes are running and shutting them down if they are. + + # privileged mode + dns_pid_file = status_params.yarn_registry_dns_priv_pid_file + dns_user = status_params.root_user + Logger.info("checking any existing dns pid file = '" + dns_pid_file + "' dns user '" + dns_user + "'") + try: + # these are needed for unknown reasons + env_exports = { + 'HADOOP_PID_DIR': params.yarn_pid_dir, + 'HADOOP_SECURE_PID_DIR': params.yarn_pid_dir, + 'HADOOP_LOG_DIR': params.yarn_log_dir, + 'HADOOP_SECURE_LOG_DIR': params.yarn_log_dir + } + env_exports.update(hadoop_env_exports) + cmd = [daemon, "--config", params.hadoop_conf_dir, action, componentName] + daemon_cmd = as_sudo(cmd) + process_id_exists_command = as_sudo(["test", "-f", dns_pid_file]) + " && " + as_sudo(["pgrep", "-F", dns_pid_file]) + Execute(daemon_cmd, only_if=process_id_exists_command, environment=env_exports) + except: + # When the registry dns port is modified but registry dns is not started + # immediately, then the configs in yarn-env.sh & yarn-site.xml related + # to registry dns may have already changed. This introduces a discrepancy + # between the actual process that is running and the configs. + # For example, when port is changed from 5300 to 53, + # then dns port = 53 in yarn-site and YARN_REGISTRYDNS_SECURE_* envs in yarn-env.sh + # are saved. So, while trying to shutdown the stray non-privileged registry dns process + # after sometime, yarn daemon from the configs thinks that it needs privileged + # access and throws an exception. In such cases, we try to kill the stray process. + pass + process_id_does_not_exist_command = format("! ( {process_id_exists_command} )") + code, out = shell.call(process_id_does_not_exist_command, + env=env_exports, + tries=5, + try_sleep=5) + if code != 0: + code, out, err = shell.checked_call(("pgrep", "-f", dns_pid_file), sudo=True, env=env_exports, + stderr=subprocess.PIPE) + Logger.info("PID to kill was retrieved: '" + out + "'.") + for pid in out.splitlines(): + try: + Execute(("kill", "-9", pid), sudo=True) + except: + # ignoring failures + Logger.warning("failed to kill pid '" + pid + "'.") + pass + File(dns_pid_file, action="delete") + + # non-privileged mode + dns_pid_file = status_params.yarn_registry_dns_pid_file + dns_user = params.yarn_user + Logger.info("checking any existing dns pid file = '" + dns_pid_file + "' dns user '" + dns_user + "'") + try: + cmd = format("{daemon} --config {hadoop_conf_dir} {action} {componentName}") + daemon_cmd = as_user(cmd, dns_user) + Execute(daemon_cmd, environment=hadoop_env_exports) + except: + pass diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/status_params.py index aaace6cd864..e0528006b94 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/status_params.py @@ -17,18 +17,27 @@ limitations under the License. """ +import os +import pwd + +from ambari_commons import OSCheck + from resource_management.libraries.script.script import Script from resource_management.libraries import functions from resource_management.libraries.functions import conf_select from resource_management.libraries.functions import stack_select from resource_management.libraries.functions import format +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.functions import stack_select from resource_management.libraries.functions.default import default config = Script.get_config() tmp_dir = Script.get_tmp_dir() +root_user = 'root' mapred_user = config['configurations']['mapred-env']['mapred_user'] yarn_user = config['configurations']['yarn-env']['yarn_user'] +yarn_ats_user = config['configurations']['yarn-env']['yarn_ats_user'] yarn_pid_dir_prefix = config['configurations']['yarn-env']['yarn_pid_dir_prefix'] mapred_pid_dir_prefix = config['configurations']['mapred-env']['mapred_pid_dir_prefix'] yarn_pid_dir = format("{yarn_pid_dir_prefix}/{yarn_user}") @@ -38,8 +47,23 @@ nodemanager_pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-nodemanager.pid") yarn_historyserver_pid_file_old = format("{yarn_pid_dir}/hadoop-{yarn_user}-historyserver.pid") yarn_historyserver_pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-timelineserver.pid") # *-historyserver.pid is deprecated + +# registry dns service +registry_dns_bind_port = int(config['configurations']['yarn-env']['registry.dns.bind-port']) +registry_dns_needs_privileged_access = True if registry_dns_bind_port < 1024 else False + +yarn_registry_dns_pid_file = format("{yarn_pid_dir_prefix}/{yarn_user}/hadoop-{yarn_user}-registrydns.pid") +yarn_registry_dns_priv_pid_file = format("{yarn_pid_dir_prefix}/{root_user}/hadoop-{yarn_user}-{root_user}-registrydns.pid") + +if registry_dns_needs_privileged_access: + yarn_registry_dns_in_use_pid_file = yarn_registry_dns_priv_pid_file +else: + yarn_registry_dns_in_use_pid_file = yarn_registry_dns_pid_file + mapred_historyserver_pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-historyserver.pid") +yarn_timelinereader_pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-timelinereader.pid") + hadoop_home = stack_select.get_hadoop_dir("home") hadoop_conf_dir = conf_select.get_hadoop_conf_dir() @@ -48,3 +72,8 @@ security_enabled = config['configurations']['cluster-env']['security_enabled'] stack_name = default("/clusterLevelParams/stack_name", None) + +# ATSv2 backend properties +yarn_hbase_user = format("{yarn_ats_user}") #Use yarn_ats_user. +yarn_hbase_pid_dir_prefix = config['configurations']['yarn-hbase-env']['yarn_hbase_pid_dir_prefix'] +yarn_hbase_pid_dir = format("{yarn_hbase_pid_dir_prefix}/{yarn_hbase_user}") \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/timelinereader.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/timelinereader.py new file mode 100755 index 00000000000..0ee3e2ae080 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/timelinereader.py @@ -0,0 +1,119 @@ +""" +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. + +Ambari Agent + +""" +import os + +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions.constants import StackFeature +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions import check_process_status +from resource_management.libraries.functions.format import format +from resource_management.core.logger import Logger + +from yarn import yarn +from service import service +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl +from hbase_service import hbase, configure_hbase +from resource_management.libraries.functions.copy_tarball import copy_to_hdfs + +class ApplicationTimelineReader(Script): + def install(self, env): + self.install_packages(env) + + def start(self, env, upgrade_type=None): + import params + env.set_params(params) + self.configure(env) # FOR SECURITY + + if params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major): + # MC Hammer said, "Can't touch this" + resource_created = copy_to_hdfs( + "yarn", + params.user_group, + params.hdfs_user, + skip=params.sysprep_skip_copy_tarballs_hdfs) + if resource_created: + params.HdfsResource(None, action="execute") + + if not params.use_external_hbase and not params.is_hbase_system_service_launch: + hbase(action='start') + service('timelinereader', action='start') + + def stop(self, env, upgrade_type=None): + import params + env.set_params(params) + if not params.use_external_hbase and not params.is_hbase_system_service_launch: + hbase(action='stop') + service('timelinereader', action='stop') + + def configure(self, env, action = None): + import params + env.set_params(params) + yarn(name='apptimelinereader') + if not params.use_external_hbase and not params.is_hbase_system_service_launch: + configure_hbase(env) + +@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY) +class ApplicationTimelineReaderWindows(ApplicationTimelineReader): + def status(self, env): + service('timelinereader', action='status') + + +@OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) +class ApplicationTimelineReaderDefault(ApplicationTimelineReader): + def pre_upgrade_restart(self, env, upgrade_type=None): + Logger.info("Executing Stack Upgrade pre-restart") + import params + env.set_params(params) + + if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): + stack_select.select_packages(params.version) + # MC Hammer said, "Can't touch this" + resource_created = copy_to_hdfs("yarn", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) + if resource_created: + params.HdfsResource(None, action="execute") + + def status(self, env): + import status_params + env.set_params(status_params) + for pid_file in self.get_pid_files(): + check_process_status(pid_file) + + def get_log_folder(self): + import params + return params.yarn_log_dir + + def get_user(self): + import params + return params.yarn_user + + def get_pid_files(self): + import params + pid_files = [] + pid_files.append(format("{yarn_timelinereader_pid_file}")) + if not params.use_external_hbase and not params.is_hbase_system_service_launch: + pid_files.append(format("{yarn_hbase_pid_dir}/hbase-{yarn_hbase_user}-master.pid")) + pid_files.append(format("{yarn_hbase_pid_dir}/hbase-{yarn_hbase_user}-regionserver.pid")) + return pid_files + +if __name__ == "__main__": + ApplicationTimelineReader().execute() diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py index 2c6ee037ecf..db0d75003a9 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py @@ -29,15 +29,17 @@ from resource_management.libraries.functions.format import format from resource_management.libraries.functions.is_empty import is_empty from resource_management.libraries.functions.lzo_utils import install_lzo_if_needed -from resource_management.core.resources.system import Directory +from resource_management.core.resources.system import Directory,Execute from resource_management.core.resources.system import File from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.core.source import InlineTemplate, Template from resource_management.core.logger import Logger from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from ambari_commons import OSConst +from resource_management.libraries.script.config_dictionary import UnknownConfiguration from resource_management.libraries.functions.mounted_dirs_helper import handle_mounted_dirs +from hbase_service import create_hbase_package, copy_hbase_package_to_hdfs, createTables @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def yarn(name=None, config_dir=None): @@ -80,6 +82,12 @@ def yarn(name=None, config_dir=None): ignore_failures=True, cd_access='a', ) + Directory(params.yarn_hbase_conf_dir, + owner = params.yarn_hbase_user, + group = params.user_group, + create_parents = True, + cd_access='a', + ) # Some of these function calls depend on the directories above being created first. if name == 'resourcemanager': @@ -90,6 +98,10 @@ def yarn(name=None, config_dir=None): setup_ats() elif name == 'historyserver': setup_historyserver() + elif name == 'apptimelinereader': + if not params.use_external_hbase and not params.is_hbase_system_service_launch: + setup_atsv2_hbase_directories() + setup_atsv2_hbase_files() XmlConfig("core-site.xml", conf_dir=config_dir, @@ -121,9 +133,13 @@ def yarn(name=None, config_dir=None): mode=0o644 ) + + configs = {} + configs.update(params.config['configurations']['yarn-site']) + configs["hadoop.registry.dns.bind-port"] = params.config['configurations']['yarn-env']['registry.dns.bind-port'] XmlConfig("yarn-site.xml", conf_dir=config_dir, - configurations=params.config['configurations']['yarn-site'], + configurations=configs, configuration_attributes=params.config['configurationAttributes']['yarn-site'], owner=params.yarn_user, group=params.user_group, @@ -138,6 +154,25 @@ def yarn(name=None, config_dir=None): group=params.user_group, mode=0o644 ) + + if not isinstance(params.hbase_site_conf, UnknownConfiguration): + XmlConfig("hbase-site.xml", + conf_dir=params.yarn_hbase_conf_dir, + configurations=params.hbase_site_conf, + configuration_attributes=params.hbase_site_attributes, + owner=params.yarn_hbase_user, + group=params.user_group, + mode=0o644 + ) + + XmlConfig("resource-types.xml", + conf_dir=config_dir, + configurations=params.config['configurations']['resource-types'], + configuration_attributes=params.config['configurationAttributes']['resource-types'], + owner=params.yarn_user, + group=params.user_group, + mode=0o644 + ) File(format("{limits_conf_dir}/yarn.conf"), mode=0o644, content=Template('yarn.conf.j2') @@ -201,6 +236,14 @@ def yarn(name=None, config_dir=None): group=params.user_group, content=Template("yarn_ats_jaas.conf.j2") ) + + if params.has_registry_dns: + File(os.path.join(config_dir, 'yarn_registry_dns_jaas.conf'), + owner=params.yarn_user, + group=params.user_group, + mode=0o644, + content=Template("yarn_registry_dns_jaas.conf.j2") + ) File(os.path.join(config_dir, 'yarn_nm_jaas.conf'), owner=params.yarn_user, group=params.user_group, @@ -287,6 +330,8 @@ def yarn(name=None, config_dir=None): group=params.user_group ) + setup_atsv2_backend(name, config_dir) + def setup_historyserver(): import params @@ -530,6 +575,12 @@ def yarn(name = None): owner=params.yarn_user, mode='f' ) + XmlConfig("yarn-hbase-site.xml", + conf_dir=params.config_dir, + configurations=params.config['configurations']['yarn-hbase-site'], + owner=params.yarn_user, + mode='f' + ) if name in params.service_map: service_name = params.service_map[name] @@ -538,3 +589,193 @@ def yarn(name = None): action="change_user", username = params.yarn_user, password = Script.get_password(params.yarn_user)) + +def setup_atsv2_backend(name=None, config_dir=None): + import params + Logger.info(f"setup_atsv2_backend name:{name} {params.use_external_hbase} {params.hbase_within_cluster} {params.is_hbase_system_service_launch}") + if name == "apptimelinereader" and params.use_external_hbase and params.hbase_within_cluster: + createTables() + + if not params.use_external_hbase and params.is_hbase_system_service_launch: + if name == 'resourcemanager': + setup_system_services(config_dir) + elif name == 'nodemanager': + setup_atsv2_hbase_files() + +def setup_atsv2_hbase_files(): + import params + if 'yarn-hbase-policy' in params.config['configurations']: + XmlConfig( "hbase-policy.xml", + conf_dir = params.yarn_hbase_conf_dir, + configurations = params.config['configurations']['yarn-hbase-policy'], + configuration_attributes=params.config['configurationAttributes']['yarn-hbase-policy'], + owner = params.yarn_hbase_user, + group = params.user_group, + mode=0o644 + ) + + File(os.path.join(params.yarn_hbase_conf_dir, "hbase-env.sh"), + owner=params.yarn_hbase_user, + group=params.user_group, + mode=0o644, + content=InlineTemplate(params.yarn_hbase_env_sh_template) + ) + + File( format("{yarn_hbase_grant_premissions_file}"), + owner = params.yarn_hbase_user, + group = params.user_group, + mode = 0o644, + content = Template('yarn_hbase_grant_permissions.j2') + ) + + if (params.yarn_hbase_log4j_props != None): + File(format("{yarn_hbase_conf_dir}/log4j.properties"), + mode=0o644, + group=params.user_group, + owner=params.yarn_hbase_user, + content=InlineTemplate(params.yarn_hbase_log4j_props) + ) + elif (os.path.exists(format("{yarn_hbase_conf_dir}/log4j.properties"))): + File(format("{yarn_hbase_conf_dir}/log4j.properties"), + mode=0o644, + group=params.user_group, + owner=params.yarn_hbase_user + ) + if params.security_enabled: + File(os.path.join(params.yarn_hbase_conf_dir, 'yarn_hbase_master_jaas.conf'), + owner=params.yarn_hbase_user, + group=params.user_group, + content=Template("yarn_hbase_master_jaas.conf.j2") + ) + File(os.path.join(params.yarn_hbase_conf_dir, 'yarn_hbase_regionserver_jaas.conf'), + owner=params.yarn_hbase_user, + group=params.user_group, + content=Template("yarn_hbase_regionserver_jaas.conf.j2") + ) + # Metrics properties + if params.has_metric_collector: + File(os.path.join(params.yarn_hbase_conf_dir, 'hadoop-metrics2-hbase.properties'), + owner=params.yarn_hbase_user, + group=params.user_group, + content=Template("hadoop-metrics2-hbase.properties.j2") + ) + +def setup_atsv2_hbase_directories(): + import params + Directory([params.yarn_hbase_pid_dir_prefix, params.yarn_hbase_pid_dir, params.yarn_hbase_log_dir], + owner=params.yarn_hbase_user, + group=params.user_group, + create_parents=True, + cd_access='a', + ) + + parent_dir = os.path.dirname(params.yarn_hbase_tmp_dir) + # In case if we have several placeholders in path + while ("${" in parent_dir): + parent_dir = os.path.dirname(parent_dir) + if parent_dir != os.path.abspath(os.sep) : + Directory (parent_dir, + create_parents = True, + cd_access="a", + ) + Execute(("chmod", "1777", parent_dir), sudo=True) + +def setup_system_services(config_dir=None): + import params + setup_atsv2_hbase_files() + if params.security_enabled: + File(os.path.join(params.yarn_hbase_conf_dir, 'hbase.yarnfile'), + owner=params.yarn_hbase_user, + group=params.user_group, + content=Template("yarn_hbase_secure.yarnfile.j2") + ) + else: + File(os.path.join(params.yarn_hbase_conf_dir, 'hbase.yarnfile'), + owner=params.yarn_hbase_user, + group=params.user_group, + content=Template("yarn_hbase_unsecure.yarnfile.j2") + ) + + + user_dir = format("{yarn_system_service_dir}/{yarn_system_service_launch_mode}/{yarn_hbase_user}") + params.HdfsResource(user_dir, + type="directory", + action="create_on_execute", + owner=params.yarn_user, + group=params.user_group + ) + params.HdfsResource(format("{user_dir}/hbase.yarnfile"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_conf_dir}/hbase.yarnfile"), + owner=params.yarn_user, + group=params.user_group + ) + params.HdfsResource(format("{yarn_hbase_user_home}"), + type="directory", + action="create_on_execute", + owner=params.yarn_hbase_user, + group=params.user_group, + mode=0o770, + ) + params.HdfsResource(format("{yarn_hbase_user_version_home}"), + type="directory", + action="create_on_execute", + owner=params.yarn_hbase_user, + group=params.user_group, + mode=0o770, + ) + params.HdfsResource(format("{yarn_hbase_user_version_home}/core-site.xml"), + type="file", + action="create_on_execute", + source=format("{config_dir}/core-site.xml"), + owner=params.yarn_hbase_user, + group=params.user_group + ) + params.HdfsResource(format("{yarn_hbase_user_version_home}/hbase-site.xml"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_conf_dir}/hbase-site.xml"), + owner=params.yarn_hbase_user, + group=params.user_group + ) + params.HdfsResource(format("{yarn_hbase_user_version_home}/hbase-policy.xml"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_conf_dir}/hbase-policy.xml"), + owner=params.yarn_hbase_user, + group=params.user_group + ) + params.HdfsResource(format("{yarn_hbase_user_version_home}/log4j.properties"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_conf_dir}/log4j.properties"), + owner=params.yarn_hbase_user, + group=params.user_group + ) + if params.has_metric_collector: + params.HdfsResource(format("{yarn_hbase_user_version_home}/hadoop-metrics2-hbase.properties"), + type="file", + action="create_on_execute", + source=format("{yarn_hbase_conf_dir}/hadoop-metrics2-hbase.properties"), + owner=params.yarn_hbase_user, + group=params.user_group + ) + params.HdfsResource(params.yarn_hbase_hdfs_root_dir, + type="directory", + action="create_on_execute", + owner=params.yarn_hbase_user + ) + # copy service-dep.tar.gz into hdfs + params.HdfsResource(format("{yarn_service_app_hdfs_path}"), + type="directory", + action="create_on_execute", + owner=params.hdfs_user, + group=params.hdfs_user, + mode=0o555, + ) + + params.HdfsResource(None, action="execute") + + create_hbase_package() + copy_hbase_package_to_hdfs() \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_registry_dns.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_registry_dns.py new file mode 100755 index 00000000000..9bd40252eee --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_registry_dns.py @@ -0,0 +1,93 @@ +""" +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. + +Ambari Agent + +""" + +import nodemanager_upgrade + +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions.constants import StackFeature +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.check_process_status import check_process_status +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions.security_commons import build_expectations, \ + cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \ + FILE_TYPE_XML +from resource_management.core.logger import Logger +from yarn import yarn +from service import service +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl + + +class RegistryDNS(Script): + def install(self, env): + self.install_packages(env) + + def stop(self, env, upgrade_type=None): + import params + env.set_params(params) + service('registrydns',action='stop') + + def start(self, env, upgrade_type=None): + import params + env.set_params(params) + self.configure(env) # FOR SECURITY + service('registrydns',action='start') + + def configure(self, env): + import params + env.set_params(params) + yarn(name="registrydns") + + +@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY) +class RegistryDNSWindows(RegistryDNS): + def status(self, env): + service('registrydns', action='status') + + +@OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) +class RegistryDNSDefault(RegistryDNS): + def pre_upgrade_restart(self, env, upgrade_type=None): + Logger.info("Executing RegistryDNS Stack Upgrade pre-restart") + import params + env.set_params(params) + stack_select.select_packages(params.version) + + def status(self, env): + import status_params + env.set_params(status_params) + check_process_status(status_params.yarn_registry_dns_in_use_pid_file) + + def get_log_folder(self): + import params + return params.yarn_log_dir + + def get_user(self): + import params + return params.yarn_user + + def get_pid_files(self): + import status_params + return [status_params.yarn_registry_dns_in_use_pid_file] + +if __name__ == "__main__": + RegistryDNS().execute() diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/hadoop-metrics2-hbase.properties.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/hadoop-metrics2-hbase.properties.j2 new file mode 100755 index 00000000000..5bb6d6f5fc3 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/hadoop-metrics2-hbase.properties.j2 @@ -0,0 +1,62 @@ +{# +# 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. +#} + +hbase.extendedperiod = 3600 + +hbase.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink +hbase.period=30 +hbase.collector.hosts={{ams_collector_hosts}} +hbase.port={{metric_collector_port}} +hbase.protocol={{metric_collector_protocol}} + +jvm.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink +jvm.period=30 +jvm.collector.hosts={{ams_collector_hosts}} +jvm.port={{metric_collector_port}} +jvm.protocol={{metric_collector_protocol}} + +rpc.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink +rpc.period=30 +rpc.collector.hosts={{ams_collector_hosts}} +rpc.port={{metric_collector_port}} +rpc.protocol={{metric_collector_protocol}} + +*.timeline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar +*.sink.timeline.slave.host.name={{hostname}} +*.host_in_memory_aggregation = {{host_in_memory_aggregation}} +*.host_in_memory_aggregation_port = {{host_in_memory_aggregation_port}} +{% if is_aggregation_https_enabled %} +*.host_in_memory_aggregation_protocol = {{host_in_memory_aggregation_protocol}} +{% endif %} + +hbase.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink +hbase.sink.timeline.period={{metrics_collection_period}} +hbase.sink.timeline.sendInterval={{metrics_report_interval}}000 +hbase.sink.timeline.collector.hosts={{ams_collector_hosts}} +hbase.sink.timeline.port={{metric_collector_port}} +hbase.sink.timeline.protocol={{metric_collector_protocol}} +hbase.sink.timeline.serviceName-prefix=yarn-timeline-storage + +# HTTPS properties +hbase.sink.timeline.truststore.path = {{metric_truststore_path}} +hbase.sink.timeline.truststore.type = {{metric_truststore_type}} +hbase.sink.timeline.truststore.password = {{metric_truststore_password}} + +# Switch off metrics generation on a per region basis +*.source.filter.class=org.apache.hadoop.metrics2.filter.RegexFilter +hbase.*.source.filter.exclude=.*(Regions|Users|Tables).* \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/input.config-yarn.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/input.config-yarn.json.j2 new file mode 100755 index 00000000000..7d75279bc84 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/input.config-yarn.json.j2 @@ -0,0 +1,86 @@ +{# + # 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. + #} +{ + "input":[ + { + "type":"yarn_nodemanager", + "rowtype":"service", + "path":"{{default('/configurations/yarn-env/yarn_log_dir_prefix', '/var/log/hadoop')}}/{{default('configurations/yarn-env/yarn_user', 'yarn')}}/hadoop-{{default('configurations/yarn-env/yarn_user', 'yarn')}}-nodemanager-*.log" + }, + { + "type":"yarn_resourcemanager", + "rowtype":"service", + "path":"{{default('/configurations/yarn-env/yarn_log_dir_prefix', '/var/log/hadoop')}}/{{default('configurations/yarn-env/yarn_user', 'yarn')}}/hadoop-{{default('configurations/yarn-env/yarn_user', 'yarn')}}-resourcemanager-*.log" + }, + { + "type":"yarn_timelineserver", + "rowtype":"service", + "path":"{{default('/configurations/yarn-env/yarn_log_dir_prefix', '/var/log/hadoop')}}/{{default('configurations/yarn-env/yarn_user', 'yarn')}}/hadoop-{{default('configurations/yarn-env/yarn_user', 'yarn')}}-timelineserver-*.log" + }, + { + "type":"yarn_jobsummary", + "rowtype":"service", + "path":"{{default('/configurations/yarn-env/yarn_log_dir_prefix', '/var/log/hadoop')}}/{{default('configurations/yarn-env/yarn_user', 'yarn')}}/hadoop-mapreduce.jobsummary.log" + } + ], + "filter":[ + { + "filter":"grok", + "conditions":{ + "fields":{ + "type":[ + "yarn_historyserver", + "yarn_nodemanager", + "yarn_resourcemanager", + "yarn_timelineserver" + ] + } + }, + "log4j_format":"%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n", + "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})", + "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\(%{JAVAFILE:file}:%{JAVAMETHOD:method}\\(%{INT:line_number}\\)\\)%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}", + "post_map_values":{ + "logtime":{ + "map_date":{ + "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS" + } + } + } + }, + { + "filter":"grok", + "conditions":{ + "fields":{ + "type":[ + "yarn_jobsummary" + ] + } + }, + "log4j_format":"%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n", + "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})", + "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}%{GREEDYDATA:log_message}", + "post_map_values":{ + "logtime":{ + "map_date":{ + "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS" + } + } + } + } + ] +} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_ats_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_ats_jaas.conf.j2 old mode 100644 new mode 100755 index 55308e839ed..fdebe402f1d --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_ats_jaas.conf.j2 +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_ats_jaas.conf.j2 @@ -15,6 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. #} + +Client { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab=true + storeKey=true + useTicketCache=false + keyTab="{{yarn_timelineservice_keytab}}" + principal="{{yarn_timelineservice_principal_name}}"; +}; com.sun.security.jgss.krb5.initiate { com.sun.security.auth.module.Krb5LoginModule required renewTGT=false diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_grant_permissions.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_grant_permissions.j2 new file mode 100755 index 00000000000..e464cf8ce8b --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_grant_permissions.j2 @@ -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. +#} + +# +# 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. +# +# +grant '{{yarn_user}}', '{{yarn_user_hbase_permissions}}' +exit \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_master_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_master_jaas.conf.j2 new file mode 100755 index 00000000000..5a92102bafd --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_master_jaas.conf.j2 @@ -0,0 +1,36 @@ +{# +# 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. +#} + +Client { +com.sun.security.auth.module.Krb5LoginModule required +useKeyTab=true +storeKey=true +useTicketCache=false +keyTab="{{yarn_hbase_master_keytab}}" +principal="{{yarn_hbase_master_principal_name}}"; +}; +com.sun.security.jgss.krb5.initiate { +com.sun.security.auth.module.Krb5LoginModule required +renewTGT=false +doNotPrompt=true +useKeyTab=true +storeKey=true +useTicketCache=false +keyTab="{{yarn_hbase_master_keytab}}" +principal="{{yarn_hbase_master_principal_name}}"; +}; diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_package_preparation.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_package_preparation.j2 new file mode 100755 index 00000000000..007c239e082 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_package_preparation.j2 @@ -0,0 +1,76 @@ +{# +# 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. +#} + +# +# 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. +# +# + +echo "`date` Running hbase package creation script" +ambari_agent_tmp_dir="{{tmp_dir}}" +yarn_hbase_user="{{yarn_hbase_user}}" +yarn_hbase_user_tmp="{{yarn_hbase_user_tmp}}" +version_home="{{stack_root}}/{{version}}/usr/lib" +if [ ! -d $yarn_hbase_user_tmp ] +then + echo "Creating a tmp path $yarn_hbase_user_tmp"; + mkdir -p $yarn_hbase_user_tmp; + cd $ambari_agent_tmp_dir; + chmod -R 0755 $yarn_hbase_user; +fi; + +cd $yarn_hbase_user_tmp +if [ -f hbase.tar.gz ] +then + echo "`date` hbase.tar.gz package exist in path $yarn_hbase_user_tmp." + echo "`date` File status: `ls -l hbase.tar.gz`" + echo "`date` Exitting from script.." + exit +fi; + +cp -rf $version_home/hbase . +rm -rf hbase/conf +rm -rf hbase/logs +rm -rf hbase/pids +rm -rf hbase/lib/zookeeper*.jar +cp -rf $version_home/zookeeper/zookeeper-*.jar hbase/lib +cp -rf $version_home/hadoop/mapreduce.tar.gz . +tar -xzf mapreduce.tar.gz +rm -rf mapreduce.tar.gz +tar -czf hbase.tar.gz hbase hadoop && echo "`date` HBase package created in path $yarn_hbase_user_tmp" +chmod 644 hbase.tar.gz && echo "`date` hbase.tar.gz has set with ugo=644" +rm -rf hbase +rm -rf hadoop +echo "`date` File status: `ls -l $yarn_hbase_user_tmp/hbase.tar.gz`" +echo "`date` Exitting from script.." +exit \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_regionserver_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_regionserver_jaas.conf.j2 new file mode 100755 index 00000000000..0ec41f5b738 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_regionserver_jaas.conf.j2 @@ -0,0 +1,36 @@ +{# +# 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. +#} + +Client { +com.sun.security.auth.module.Krb5LoginModule required +useKeyTab=true +storeKey=true +useTicketCache=false +keyTab="{{yarn_hbase_regionserver_keytab}}" +principal="{{yarn_hbase_regionserver_principal_name}}"; +}; +com.sun.security.jgss.krb5.initiate { +com.sun.security.auth.module.Krb5LoginModule required +renewTGT=false +doNotPrompt=true +useKeyTab=true +storeKey=true +useTicketCache=false +keyTab="{{yarn_hbase_regionserver_keytab}}" +principal="{{yarn_hbase_regionserver_principal_name}}"; +}; diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_secure.yarnfile.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_secure.yarnfile.j2 new file mode 100755 index 00000000000..c4a3fc34adc --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_secure.yarnfile.j2 @@ -0,0 +1,172 @@ +{# +# 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. +#} +{ + "name": "ats-hbase", + "version": "1.0.0", + "lifetime": "-1", + "queue": "{{yarn_hbase_service_queue_name}}", + "artifact": { + "id": "{{yarn_hbase_app_hdfs_path}}/hbase.tar.gz", + "type": "TARBALL" + }, + "configuration": { + "properties" : { + "yarn.service.container-failure.retry.max" : 10, + "yarn.service.framework.path" : "{{yarn_service_app_hdfs_path}}/service-dep.tar.gz" + }, + "env": { + "HBASE_IDENT_STRING": "${USER}", + "HBASE_LOG_DIR": "", + "HBASE_CONF_DIR": "$PWD/conf", + "HBASE_PID_DIR": "$PWD/pids", + "JAVA_HOME": "{{java64_home}}", + "HBASE_ROOT_LOGGER": "{{yarn_hbase_log_level}},RFA", + "SERVER_GC_OPTS": "-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:${HBASE_LOG_DIR}/gc.log-`date +'%Y%m%d%H%M'`", + "HBASE_OPTS": "-XX:+UseConcMarkSweepGC -XX:ErrorFile=${HBASE_LOG_DIR}/hs_err_pid%p.log -Djava.io.tmpdir=/tmp", + "HADOOP_HOME": "$PWD/lib/hadoop", + "HADOOP_YARN_HOME": "$PWD/lib/hadoop", + "HBASE_HOME": "$PWD/lib/hbase" + }, + "files": [ + { + "type": "TEMPLATE", + "dest_file": "log4j.properties", + "src_file": "{{yarn_hbase_user_version_home}}/log4j.properties" + }, + { + "type": "TEMPLATE", + "dest_file": "hbase-site.xml", + "src_file": "{{yarn_hbase_user_version_home}}/hbase-site.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "hbase-policy.xml", + "src_file": "{{yarn_hbase_user_version_home}}/hbase-policy.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "core-site.xml", + "src_file": "{{yarn_hbase_user_version_home}}/core-site.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "hadoop-metrics2-hbase.properties", + "src_file": "{{yarn_hbase_user_version_home}}/hadoop-metrics2-hbase.properties" + } + ] + }, + "components": [ + { + "name": "master", + "number_of_containers": {{yarn_hbase_master_containers}}, + "launch_command": "$HBASE_HOME/bin/hbase master start", + "readiness_check": { + "type": "HTTP", + "properties": { + "url": "http://${THIS_HOST}:{{yarn_hbase_master_info_port}}/master-status" + } + }, + "resource": { + "cpus": {{yarn_hbase_master_cpu}}, + "memory": "{{yarn_hbase_master_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-master-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log", + "HBASE_MASTER_OPTS": "-Xms{{yarn_hbase_master_heapsize}} -Xmx{{yarn_hbase_master_heapsize}} -Djava.security.auth.login.config={{yarn_hbase_master_jaas_file}}" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "master" + ] + } + ] + } + }, + { + "name": "regionserver", + "number_of_containers": {{yarn_hbase_regionserver_containers}}, + "launch_command": "$HBASE_HOME/bin/hbase regionserver start", + "readiness_check": { + "type": "HTTP", + "properties": { + "url": "http://${THIS_HOST}:{{yarn_hbase_regionserver_info_port}}/rs-status" + } + }, + "resource": { + "cpus": {{yarn_hbase_regionserver_cpu}}, + "memory": "{{yarn_hbase_regionserver_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-regionserver-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log", + "HBASE_REGIONSERVER_OPTS": "-XX:CMSInitiatingOccupancyFraction=70 -XX:ReservedCodeCacheSize=256m -Xms{{yarn_hbase_regionserver_heapsize}} -Xmx{{yarn_hbase_regionserver_heapsize}} -Djava.security.auth.login.config={{yarn_hbase_regionserver_jaas_file}}" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "regionserver" + ] + } + ] + } + }, + { + "name": "hbaseclient", + "number_of_containers": {{yarn_hbase_client_containers}}, + "launch_command": "sleep 10;export HBASE_CLASSPATH_PREFIX=$HADOOP_HOME/share/hadoop/yarn/timelineservice/*;{{yarn_hbase_kinit_cmd}} $HBASE_HOME/bin/hbase {{class_name}}; {{yarn_hbase_kinit_cmd}} $HBASE_HOME/bin/hbase shell {{yarn_hbase_grant_premissions_file}};sleep infinity", + "dependencies": [ "master", "regionserver" ], + "resource": { + "cpus": {{yarn_hbase_client_cpu}}, + "memory": "{{yarn_hbase_client_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-hbaseclient-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "hbaseclient" + ] + } + ] + } + } + ], + "kerberos_principal" : { + "principal_name" : "{{yarn_ats_hbase_principal_name}}", + "keytab" : "file://{{yarn_ats_hbase_keytab}}" + } +} \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_unsecure.yarnfile.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_unsecure.yarnfile.j2 new file mode 100755 index 00000000000..1bc41559705 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_hbase_unsecure.yarnfile.j2 @@ -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. +#} +{ + "name": "ats-hbase", + "version": "1.0.0", + "lifetime": "-1", + "queue": "{{yarn_hbase_service_queue_name}}", + "artifact": { + "id": "{{yarn_hbase_app_hdfs_path}}/hbase.tar.gz", + "type": "TARBALL" + }, + "configuration": { + "properties" : { + "yarn.service.container-failure.retry.max" : 10, + "yarn.service.framework.path" : "{{yarn_service_app_hdfs_path}}/service-dep.tar.gz" + }, + "env": { + "HBASE_IDENT_STRING": "${USER}", + "HBASE_LOG_DIR": "", + "HBASE_CONF_DIR": "$PWD/conf", + "HBASE_PID_DIR": "$PWD/pids", + "JAVA_HOME": "{{java64_home}}", + "HBASE_ROOT_LOGGER": "{{yarn_hbase_log_level}},RFA", + "SERVER_GC_OPTS": "-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:${HBASE_LOG_DIR}/gc.log-`date +'%Y%m%d%H%M'`", + "HBASE_OPTS": "-XX:+UseConcMarkSweepGC -XX:ErrorFile=${HBASE_LOG_DIR}/hs_err_pid%p.log -Djava.io.tmpdir=/tmp", + "HADOOP_HOME": "$PWD/lib/hadoop", + "HADOOP_YARN_HOME": "$PWD/lib/hadoop", + "HBASE_HOME": "$PWD/lib/hbase" + }, + "files": [ + { + "type": "TEMPLATE", + "dest_file": "log4j.properties", + "src_file": "{{yarn_hbase_user_version_home}}/log4j.properties" + }, + { + "type": "TEMPLATE", + "dest_file": "hbase-site.xml", + "src_file": "{{yarn_hbase_user_version_home}}/hbase-site.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "hbase-policy.xml", + "src_file": "{{yarn_hbase_user_version_home}}/hbase-policy.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "core-site.xml", + "src_file": "{{yarn_hbase_user_version_home}}/core-site.xml" + }, + { + "type": "TEMPLATE", + "dest_file": "hadoop-metrics2-hbase.properties", + "src_file": "{{yarn_hbase_user_version_home}}/hadoop-metrics2-hbase.properties" + } + ] + }, + "components": [ + { + "name": "master", + "number_of_containers": {{yarn_hbase_master_containers}}, + "launch_command": "$HBASE_HOME/bin/hbase master start", + "readiness_check": { + "type": "HTTP", + "properties": { + "url": "http://${THIS_HOST}:{{yarn_hbase_master_info_port}}/master-status" + } + }, + "resource": { + "cpus": {{yarn_hbase_master_cpu}}, + "memory": "{{yarn_hbase_master_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-master-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log", + "HBASE_MASTER_OPTS": "-Xms{{yarn_hbase_master_heapsize}} -Xmx{{yarn_hbase_master_heapsize}}" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "master" + ] + } + ] + } + }, + { + "name": "regionserver", + "number_of_containers": {{yarn_hbase_regionserver_containers}}, + "launch_command": "$HBASE_HOME/bin/hbase regionserver start", + "readiness_check": { + "type": "HTTP", + "properties": { + "url": "http://${THIS_HOST}:{{yarn_hbase_regionserver_info_port}}/rs-status" + } + }, + "resource": { + "cpus": {{yarn_hbase_regionserver_cpu}}, + "memory": "{{yarn_hbase_regionserver_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-regionserver-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log", + "HBASE_REGIONSERVER_OPTS": "-XX:CMSInitiatingOccupancyFraction=70 -XX:ReservedCodeCacheSize=256m -Xms{{yarn_hbase_regionserver_heapsize}} -Xmx{{yarn_hbase_regionserver_heapsize}}" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "regionserver" + ] + } + ] + } + }, + { + "name": "hbaseclient", + "number_of_containers": {{yarn_hbase_client_containers}}, + "launch_command": "sleep 10;export HBASE_CLASSPATH_PREFIX=$HADOOP_HOME/share/hadoop/yarn/timelineservice/*;$HBASE_HOME/bin/hbase {{class_name}};sleep infinity", + "dependencies": [ "master", "regionserver" ], + "resource": { + "cpus": {{yarn_hbase_client_cpu}}, + "memory": "{{yarn_hbase_client_memory}}" + }, + "configuration": { + "env": { + "HBASE_LOG_PREFIX": "hbase-$HBASE_IDENT_STRING-hbaseclient-$HOSTNAME", + "HBASE_LOGFILE": "$HBASE_LOG_PREFIX.log" + } + }, + "placement_policy": { + "constraints": [ + { + "type": "ANTI_AFFINITY", + "scope": "node", + "target_tags": [ + "hbaseclient" + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_nm_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_nm_jaas.conf.j2 index b501c824153..0a51afdf571 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_nm_jaas.conf.j2 +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_nm_jaas.conf.j2 @@ -15,6 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. #} + +Client { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab=true + storeKey=true + useTicketCache=false + keyTab="{{nodemanager_keytab}}" + principal="{{nodemanager_principal_name}}"; +}; com.sun.security.jgss.krb5.initiate { com.sun.security.auth.module.Krb5LoginModule required renewTGT=false diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_registry_dns_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_registry_dns_jaas.conf.j2 new file mode 100755 index 00000000000..bec53cb0e5c --- /dev/null +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/templates/yarn_registry_dns_jaas.conf.j2 @@ -0,0 +1,37 @@ +{# +# 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. +#} + +Client { + com.sun.security.auth.module.Krb5LoginModule required + doNotPrompt=true + useKeyTab=true + storeKey=true + useTicketCache=false + keyTab="{{yarn_registry_dns_keytab}}" + principal="{{yarn_registry_dns_principal_name}}"; +}; +com.sun.security.jgss.krb5.initiate { + com.sun.security.auth.module.Krb5LoginModule required + renewTGT=false + doNotPrompt=true + useKeyTab=true + keyTab="{{yarn_registry_dns_keytab}}" + principal="{{yarn_registry_dns_principal_name}}" + storeKey=true + useTicketCache=false; +}; diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/properties/container-executor.cfg.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/properties/container-executor.cfg.j2 index c6f1ff676d7..42e7d58c8be 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/properties/container-executor.cfg.j2 +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/properties/container-executor.cfg.j2 @@ -38,3 +38,22 @@ yarn.nodemanager.log-dirs={{nm_log_dirs}} yarn.nodemanager.linux-container-executor.group={{yarn_executor_container_group}} banned.users=hdfs,yarn,mapred,bin min.user.id={{min_user_id}} + +{{ '[docker]' }} + module.enabled={{docker_module_enabled}} + docker.binary={{docker_binary}} + docker.allowed.capabilities={{docker_allowed_capabilities}} + docker.allowed.devices={{docker_allowed_devices}} + docker.allowed.networks={{docker_allowed_networks}} + docker.allowed.ro-mounts={{nm_local_dirs}},{{docker_allowed_ro_mounts}} + docker.allowed.rw-mounts={{nm_local_dirs}},{{nm_log_dirs}},{{docker_allowed_rw_mounts}} + docker.privileged-containers.enabled={{docker_privileged_containers_enabled}} + docker.trusted.registries={{docker_trusted_registries}} + docker.allowed.volume-drivers={{docker_allowed_volume_drivers}} + +{{ '[gpu]' }} + module.enabled={{gpu_module_enabled}} + +{{ '[cgroups]' }} + root={{cgroup_root}} + yarn-hierarchy={{yarn_hierarchy}} \ No newline at end of file diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/quicklinks/quicklinks.json index ced93852875..9b25fa56fdd 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/quicklinks/quicklinks.json @@ -20,7 +20,7 @@ "label": "ResourceManager UI", "requires_user_name": "false", "component_name": "RESOURCEMANAGER", - "url": "%@://%@:%@", + "url": "%@://%@:%@/ui2", "port":{ "http_property": "yarn.resourcemanager.webapp.address", "http_default_port": "8088", diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/role_command_order.json index 9ab3b4828d8..af5451046e8 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/role_command_order.json @@ -11,8 +11,8 @@ "HISTORYSERVER-START": ["NAMENODE-START", "DATANODE-START"], "HISTORYSERVER-RESTART": ["NAMENODE-RESTART"], "YARN_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"], - "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"] - + "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"], + "TIMELINE_READER-START": ["ZOOKEEPER_SERVER-START", "NAMENODE-START", "DATANODE-START","HBASE_REGIONSERVER-START"] }, "_comment" : "Dependencies that are used in ResourceManager HA cluster", "resourcemanager_optional_ha" : { From d7afab0c599d8e2307b6d7c872f236943948bc76 Mon Sep 17 00:00:00 2001 From: Will Guo Date: Sat, 7 Sep 2024 17:54:20 +0800 Subject: [PATCH 22/23] AMBARI-26130: Add mysql8 support for hive in Ambari (#3823) * Add mysql8 support for hive in Ambari --------- Co-authored-by: guow34 --- .../BIGTOP/3.2.0/services/HIVE/package/scripts/params.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py index 2b752d47a86..13f95f3fd58 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py @@ -228,6 +228,9 @@ elif hive_jdbc_driver == "com.mysql.jdbc.Driver": jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None) hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mysql_jdbc_name", None) +elif hive_jdbc_driver == "com.mysql.cj.jdbc.Driver": + jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None) + hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mysql_jdbc_name", None) elif hive_jdbc_driver == "org.postgresql.Driver": jdbc_jar_name = default("/ambariLevelParams/custom_postgres_jdbc_name", None) hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_postgres_jdbc_name", None) From 2e4cbb3e3cb5c1d0069ce227d577acadd0ad8b95 Mon Sep 17 00:00:00 2001 From: timyuer Date: Sat, 7 Sep 2024 17:55:23 +0800 Subject: [PATCH 23/23] AMBARI-26126: Add openEuler-22.03 support (#3822) --- .../main/python/ambari_commons/resources/os_family.json | 9 +++++++++ .../common-services/AMBARI_INFRA_SOLR/3.0.0/metainfo.xml | 2 +- .../common-services/AMBARI_METRICS/3.0.0/metainfo.xml | 2 +- .../resources/stacks/BIGTOP/3.2.0/repos/repoinfo.xml | 7 +++++++ .../stacks/BIGTOP/3.2.0/services/FLINK/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/HIVE/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/KAFKA/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/KERBEROS/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/SOLR/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/SPARK/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/TEZ/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml | 4 ++-- .../stacks/BIGTOP/3.2.0/services/ZEPPELIN/metainfo.xml | 2 +- .../stacks/BIGTOP/3.2.0/services/ZOOKEEPER/metainfo.xml | 2 +- .../resources/stacks/BIGTOP/3.3.0/repos/repoinfo.xml | 9 ++++++++- .../stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml | 2 +- .../stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml | 2 +- ambari-server/src/main/resources/version_definition.xsd | 1 + 21 files changed, 43 insertions(+), 19 deletions(-) diff --git a/ambari-common/src/main/python/ambari_commons/resources/os_family.json b/ambari-common/src/main/python/ambari_commons/resources/os_family.json index 2409e2cbc52..6c83ca570ca 100644 --- a/ambari-common/src/main/python/ambari_commons/resources/os_family.json +++ b/ambari-common/src/main/python/ambari_commons/resources/os_family.json @@ -33,6 +33,15 @@ 7 ] }, + "openeuler": { + "extends" : "redhat", + "distro": [ + "openeuler" + ], + "versions": [ + 22 + ] + }, "amazonlinux": { "extends" : "redhat", "distro": [ diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/metainfo.xml index df7d4a02faa..d615712707c 100755 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/metainfo.xml @@ -146,7 +146,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 ambari-infra-solr-client diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/metainfo.xml index 4f0c3eed1c2..06a8e0716d6 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/metainfo.xml @@ -143,7 +143,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 ambari-metrics-collector diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/repos/repoinfo.xml index f172172ec72..f2a127beff1 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/repos/repoinfo.xml @@ -30,4 +30,11 @@ bigtop + + + https://bigtop-snapshot.s3.amazonaws.com/openeuler-22/$basearch + BIGTOP-3.2.0 + bigtop + + diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/metainfo.xml index 798d3f061f2..88536c613e0 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/metainfo.xml @@ -105,7 +105,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 flink_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml index 45a6f3af0d8..a74df17bf00 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/metainfo.xml @@ -167,7 +167,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 hbase_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml index fb70b2a6d14..172a0f031bc 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml @@ -330,7 +330,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 hadoop_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/metainfo.xml index 7730115812d..7d1aaef17e4 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/metainfo.xml @@ -281,7 +281,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 hive_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/metainfo.xml index 4a8e097d2d4..d3031c78564 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/metainfo.xml @@ -94,7 +94,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 kafka_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/metainfo.xml index 3155a030ac2..9a3c015a26e 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/metainfo.xml @@ -81,7 +81,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 krb5-workstation diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml index fece912b2cf..ff8359afd67 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml @@ -97,7 +97,7 @@ - redhat7 + redhat7,openeuler22 spark_${stack_version}-core diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/metainfo.xml index 57750d3937d..4ea46644c9f 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/metainfo.xml @@ -64,7 +64,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 solr_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/metainfo.xml index 3c829f78118..d5ca3f0c6a2 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/metainfo.xml @@ -204,7 +204,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 spark_${stack_version}-core diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/metainfo.xml index dc0ce87ff4b..764e2ce3b10 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/metainfo.xml @@ -75,7 +75,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 tez_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml index cbfadc20281..a3ab15cd724 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/metainfo.xml @@ -226,7 +226,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 hadoop_${stack_version}-yarn @@ -379,7 +379,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 hadoop_${stack_version}-mapreduce diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/metainfo.xml index 761f3574fe8..81e6b7def27 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/metainfo.xml @@ -65,7 +65,7 @@ limitations under the License. - redhat7,redhat8 + redhat7,redhat8,openeuler22 zeppelin_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/metainfo.xml index d86cad0801a..aff74b2e684 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/metainfo.xml @@ -72,7 +72,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 zookeeper_${stack_version} diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/repos/repoinfo.xml index ef5da7f4b45..db01d3c142e 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/repos/repoinfo.xml @@ -26,7 +26,14 @@ https://bigtop-snapshot.s3.amazonaws.com/centos-8/$basearch - BIGTOP-3.2.0 + BIGTOP-3.3.0 + bigtop + + + + + https://bigtop-snapshot.s3.amazonaws.com/openeuler-22/$basearch + BIGTOP-3.3.0 bigtop diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml index c72573937d8..2743a244e63 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml @@ -144,7 +144,7 @@ - redhat7,redhat8 + redhat7,redhat8,openeuler22 ranger_${stack_version}-admin diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml index a60548a8d38..492723ab9e5 100755 --- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml @@ -60,7 +60,7 @@ - redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12 + redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12,openeuler22 ranger_${stack_version}-kms diff --git a/ambari-server/src/main/resources/version_definition.xsd b/ambari-server/src/main/resources/version_definition.xsd index dcca5cd15e6..50261d99d39 100644 --- a/ambari-server/src/main/resources/version_definition.xsd +++ b/ambari-server/src/main/resources/version_definition.xsd @@ -66,6 +66,7 @@ +