[3/5] ambari git commit: AMBARI-18922 Agent Auto Restart Doesn't Release Ping Port (dsen)
AMBARI-18922 Agent Auto Restart Doesn't Release Ping Port (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d46461a3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d46461a3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d46461a3 Branch: refs/heads/branch-2.5 Commit: d46461a308762f29c789d044873b685643fc63bc Parents: f8ccb47 Author: Dmytro Sen Authored: Mon Nov 21 12:01:31 2016 +0200 Committer: Toader, Sebastian Committed: Wed Jan 18 09:41:55 2017 +0100 -- .../src/main/python/ambari_agent/AmbariAgent.py | 19 +-- .../ambari_agent/StatusCommandsExecutor.py | 4 +++- .../test/python/ambari_agent/TestAmbariAgent.py | 7 ++- 3 files changed, 22 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d46461a3/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py index d701e49..28b9528 100644 --- a/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py +++ b/ambari-agent/src/main/python/ambari_agent/AmbariAgent.py @@ -21,6 +21,7 @@ limitations under the License. import os import sys import subprocess +import signal from Controller import AGENT_AUTO_RESTART_EXIT_CODE if os.environ.has_key("PYTHON_BIN"): @@ -48,12 +49,18 @@ def main(): mergedArgs = [PYTHON, AGENT_SCRIPT] + args - while status == AGENT_AUTO_RESTART_EXIT_CODE: -mainProcess = subprocess.Popen(mergedArgs) -mainProcess.communicate() -status = mainProcess.returncode -if os.path.isfile(AGENT_PID_FILE) and status == AGENT_AUTO_RESTART_EXIT_CODE: - os.remove(AGENT_PID_FILE) + # Become a parent for all subprocesses + os.setpgrp() + + try: +while status == AGENT_AUTO_RESTART_EXIT_CODE: + mainProcess = subprocess.Popen(mergedArgs) + mainProcess.communicate() + status = mainProcess.returncode + if os.path.isfile(AGENT_PID_FILE) and status == AGENT_AUTO_RESTART_EXIT_CODE: +os.remove(AGENT_PID_FILE) + finally: +os.killpg(0, signal.SIGKILL) if __name__ == "__main__": main() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/d46461a3/ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py b/ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py index 5d3607a..fbb29f4 100644 --- a/ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/StatusCommandsExecutor.py @@ -24,6 +24,7 @@ import logging import multiprocessing from ambari_agent.PythonReflectiveExecutor import PythonReflectiveExecutor from ambari_agent.RemoteDebugUtils import bind_debug_signal_handlers +from ambari_agent.ExitHelper import ExitHelper logger = logging.getLogger(__name__) @@ -41,6 +42,7 @@ class StatusCommandsExecutor(multiprocessing.Process): self.status_command_timeout = int(self.config.get('agent', 'status_command_timeout', 5)) # in seconds self.hasTimeoutedEvent = multiprocessing.Event() +ExitHelper().register(self.kill) def run(self): try: @@ -88,4 +90,4 @@ class StatusCommandsExecutor(multiprocessing.Process): # prevent queue from ending up with non-freed semaphores, locks during put. Which would result in dead-lock in process executing get. self.actionQueue.statusCommandResultQueue.close() self.actionQueue.statusCommandResultQueue.join_thread() -self.actionQueue.statusCommandResultQueue = multiprocessing.Queue() \ No newline at end of file +self.actionQueue.statusCommandResultQueue = multiprocessing.Queue() http://git-wip-us.apache.org/repos/asf/ambari/blob/d46461a3/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py index 1be487c..8ff192a 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py +++ b/ambari-agent/src/test/python/ambari_agent/TestAmbariAgent.py @@ -34,7 +34,10 @@ class TestAmbariAgent(unittest.TestCase): @patch.object(subprocess, "Popen") @patch("os.path.isfile") @patch("os.remove") - def test_main(self, os_remove_mock, os_path_isfile_mock, subprocess_popen_mock): + @patch("os.killpg") + @patch("os.setpgrp") + def test_main(self, os_setpgrp_mock, os_killpg_mock, os_remove_mock, +os_path_isfile_mock, subprocess_p
[5/5] ambari git commit: AMBARI-19520. Ambari agents not recovering from heart beat lost state immediately after successful re-registering with server. (stoader)
AMBARI-19520. Ambari agents not recovering from heart beat lost state immediately after successful re-registering with server. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b512b26a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b512b26a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b512b26a Branch: refs/heads/branch-2.5 Commit: b512b26ae48c92df0b8d884c08f5f07cf9a2875b Parents: 36f7422 Author: Toader, Sebastian Authored: Mon Jan 16 13:43:01 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 18 09:41:56 2017 +0100 -- .../src/main/python/ambari_agent/Controller.py | 63 ++-- .../src/main/python/ambari_agent/main.py| 18 +++--- 2 files changed, 53 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b512b26a/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 2244d30..09ab1e6 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -86,6 +86,10 @@ class Controller(threading.Thread): self.max_reconnect_retry_delay = int(config.get('server','max_reconnect_retry_delay', default=30)) self.hasMappedComponents = True self.statusCommandsExecutor = None + +# this lock is used control which thread spawns/kills the StatusCommandExecutor child process +self.spawnKillStatusCommandExecutorLock = threading.RLock() + # Event is used for synchronizing heartbeat iterations (to make possible # manual wait() interruption between heartbeats ) self.heartbeat_stop_callback = heartbeat_stop_callback @@ -199,11 +203,9 @@ class Controller(threading.Thread): self.config.update_configuration_from_registration(ret) logger.debug("Updated config:" + str(self.config)) -if self.statusCommandsExecutor is None: - self.spawnStatusCommandsExecutorProcess() -elif self.statusCommandsExecutor.is_alive(): - logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") - self.killStatusCommandsExecutorProcess() +# Start StatusCommandExecutor child process or restart it if already running +# in order to receive up to date agent config. +self.spawnStatusCommandsExecutorProcess() if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") @@ -458,22 +460,43 @@ class Controller(threading.Thread): self.DEBUG_STOP_HEARTBEATING=True def spawnStatusCommandsExecutorProcess(self): -# Re-create the status command queue as in case the consumer -# process is killed the queue may deadlock (see http://bugs.python.org/issue20527). -# The queue must be re-created by the producer process. -if self.actionQueue.statusCommandQueue is not None: - self.actionQueue.statusCommandQueue.close() - self.actionQueue.statusCommandQueue.join_thread() - -self.actionQueue.statusCommandQueue = multiprocessing.Queue() - -self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) -self.statusCommandsExecutor.start() +''' +Starts a new StatusCommandExecutor child process. In case there is a running instance + already restarts it by simply killing it and starting new one. + This function is thread-safe. +''' +with self.getSpawnKillStatusCommandExecutorLock(): + # if there is already an instance of StatusCommandExecutor kill it first + self.killStatusCommandsExecutorProcess() + + # Re-create the status command queue as in case the consumer + # process is killed the queue may deadlock (see http://bugs.python.org/issue20527). + # The queue must be re-created by the producer process. + statusCommandQueue = self.actionQueue.statusCommandQueue + self.actionQueue.statusCommandQueue = multiprocessing.Queue() + + if statusCommandQueue is not None: +statusCommandQueue.close() + + logger.info("Spawning statusCommandsExecutor") + self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) + self.statusCommandsExecutor.start() def killStatusCommandsExecutorProcess(self): -self.statusCommandsExecutor.kill() - - +''' +Kills the StatusExecutorChild process if exists. This function is thread-safe. +''' +with self.getSpawnKillStatusCommandExecutorLock()
[4/5] ambari git commit: AMBARI-19416. Ambari agents remain in heartbeat lost state after ambari server restart. (stoader)
AMBARI-19416. Ambari agents remain in heartbeat lost state after ambari server restart. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/36f74224 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/36f74224 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/36f74224 Branch: refs/heads/branch-2.5 Commit: 36f742246530af98913051bb27dcd3b20368e474 Parents: b5d3e07 Author: Toader, Sebastian Authored: Mon Jan 9 13:18:53 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 18 09:41:55 2017 +0100 -- .../src/main/python/ambari_agent/ActionQueue.py| 5 - .../src/main/python/ambari_agent/Controller.py | 17 - ambari-agent/src/main/python/ambari_agent/main.py | 5 +++-- .../src/test/python/ambari_agent/TestHeartbeat.py | 2 ++ .../src/test/python/ambari_agent/TestMain.py | 4 +++- 5 files changed, 28 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/36f74224/ambari-agent/src/main/python/ambari_agent/ActionQueue.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index 3726286..18d7c2a 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -75,7 +75,10 @@ class ActionQueue(threading.Thread): def __init__(self, config, controller): super(ActionQueue, self).__init__() self.commandQueue = Queue.Queue() -self.statusCommandQueue = multiprocessing.Queue() +self.statusCommandQueue = None # the queue this field points to is re-created whenever + # a new StatusCommandExecutor child process is spawned + # by Controller +# multiprocessing.Queue() self.statusCommandResultQueue = multiprocessing.Queue() # this queue is filled by StatuCommandsExecutor. self.backgroundCommandQueue = Queue.Queue() self.commandStatuses = CommandStatusDict(callback_action = http://git-wip-us.apache.org/repos/asf/ambari/blob/36f74224/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 11b98f4..2244d30 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -18,6 +18,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' +import multiprocessing import logging import ambari_simplejson as json import sys @@ -202,7 +203,7 @@ class Controller(threading.Thread): self.spawnStatusCommandsExecutorProcess() elif self.statusCommandsExecutor.is_alive(): logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") - self.statusCommandsExecutor.kill() + self.killStatusCommandsExecutorProcess() if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") @@ -457,9 +458,23 @@ class Controller(threading.Thread): self.DEBUG_STOP_HEARTBEATING=True def spawnStatusCommandsExecutorProcess(self): +# Re-create the status command queue as in case the consumer +# process is killed the queue may deadlock (see http://bugs.python.org/issue20527). +# The queue must be re-created by the producer process. +if self.actionQueue.statusCommandQueue is not None: + self.actionQueue.statusCommandQueue.close() + self.actionQueue.statusCommandQueue.join_thread() + +self.actionQueue.statusCommandQueue = multiprocessing.Queue() + self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) self.statusCommandsExecutor.start() + def killStatusCommandsExecutorProcess(self): +self.statusCommandsExecutor.kill() + + + def getStatusCommandsExecutor(self): return self.statusCommandsExecutor http://git-wip-us.apache.org/repos/asf/ambari/blob/36f74224/ambari-agent/src/main/python/ambari_agent/main.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index 968b828..2e1124e 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -294,11 +294,12 @@ def run_threads(server_hostname, heartbeat_stop_callback): if controller.get
[2/5] ambari git commit: AMBARI-19392. Status command executor may use obsolete settings. (stoader)
AMBARI-19392. Status command executor may use obsolete settings. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5d3e072 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5d3e072 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5d3e072 Branch: refs/heads/branch-2.5 Commit: b5d3e072fe44fb3ceb124b769310d8bb75e9c88a Parents: d46461a Author: Toader, Sebastian Authored: Fri Jan 6 23:45:31 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 18 09:41:55 2017 +0100 -- .../src/main/python/ambari_agent/ActionQueue.py | 14 +++--- .../src/main/python/ambari_agent/Controller.py| 7 ++- 2 files changed, 17 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b5d3e072/ambari-agent/src/main/python/ambari_agent/ActionQueue.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index aeae954..3726286 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -98,9 +98,17 @@ class ActionQueue(threading.Thread): return self._stop.isSet() def put_status(self, commands): -#Clear all status commands. Was supposed that we got all set of statuses, we don't need to keep old ones -while not self.statusCommandQueue.empty(): - self.statusCommandQueue.get() +if not self.statusCommandQueue.empty(): + #Clear all status commands. Was supposed that we got all set of statuses, we don't need to keep old ones + statusCommandQueueSize = 0 + try: +while not self.statusCommandQueue.empty(): + self.statusCommandQueue.get(False) + statusCommandQueueSize = statusCommandQueueSize + 1 + except Queue.Empty: +pass + + logger.info("Number of status commands removed from queue : " + str(statusCommandQueueSize)) for command in commands: logger.info("Adding " + command['commandType'] + " for component " + \ http://git-wip-us.apache.org/repos/asf/ambari/blob/b5d3e072/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index f6296d8..11b98f4 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -198,6 +198,12 @@ class Controller(threading.Thread): self.config.update_configuration_from_registration(ret) logger.debug("Updated config:" + str(self.config)) +if self.statusCommandsExecutor is None: + self.spawnStatusCommandsExecutorProcess() +elif self.statusCommandsExecutor.is_alive(): + logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") + self.statusCommandsExecutor.kill() + if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") self.addToStatusQueue(ret['statusCommands']) @@ -461,7 +467,6 @@ class Controller(threading.Thread): try: self.actionQueue = ActionQueue(self.config, controller=self) self.actionQueue.start() - self.spawnStatusCommandsExecutorProcess() self.register = Register(self.config) self.heartbeat = Heartbeat(self.actionQueue, self.config, self.alert_scheduler_handler.collector())
[1/5] ambari git commit: AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 40aeeb9c0 -> b512b26ae AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8ccb478 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8ccb478 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8ccb478 Branch: refs/heads/branch-2.5 Commit: f8ccb478902438c2d1bd43f182c8a7bd935b1088 Parents: 40aeeb9 Author: Andrew Onishuk Authored: Tue Nov 8 11:32:46 2016 +0200 Committer: Toader, Sebastian Committed: Wed Jan 18 09:41:54 2017 +0100 -- ambari-agent/conf/unix/ambari-agent.ini | 1 + .../src/main/python/ambari_agent/ActionQueue.py | 41 - .../src/main/python/ambari_agent/Controller.py | 10 +++ .../ambari_agent/PythonReflectiveExecutor.py| 20 +++-- .../ambari_agent/StatusCommandsExecutor.py | 91 .../src/main/python/ambari_agent/main.py| 21 - .../test/python/ambari_agent/TestActionQueue.py | 76 .../test/python/ambari_agent/TestController.py | 1 + .../src/test/python/ambari_agent/TestMain.py| 3 +- 9 files changed, 175 insertions(+), 89 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f8ccb478/ambari-agent/conf/unix/ambari-agent.ini -- diff --git a/ambari-agent/conf/unix/ambari-agent.ini b/ambari-agent/conf/unix/ambari-agent.ini index f2c8846..56fa605 100644 --- a/ambari-agent/conf/unix/ambari-agent.ini +++ b/ambari-agent/conf/unix/ambari-agent.ini @@ -35,6 +35,7 @@ tolerate_download_failures=true run_as_user=root parallel_execution=0 alert_grace_period=5 +status_command_timeout=5 alert_kinit_timeout=1440 system_resource_overrides=/etc/resource_overrides ; memory_threshold_soft_mb=400 http://git-wip-us.apache.org/repos/asf/ambari/blob/f8ccb478/ambari-agent/src/main/python/ambari_agent/ActionQueue.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index a9567c4..aeae954 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -18,6 +18,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' import Queue +import multiprocessing import logging import traceback @@ -74,7 +75,8 @@ class ActionQueue(threading.Thread): def __init__(self, config, controller): super(ActionQueue, self).__init__() self.commandQueue = Queue.Queue() -self.statusCommandQueue = Queue.Queue() +self.statusCommandQueue = multiprocessing.Queue() +self.statusCommandResultQueue = multiprocessing.Queue() # this queue is filled by StatuCommandsExecutor. self.backgroundCommandQueue = Queue.Queue() self.commandStatuses = CommandStatusDict(callback_action = self.status_update_callback) @@ -96,13 +98,9 @@ class ActionQueue(threading.Thread): return self._stop.isSet() def put_status(self, commands): -if not self.statusCommandQueue.empty(): - #Clear all status commands. Was supposed that we got all set of statuses, we don't need to keep old ones - statusCommandQueueSize = 0 - while not self.statusCommandQueue.empty(): -self.statusCommandQueue.get() -statusCommandQueueSize = statusCommandQueueSize + 1 - logger.info("Number of status commands removed from queue : " + str(statusCommandQueueSize)) +#Clear all status commands. Was supposed that we got all set of statuses, we don't need to keep old ones +while not self.statusCommandQueue.empty(): + self.statusCommandQueue.get() for command in commands: logger.info("Adding " + command['commandType'] + " for component " + \ @@ -158,7 +156,7 @@ class ActionQueue(threading.Thread): try: while not self.stopped(): self.processBackgroundQueueSafeEmpty(); -self.processStatusCommandQueueSafeEmpty(); +self.processStatusCommandResultQueueSafeEmpty(); try: if self.parallel_execution == 0: command = self.commandQueue.get(True, self.EXECUTION_COMMAND_WAIT_TIME) @@ -202,14 +200,19 @@ class ActionQueue(threading.Thread): except Queue.Empty: pass - def processStatusCommandQueueSafeEmpty(self): -while not self.statusCommandQueue.empty(): + def processStatusCommandResultQueueSafeEmpty(self): +while not self.statusCommandResultQueue.empty(): try: -command = self.statusCommandQueue.get(False) -self.process_command(command) +result = self.sta
ambari git commit: AMBARI-19568. Setup the correct authentication and authorization between ZooKeeper and oozie. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 552c418bc -> f51bb21a9 AMBARI-19568. Setup the correct authentication and authorization between ZooKeeper and oozie. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f51bb21a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f51bb21a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f51bb21a Branch: refs/heads/branch-2.5 Commit: f51bb21a992540181bec8cf603aaad47664fc28d Parents: 552c418 Author: Attila Magyar Authored: Tue Jan 17 09:21:43 2017 +0100 Committer: Toader, Sebastian Committed: Tue Jan 17 09:21:43 2017 +0100 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 6 + .../4.0.0.2.0/package/scripts/oozie_server.py | 11 +++-- .../4.0.0.2.0/package/scripts/params_linux.py | 12 ++--- .../package/templates/zkmigrator_jaas.conf.j2 | 26 .../OOZIE/4.2.0.2.3/kerberos.json | 3 ++- .../HDP/2.0.6/properties/stack_features.json| 3 +-- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 13 +++--- 7 files changed, 61 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f51bb21a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index 8f993b8..027d45a 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -353,6 +353,12 @@ def oozie_server_specific(): group = params.user_group, recursive_ownership = True, ) + if params.security_enabled: +File(os.path.join(params.conf_dir, 'zkmigrator_jaas.conf'), + owner=params.oozie_user, + group=params.user_group, + content=Template("zkmigrator_jaas.conf.j2") + ) def __parse_sharelib_from_output(output): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/f51bb21a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py index 31faa06..1e4eeff 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py @@ -42,7 +42,7 @@ from oozie_service import oozie_service from oozie_server_upgrade import OozieUpgrade from check_oozie_server_status import check_oozie_server_status - +from resource_management.core.resources.zkmigrator import ZkMigrator class OozieServer(Script): @@ -193,7 +193,14 @@ class OozieServerDefault(OozieServer): stack_select.select("oozie-server", params.version) OozieUpgrade.prepare_libext_directory() - + + def disable_security(self, env): +import params +if not params.zk_connection_string: + return +zkmigrator = ZkMigrator(params.zk_connection_string, params.java_exec, params.java64_home, params.jaas_file, params.oozie_user) +zkmigrator.set_acls(params.zk_namespace if params.zk_namespace.startswith('/') else '/' + params.zk_namespace, 'world:anyone:crdwa') + def get_log_folder(self): import params return params.oozie_log_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/f51bb21a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index d3444f5..005bcc7 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -136,6 +136,8 @@ oozie_pid_dir = status_params.oozie_pid_dir pid_file = status_params.pid_file hadoop_jar_location = "/usr/lib/hadoop/" java_share_dir = "/usr/share/java" +java64_home = config['hostLevelParams'][&
ambari git commit: AMBARI-19568. Setup the correct authentication and authorization between ZooKeeper and oozie. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 285666fac -> aae7013f4 AMBARI-19568. Setup the correct authentication and authorization between ZooKeeper and oozie. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aae7013f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aae7013f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aae7013f Branch: refs/heads/trunk Commit: aae7013f48983b093b31897997c9e725d8110f16 Parents: 285666f Author: Attila Magyar Authored: Tue Jan 17 09:18:15 2017 +0100 Committer: Toader, Sebastian Committed: Tue Jan 17 09:18:15 2017 +0100 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie.py| 6 + .../4.0.0.2.0/package/scripts/oozie_server.py | 11 +++-- .../4.0.0.2.0/package/scripts/params_linux.py | 12 ++--- .../package/templates/zkmigrator_jaas.conf.j2 | 26 .../OOZIE/4.2.0.2.3/kerberos.json | 3 ++- .../HDP/2.0.6/properties/stack_features.json| 3 +-- .../HDP/3.0/properties/stack_features.json | 3 +-- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 13 +++--- .../HDF/2.0/properties/stack_features.json | 3 +-- 9 files changed, 63 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aae7013f/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py index 252f60e..3cdafe9 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py @@ -353,6 +353,12 @@ def oozie_server_specific(): group = params.user_group, recursive_ownership = True, ) + if params.security_enabled: +File(os.path.join(params.conf_dir, 'zkmigrator_jaas.conf'), + owner=params.oozie_user, + group=params.user_group, + content=Template("zkmigrator_jaas.conf.j2") + ) def __parse_sharelib_from_output(output): """ http://git-wip-us.apache.org/repos/asf/ambari/blob/aae7013f/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py index e0778da..1a34b87 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py @@ -42,7 +42,7 @@ from oozie_service import oozie_service from oozie_server_upgrade import OozieUpgrade from check_oozie_server_status import check_oozie_server_status - +from resource_management.core.resources.zkmigrator import ZkMigrator class OozieServer(Script): @@ -193,7 +193,14 @@ class OozieServerDefault(OozieServer): stack_select.select("oozie-server", params.version) OozieUpgrade.prepare_libext_directory() - + + def disable_security(self, env): +import params +if not params.zk_connection_string: + return +zkmigrator = ZkMigrator(params.zk_connection_string, params.java_exec, params.java64_home, params.jaas_file, params.oozie_user) +zkmigrator.set_acls(params.zk_namespace if params.zk_namespace.startswith('/') else '/' + params.zk_namespace, 'world:anyone:crdwa') + def get_log_folder(self): import params return params.oozie_log_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/aae7013f/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index f9c608e..48c8ef0 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -138,6 +138,8 @@ oozie_pid_dir = status_params.oozie_pid_dir pid_file = status_params.pid_file hadoop_jar_location = "/usr/lib/
ambari git commit: AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3e03102de -> 98fdbba5d AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98fdbba5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98fdbba5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98fdbba5 Branch: refs/heads/branch-2.5 Commit: 98fdbba5d8c2ae0953bd722ca218a1d91dce2925 Parents: 3e03102 Author: Toader, Sebastian Authored: Mon Jan 16 17:56:58 2017 +0100 Committer: Toader, Sebastian Committed: Mon Jan 16 17:56:58 2017 +0100 -- .../HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py | 14 +- .../services/HDFS/package/scripts/hdfs_namenode.py| 3 ++- .../test/python/stacks/2.0.6/HDFS/test_namenode.py| 4 3 files changed, 15 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/98fdbba5/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py index cc03bb3..a2edf38 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py @@ -254,7 +254,7 @@ def namenode(action=None, hdfs_binary=None, do_format=True, upgrade_type=None, namenode_format_marker = os.path.join(params.hadoop_conf_dir,"NN_FORMATTED") if not os.path.exists(namenode_format_marker): hadoop_cmd = "cmd /C %s" % (os.path.join(params.hadoop_home, "bin", "hadoop.cmd")) - Execute("%s namenode -format" % (hadoop_cmd)) + Execute("%s namenode -format" % (hadoop_cmd), logoutput=True) open(namenode_format_marker, 'a').close() Service(params.namenode_win_service_name, action=action) elif action == "stop": @@ -311,12 +311,14 @@ def format_namenode(force=None): if force: ExecuteHadoop('namenode -format', bin_dir=params.hadoop_bin_dir, -conf_dir=hadoop_conf_dir) +conf_dir=hadoop_conf_dir, +logoutput=True) else: if not is_namenode_formatted(params): Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"), user = params.hdfs_user, -path = [params.hadoop_bin_dir] +path = [params.hadoop_bin_dir], +logoutput=True ) for m_dir in mark_dir: Directory(m_dir, @@ -330,14 +332,16 @@ def format_namenode(force=None): if force: ExecuteHadoop('namenode -format', bin_dir=params.hadoop_bin_dir, - conf_dir=hadoop_conf_dir) + conf_dir=hadoop_conf_dir, + logoutput=True) else: nn_name_dirs = params.dfs_name_dir.split(',') if not is_namenode_formatted(params): try: Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"), user = params.hdfs_user, -path = [params.hadoop_bin_dir] +path = [params.hadoop_bin_dir], +logoutput=True ) except Fail: # We need to clean-up mark directories, so we can re-run format next time. http://git-wip-us.apache.org/repos/asf/ambari/blob/98fdbba5/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py -- diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py index 35e16d5..6de7735 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py @@ -112,7 +112,8 @@ def format_namenode(force=None): ExecuteHadoop('namenode -format', kinit_override=True, bin_dir=params.hadoop_bin_dir, -conf_dir=hadoop_conf_dir) +conf_dir=hadoop_conf_dir, +
ambari git commit: AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 69f0b6d7f -> 0baa96439 AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0baa9643 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0baa9643 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0baa9643 Branch: refs/heads/trunk Commit: 0baa964398b0246e4fc2cb3f8c2d13640d6f5f66 Parents: 69f0b6d Author: Toader, Sebastian Authored: Mon Jan 16 17:52:54 2017 +0100 Committer: Toader, Sebastian Committed: Mon Jan 16 17:52:54 2017 +0100 -- .../HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py | 14 +- .../HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py | 14 +- .../services/HDFS/package/scripts/hdfs_namenode.py| 3 ++- .../test/python/stacks/2.0.6/HDFS/test_namenode.py| 4 4 files changed, 24 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0baa9643/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py index cc03bb3..a2edf38 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py @@ -254,7 +254,7 @@ def namenode(action=None, hdfs_binary=None, do_format=True, upgrade_type=None, namenode_format_marker = os.path.join(params.hadoop_conf_dir,"NN_FORMATTED") if not os.path.exists(namenode_format_marker): hadoop_cmd = "cmd /C %s" % (os.path.join(params.hadoop_home, "bin", "hadoop.cmd")) - Execute("%s namenode -format" % (hadoop_cmd)) + Execute("%s namenode -format" % (hadoop_cmd), logoutput=True) open(namenode_format_marker, 'a').close() Service(params.namenode_win_service_name, action=action) elif action == "stop": @@ -311,12 +311,14 @@ def format_namenode(force=None): if force: ExecuteHadoop('namenode -format', bin_dir=params.hadoop_bin_dir, -conf_dir=hadoop_conf_dir) +conf_dir=hadoop_conf_dir, +logoutput=True) else: if not is_namenode_formatted(params): Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"), user = params.hdfs_user, -path = [params.hadoop_bin_dir] +path = [params.hadoop_bin_dir], +logoutput=True ) for m_dir in mark_dir: Directory(m_dir, @@ -330,14 +332,16 @@ def format_namenode(force=None): if force: ExecuteHadoop('namenode -format', bin_dir=params.hadoop_bin_dir, - conf_dir=hadoop_conf_dir) + conf_dir=hadoop_conf_dir, + logoutput=True) else: nn_name_dirs = params.dfs_name_dir.split(',') if not is_namenode_formatted(params): try: Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"), user = params.hdfs_user, -path = [params.hadoop_bin_dir] +path = [params.hadoop_bin_dir], +logoutput=True ) except Fail: # We need to clean-up mark directories, so we can re-run format next time. http://git-wip-us.apache.org/repos/asf/ambari/blob/0baa9643/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py index 2c0d691..7fae57f 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py +++ b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/hdfs_namenode.py @@ -253,7 +253,7 @@ def namenode(action=None, hdfs_binary=None, do_format=True, upgrade_type=None, namenode_format_marker = os.path.join(params.hadoop_conf_dir,"NN_FORMATTED") if not os.path.exists(namenode_format_marker)
ambari git commit: AMBARI-19520. Ambari agents not recovering from heart beat lost state immediately after successful re-registering with server. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 5f222d9ce -> 816939498 AMBARI-19520. Ambari agents not recovering from heart beat lost state immediately after successful re-registering with server. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81693949 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81693949 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81693949 Branch: refs/heads/trunk Commit: 8169394988ef1a06c2eb1013df46ee14445d49a9 Parents: 5f222d9 Author: Toader, Sebastian Authored: Mon Jan 16 13:43:01 2017 +0100 Committer: Toader, Sebastian Committed: Mon Jan 16 13:43:01 2017 +0100 -- .../src/main/python/ambari_agent/Controller.py | 63 ++-- .../src/main/python/ambari_agent/main.py| 18 +++--- 2 files changed, 53 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81693949/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 6b1b196..d00ffae 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -86,6 +86,10 @@ class Controller(threading.Thread): self.max_reconnect_retry_delay = int(config.get('server','max_reconnect_retry_delay', default=30)) self.hasMappedComponents = True self.statusCommandsExecutor = None + +# this lock is used control which thread spawns/kills the StatusCommandExecutor child process +self.spawnKillStatusCommandExecutorLock = threading.RLock() + # Event is used for synchronizing heartbeat iterations (to make possible # manual wait() interruption between heartbeats ) self.heartbeat_stop_callback = heartbeat_stop_callback @@ -199,11 +203,9 @@ class Controller(threading.Thread): self.config.update_configuration_from_registration(ret) logger.debug("Updated config:" + str(self.config)) -if self.statusCommandsExecutor is None: - self.spawnStatusCommandsExecutorProcess() -elif self.statusCommandsExecutor.is_alive(): - logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") - self.killStatusCommandsExecutorProcess() +# Start StatusCommandExecutor child process or restart it if already running +# in order to receive up to date agent config. +self.spawnStatusCommandsExecutorProcess() if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") @@ -458,22 +460,43 @@ class Controller(threading.Thread): self.DEBUG_STOP_HEARTBEATING=True def spawnStatusCommandsExecutorProcess(self): -# Re-create the status command queue as in case the consumer -# process is killed the queue may deadlock (see http://bugs.python.org/issue20527). -# The queue must be re-created by the producer process. -if self.actionQueue.statusCommandQueue is not None: - self.actionQueue.statusCommandQueue.close() - self.actionQueue.statusCommandQueue.join_thread() - -self.actionQueue.statusCommandQueue = multiprocessing.Queue() - -self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) -self.statusCommandsExecutor.start() +''' +Starts a new StatusCommandExecutor child process. In case there is a running instance + already restarts it by simply killing it and starting new one. + This function is thread-safe. +''' +with self.getSpawnKillStatusCommandExecutorLock(): + # if there is already an instance of StatusCommandExecutor kill it first + self.killStatusCommandsExecutorProcess() + + # Re-create the status command queue as in case the consumer + # process is killed the queue may deadlock (see http://bugs.python.org/issue20527). + # The queue must be re-created by the producer process. + statusCommandQueue = self.actionQueue.statusCommandQueue + self.actionQueue.statusCommandQueue = multiprocessing.Queue() + + if statusCommandQueue is not None: +statusCommandQueue.close() + + logger.info("Spawning statusCommandsExecutor") + self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) + self.statusCommandsExecutor.start() def killStatusCommandsExecutorProcess(self): -self.statusCommandsExecutor.kill() - - +''' +Kills the StatusExecutorChild process if exists. This function is thread-safe.
[2/2] ambari git commit: AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader)
AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fdcdedae Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fdcdedae Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fdcdedae Branch: refs/heads/branch-2.5 Commit: fdcdedae674e9baa618b8cfeba1419d37223a87b Parents: 82e2217 Author: Balazs Bence Sari Authored: Wed Jan 11 21:12:46 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 11 21:15:02 2017 +0100 -- .../controller/AmbariManagementController.java | 7 + .../AmbariManagementControllerImpl.java | 20 ++ .../QuickLinkArtifactResourceProvider.java | 22 ++ .../ambari/server/state/quicklinks/Link.java| 11 + .../DefaultQuickLinkVisibilityController.java | 213 ++ .../QuickLinkVisibilityController.java | 37 .../QuickLinkVisibilityControllerFactory.java | 57 + .../quicklinksprofile/QuickLinksProfile.java| 10 +- .../QuickLinksProfileEvaluationException.java | 31 +++ .../QuickLinksProfileEvaluator.java | 202 - .../QuickLinksProfileEvaluatorException.java| 27 --- .../ShowAllLinksVisibilityController.java | 38 .../QuickLinkArtifactResourceProviderTest.java | 198 + .../state/quicklinksprofile/EvaluatorTest.java | 203 - .../quicklinksprofile/FilterEvaluatorTest.java | 218 +++ ...uickLinkVisibilityControllerFactoryTest.java | 82 +++ .../QuickLinkVisibilityControllerTest.java | 181 +++ .../QuickLinksProfileEvaluatorTest.java | 168 -- .../QuickLinksProfileParserTest.java| 8 +- .../resources/example_quicklinks_profile.json | 9 + .../inconsistent_quicklinks_profile_2.json | 13 ++ 21 files changed, 1150 insertions(+), 605 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fdcdedae/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java index cc20324..91bfe09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java @@ -59,6 +59,7 @@ import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.ServiceOsSpecific; import org.apache.ambari.server.state.State; import org.apache.ambari.server.state.configgroup.ConfigGroupFactory; +import org.apache.ambari.server.state.quicklinksprofile.QuickLinkVisibilityController; import org.apache.ambari.server.state.scheduler.RequestExecutionFactory; /** @@ -912,5 +913,11 @@ public interface AmbariManagementController { */ MetricsCollectorHAManager getMetricsCollectorHAManager(); + /** + * @return the visibility controller that decides which quicklinks should be visible + * based on the actual quick links profile. If no profile is set, all links will be shown. + */ + QuickLinkVisibilityController getQuicklinkVisibilityController(); + } http://git-wip-us.apache.org/repos/asf/ambari/blob/fdcdedae/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index a35d485..444cb85 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -112,6 +112,7 @@ import org.apache.ambari.server.orm.dao.ClusterVersionDAO; import org.apache.ambari.server.orm.dao.ExtensionDAO; import org.apache.ambari.server.orm.dao.ExtensionLinkDAO; import org.apache.ambari.server.orm.dao.RepositoryVersionDAO; +import org.apache.ambari.server.orm.dao.SettingDAO; import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.dao.WidgetDAO; import org.apache.ambari.server.orm.dao.WidgetLayoutDAO; @@ -122,6 +123,7 @@ import org.apache.ambari.server.orm.entities.ExtensionLinkEntity; import org.apache.ambari.server.orm.entities.OperatingSystemEntity; import
[1/2] ambari git commit: AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 82e22171d -> fdcdedae6 http://git-wip-us.apache.org/repos/asf/ambari/blob/fdcdedae/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java index 2bf62d3..eb459bb 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java @@ -37,7 +37,7 @@ public class QuickLinksProfileParserTest { assertEquals( Filter.linkAttributeFilter("sso", true), profile.getFilters().get(0)); -assertEquals(2, profile.getServices().size()); +assertEquals(3, profile.getServices().size()); Service hdfs = profile.getServices().get(0); assertEquals("HDFS", hdfs.getName()); @@ -58,6 +58,12 @@ public class QuickLinksProfileParserTest { assertEquals( Filter.acceptAllFilter(true), historyServer.getFilters().get(0)); + +Service yarn = profile.getServices().get(2); +assertEquals(1, yarn.getFilters().size()); +assertEquals( +Filter.linkNameFilter("resourcemanager_ui", true), +yarn.getFilters().get(0)); } @Test(expected = JsonParseException.class) http://git-wip-us.apache.org/repos/asf/ambari/blob/fdcdedae/ambari-server/src/test/resources/example_quicklinks_profile.json -- diff --git a/ambari-server/src/test/resources/example_quicklinks_profile.json b/ambari-server/src/test/resources/example_quicklinks_profile.json index 2fa33a4..50ea5e8 100644 --- a/ambari-server/src/test/resources/example_quicklinks_profile.json +++ b/ambari-server/src/test/resources/example_quicklinks_profile.json @@ -43,6 +43,15 @@ ] } ] +}, +{ + "name": "YARN", + "filters": [ +{ + "link_name": "resourcemanager_ui", + "visible": true +} + ] } ] } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/fdcdedae/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json -- diff --git a/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json new file mode 100644 index 000..457e01d --- /dev/null +++ b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json @@ -0,0 +1,13 @@ +{ + "filters": [ +{ + "property_name": "sso", + "visible": true +}, +{ + "property_name": "sso", + "visible": false +} + ], + "services": [] +} \ No newline at end of file
[1/2] ambari git commit: AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 6483710a2 -> 2643dd653 http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java index 6f5dd07..57badb8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileParserTest.java @@ -37,7 +37,7 @@ public class QuickLinksProfileParserTest { assertEquals( Filter.linkAttributeFilter("sso", true), profile.getFilters().get(0)); -assertEquals(2, profile.getServices().size()); +assertEquals(3, profile.getServices().size()); Service hdfs = profile.getServices().get(0); assertEquals("HDFS", hdfs.getName()); @@ -58,6 +58,12 @@ public class QuickLinksProfileParserTest { assertEquals( Filter.acceptAllFilter(true), historyServer.getFilters().get(0)); + +Service yarn = profile.getServices().get(2); +assertEquals(1, yarn.getFilters().size()); +assertEquals( +Filter.linkNameFilter("resourcemanager_ui", true), +yarn.getFilters().get(0)); } @Test(expected = JsonParseException.class) http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/resources/example_quicklinks_profile.json -- diff --git a/ambari-server/src/test/resources/example_quicklinks_profile.json b/ambari-server/src/test/resources/example_quicklinks_profile.json index 2fa33a4..50ea5e8 100644 --- a/ambari-server/src/test/resources/example_quicklinks_profile.json +++ b/ambari-server/src/test/resources/example_quicklinks_profile.json @@ -43,6 +43,15 @@ ] } ] +}, +{ + "name": "YARN", + "filters": [ +{ + "link_name": "resourcemanager_ui", + "visible": true +} + ] } ] } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json -- diff --git a/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json new file mode 100644 index 000..457e01d --- /dev/null +++ b/ambari-server/src/test/resources/inconsistent_quicklinks_profile_2.json @@ -0,0 +1,13 @@ +{ + "filters": [ +{ + "property_name": "sso", + "visible": true +}, +{ + "property_name": "sso", + "visible": false +} + ], + "services": [] +} \ No newline at end of file
[2/2] ambari git commit: AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader)
AMBARI-19426. Modify quick link resource provider to consider filters and return visibility. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2643dd65 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2643dd65 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2643dd65 Branch: refs/heads/trunk Commit: 2643dd65348272f69b91160990d6e484289572ba Parents: 6483710 Author: Balazs Bence Sari Authored: Wed Jan 11 21:12:46 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 11 21:13:14 2017 +0100 -- .../controller/AmbariManagementController.java | 7 + .../AmbariManagementControllerImpl.java | 20 ++ .../QuickLinkArtifactResourceProvider.java | 22 ++ .../ambari/server/state/quicklinks/Link.java| 11 + .../DefaultQuickLinkVisibilityController.java | 213 ++ .../QuickLinkVisibilityController.java | 37 .../QuickLinkVisibilityControllerFactory.java | 57 + .../quicklinksprofile/QuickLinksProfile.java| 10 +- .../QuickLinksProfileEvaluationException.java | 31 +++ .../QuickLinksProfileEvaluator.java | 202 - .../QuickLinksProfileEvaluatorException.java| 27 --- .../ShowAllLinksVisibilityController.java | 38 .../QuickLinkArtifactResourceProviderTest.java | 198 + .../state/quicklinksprofile/EvaluatorTest.java | 203 - .../quicklinksprofile/FilterEvaluatorTest.java | 218 +++ ...uickLinkVisibilityControllerFactoryTest.java | 82 +++ .../QuickLinkVisibilityControllerTest.java | 181 +++ .../QuickLinksProfileEvaluatorTest.java | 168 -- .../QuickLinksProfileParserTest.java| 8 +- .../resources/example_quicklinks_profile.json | 9 + .../inconsistent_quicklinks_profile_2.json | 13 ++ 21 files changed, 1150 insertions(+), 605 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java index cc20324..91bfe09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java @@ -59,6 +59,7 @@ import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.ServiceOsSpecific; import org.apache.ambari.server.state.State; import org.apache.ambari.server.state.configgroup.ConfigGroupFactory; +import org.apache.ambari.server.state.quicklinksprofile.QuickLinkVisibilityController; import org.apache.ambari.server.state.scheduler.RequestExecutionFactory; /** @@ -912,5 +913,11 @@ public interface AmbariManagementController { */ MetricsCollectorHAManager getMetricsCollectorHAManager(); + /** + * @return the visibility controller that decides which quicklinks should be visible + * based on the actual quick links profile. If no profile is set, all links will be shown. + */ + QuickLinkVisibilityController getQuicklinkVisibilityController(); + } http://git-wip-us.apache.org/repos/asf/ambari/blob/2643dd65/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 3963a19..5e8c803 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -112,6 +112,7 @@ import org.apache.ambari.server.orm.dao.ClusterVersionDAO; import org.apache.ambari.server.orm.dao.ExtensionDAO; import org.apache.ambari.server.orm.dao.ExtensionLinkDAO; import org.apache.ambari.server.orm.dao.RepositoryVersionDAO; +import org.apache.ambari.server.orm.dao.SettingDAO; import org.apache.ambari.server.orm.dao.StackDAO; import org.apache.ambari.server.orm.dao.WidgetDAO; import org.apache.ambari.server.orm.dao.WidgetLayoutDAO; @@ -122,6 +123,7 @@ import org.apache.ambari.server.orm.entities.ExtensionLinkEntity; import org.apache.ambari.server.orm.entities.OperatingSystemEntity; import
ambari git commit: AMBARI-19462. Setup the correct authentication and authorization between Hive/Hcatalog and ZooKeeper. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 947b7191b -> 82e22171d AMBARI-19462. Setup the correct authentication and authorization between Hive/Hcatalog and ZooKeeper. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82e22171 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82e22171 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82e22171 Branch: refs/heads/branch-2.5 Commit: 82e22171daaa8e8ded880f7bb721131006920ec0 Parents: 947b719 Author: Attila Magyar Authored: Wed Jan 11 20:17:54 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 11 20:18:19 2017 +0100 -- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 23 +++- .../org/apache/ambari/tools/zk/ZkMigrator.java | 2 +- .../apache/ambari/tools/zk/ZkPathPattern.java | 114 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 45 +++- .../core/resources/zkmigrator.py| 2 +- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 7 ++ .../0.12.0.2.0/package/scripts/hive_server.py | 20 .../0.12.0.2.0/package/scripts/params_linux.py | 6 + .../package/templates/zkmigrator_jaas.conf.j2 | 26 + .../stacks/2.0.6/HIVE/test_hive_client.py | 5 + .../stacks/2.0.6/HIVE/test_hive_metastore.py| 7 +- .../stacks/2.0.6/HIVE/test_hive_server.py | 5 + .../stacks/2.1/HIVE/test_hive_metastore.py | 5 + 13 files changed, 257 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/82e22171/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java index 420ab0a..5c66612 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -54,16 +54,27 @@ public class ZkAcl { } /** - * Sets the ACL on the given znode according to my state + * Sets the ACL on the znode indicated by the given pattern */ - public void setRecursivelyOn(ZooKeeper zkClient, String node) throws KeeperException, InterruptedException { -zkClient.setACL(node, singletonList(new ACL(permission.code, new Id(scheme.value, id))), ANY_NODE_VER); -for (String child : zkClient.getChildren(node, null)) { - setRecursivelyOn(zkClient, path(node, child)); + public void setRecursivelyOn(ZooKeeper zkClient, ZkPathPattern pattern) throws KeeperException, InterruptedException { +for (String each : pattern.findMatchingPaths(zkClient, "/")) { + System.out.println("Set ACL " + asZkAcl() + " recursively on " + each); + setRecursivelyOnSingle(zkClient, each); } } - private String path(String node, String child) { + public void setRecursivelyOnSingle(ZooKeeper zkClient, String baseNode) throws KeeperException, InterruptedException { +zkClient.setACL(baseNode, singletonList(asZkAcl()), ANY_NODE_VER); +for (String child : zkClient.getChildren(baseNode, null)) { + setRecursivelyOnSingle(zkClient, append(baseNode, child)); +} + } + + private ACL asZkAcl() { +return new ACL(permission.code, new Id(scheme.value, id)); + } + + public static String append(String node, String child) { return node.endsWith("/") ? node + child : node + "/" + child; } http://git-wip-us.apache.org/repos/asf/ambari/blob/82e22171/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java index b4da1ed..c100b85 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java @@ -73,7 +73,7 @@ public class ZkMigrator { private static void setAcls(String connectionString, String znode, ZkAcl acl) throws IOException, InterruptedException, KeeperException { ZooKeeper client = ZkConnection.open(connectionString, SESSION_TIMEOUT_MILLIS, CONNECTION_TIMEOUT_MILLIS); try { - acl.setRecursivelyOn(client, znode); + acl.setRecursivelyOn(client, ZkPathPattern.fromString(znode)); } catch (KeeperException.NoNodeException e) { System.out.println("Could not set ACL on " + znode + ". Reason: " + e.getMessage()); } finally { http://git-wip-us.apache.org/repos/asf/ambari/blob/82e22171
ambari git commit: AMBARI-19462. Setup the correct authentication and authorization between Hive/Hcatalog and ZooKeeper. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk e41585873 -> 283ede623 AMBARI-19462. Setup the correct authentication and authorization between Hive/Hcatalog and ZooKeeper. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/283ede62 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/283ede62 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/283ede62 Branch: refs/heads/trunk Commit: 283ede623d7e3a6291b21165e996a0cd549bad6f Parents: e415858 Author: Attila Magyar Authored: Wed Jan 11 19:06:01 2017 +0100 Committer: Toader, Sebastian Committed: Wed Jan 11 19:06:20 2017 +0100 -- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 23 +++- .../org/apache/ambari/tools/zk/ZkMigrator.java | 2 +- .../apache/ambari/tools/zk/ZkPathPattern.java | 114 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 45 +++- .../core/resources/zkmigrator.py| 2 +- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 6 + .../0.12.0.2.0/package/scripts/hive_server.py | 20 .../0.12.0.2.0/package/scripts/params_linux.py | 6 + .../package/templates/zkmigrator_jaas.conf.j2 | 26 + .../stacks/2.0.6/HIVE/test_hive_client.py | 5 + .../stacks/2.0.6/HIVE/test_hive_metastore.py| 7 +- .../stacks/2.0.6/HIVE/test_hive_server.py | 5 + .../stacks/2.1/HIVE/test_hive_metastore.py | 5 + 13 files changed, 256 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/283ede62/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java index 420ab0a..5c66612 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -54,16 +54,27 @@ public class ZkAcl { } /** - * Sets the ACL on the given znode according to my state + * Sets the ACL on the znode indicated by the given pattern */ - public void setRecursivelyOn(ZooKeeper zkClient, String node) throws KeeperException, InterruptedException { -zkClient.setACL(node, singletonList(new ACL(permission.code, new Id(scheme.value, id))), ANY_NODE_VER); -for (String child : zkClient.getChildren(node, null)) { - setRecursivelyOn(zkClient, path(node, child)); + public void setRecursivelyOn(ZooKeeper zkClient, ZkPathPattern pattern) throws KeeperException, InterruptedException { +for (String each : pattern.findMatchingPaths(zkClient, "/")) { + System.out.println("Set ACL " + asZkAcl() + " recursively on " + each); + setRecursivelyOnSingle(zkClient, each); } } - private String path(String node, String child) { + public void setRecursivelyOnSingle(ZooKeeper zkClient, String baseNode) throws KeeperException, InterruptedException { +zkClient.setACL(baseNode, singletonList(asZkAcl()), ANY_NODE_VER); +for (String child : zkClient.getChildren(baseNode, null)) { + setRecursivelyOnSingle(zkClient, append(baseNode, child)); +} + } + + private ACL asZkAcl() { +return new ACL(permission.code, new Id(scheme.value, id)); + } + + public static String append(String node, String child) { return node.endsWith("/") ? node + child : node + "/" + child; } http://git-wip-us.apache.org/repos/asf/ambari/blob/283ede62/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java index b4da1ed..c100b85 100644 --- a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java @@ -73,7 +73,7 @@ public class ZkMigrator { private static void setAcls(String connectionString, String znode, ZkAcl acl) throws IOException, InterruptedException, KeeperException { ZooKeeper client = ZkConnection.open(connectionString, SESSION_TIMEOUT_MILLIS, CONNECTION_TIMEOUT_MILLIS); try { - acl.setRecursivelyOn(client, znode); + acl.setRecursivelyOn(client, ZkPathPattern.fromString(znode)); } catch (KeeperException.NoNodeException e) { System.out.println("Could not set ACL on " + znode + ". Reason: " + e.getMessage()); } finally { http://git-wip-us.apache.org/repos/asf/ambari/blob/283ede62
ambari git commit: AMBARI-19416. Ambari agents remain in heartbeat lost state after ambari server restart. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 8fa580614 -> 1535bc982 AMBARI-19416. Ambari agents remain in heartbeat lost state after ambari server restart. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1535bc98 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1535bc98 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1535bc98 Branch: refs/heads/trunk Commit: 1535bc9823d7a9e58d1a3f195949a8c6d43b91d6 Parents: 8fa5806 Author: Toader, Sebastian Authored: Mon Jan 9 13:18:53 2017 +0100 Committer: Toader, Sebastian Committed: Mon Jan 9 13:18:53 2017 +0100 -- .../src/main/python/ambari_agent/ActionQueue.py| 5 - .../src/main/python/ambari_agent/Controller.py | 17 - ambari-agent/src/main/python/ambari_agent/main.py | 5 +++-- .../src/test/python/ambari_agent/TestHeartbeat.py | 2 ++ .../src/test/python/ambari_agent/TestMain.py | 4 +++- 5 files changed, 28 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1535bc98/ambari-agent/src/main/python/ambari_agent/ActionQueue.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index 3726286..18d7c2a 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -75,7 +75,10 @@ class ActionQueue(threading.Thread): def __init__(self, config, controller): super(ActionQueue, self).__init__() self.commandQueue = Queue.Queue() -self.statusCommandQueue = multiprocessing.Queue() +self.statusCommandQueue = None # the queue this field points to is re-created whenever + # a new StatusCommandExecutor child process is spawned + # by Controller +# multiprocessing.Queue() self.statusCommandResultQueue = multiprocessing.Queue() # this queue is filled by StatuCommandsExecutor. self.backgroundCommandQueue = Queue.Queue() self.commandStatuses = CommandStatusDict(callback_action = http://git-wip-us.apache.org/repos/asf/ambari/blob/1535bc98/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index f6bda1e..6b1b196 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -18,6 +18,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' +import multiprocessing import logging import ambari_simplejson as json import sys @@ -202,7 +203,7 @@ class Controller(threading.Thread): self.spawnStatusCommandsExecutorProcess() elif self.statusCommandsExecutor.is_alive(): logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") - self.statusCommandsExecutor.kill() + self.killStatusCommandsExecutorProcess() if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") @@ -457,9 +458,23 @@ class Controller(threading.Thread): self.DEBUG_STOP_HEARTBEATING=True def spawnStatusCommandsExecutorProcess(self): +# Re-create the status command queue as in case the consumer +# process is killed the queue may deadlock (see http://bugs.python.org/issue20527). +# The queue must be re-created by the producer process. +if self.actionQueue.statusCommandQueue is not None: + self.actionQueue.statusCommandQueue.close() + self.actionQueue.statusCommandQueue.join_thread() + +self.actionQueue.statusCommandQueue = multiprocessing.Queue() + self.statusCommandsExecutor = StatusCommandsExecutor(self.config, self.actionQueue) self.statusCommandsExecutor.start() + def killStatusCommandsExecutorProcess(self): +self.statusCommandsExecutor.kill() + + + def getStatusCommandsExecutor(self): return self.statusCommandsExecutor http://git-wip-us.apache.org/repos/asf/ambari/blob/1535bc98/ambari-agent/src/main/python/ambari_agent/main.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index f812226..2e0517b 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -312,11 +312,12 @@ def run_threads(se
ambari git commit: AMBARI-19392. Status command executor may use obsolete settings. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 0909d7cdb -> e7c027c96 AMBARI-19392. Status command executor may use obsolete settings. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7c027c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7c027c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7c027c9 Branch: refs/heads/trunk Commit: e7c027c96d0c319552e68008304777e2642b3f7a Parents: 0909d7c Author: Toader, Sebastian Authored: Fri Jan 6 23:45:31 2017 +0100 Committer: Toader, Sebastian Committed: Fri Jan 6 23:45:31 2017 +0100 -- ambari-agent/src/main/python/ambari_agent/ActionQueue.py | 10 +++--- ambari-agent/src/main/python/ambari_agent/Controller.py | 7 ++- 2 files changed, 13 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7c027c9/ambari-agent/src/main/python/ambari_agent/ActionQueue.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py index d70b344..3726286 100644 --- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py +++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py @@ -101,9 +101,13 @@ class ActionQueue(threading.Thread): if not self.statusCommandQueue.empty(): #Clear all status commands. Was supposed that we got all set of statuses, we don't need to keep old ones statusCommandQueueSize = 0 - while not self.statusCommandQueue.empty(): -self.statusCommandQueue.get() -statusCommandQueueSize = statusCommandQueueSize + 1 + try: +while not self.statusCommandQueue.empty(): + self.statusCommandQueue.get(False) + statusCommandQueueSize = statusCommandQueueSize + 1 + except Queue.Empty: +pass + logger.info("Number of status commands removed from queue : " + str(statusCommandQueueSize)) for command in commands: http://git-wip-us.apache.org/repos/asf/ambari/blob/e7c027c9/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 56b1992..f6bda1e 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -198,6 +198,12 @@ class Controller(threading.Thread): self.config.update_configuration_from_registration(ret) logger.debug("Updated config:" + str(self.config)) +if self.statusCommandsExecutor is None: + self.spawnStatusCommandsExecutorProcess() +elif self.statusCommandsExecutor.is_alive(): + logger.info("Terminating statusCommandsExecutor as agent re-registered with server.") + self.statusCommandsExecutor.kill() + if 'statusCommands' in ret.keys(): logger.debug("Got status commands on registration.") self.addToStatusQueue(ret['statusCommands']) @@ -461,7 +467,6 @@ class Controller(threading.Thread): try: self.actionQueue = ActionQueue(self.config, controller=self) self.actionQueue.start() - self.spawnStatusCommandsExecutorProcess() self.register = Register(self.config) self.heartbeat = Heartbeat(self.actionQueue, self.config, self.alert_scheduler_handler.collector())
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 972b23fe2 -> 050caf012 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/050caf01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/050caf01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/050caf01 Branch: refs/heads/branch-2.5 Commit: 050caf012fffa6101a23ae2c1f18a9c6cc1fd8f7 Parents: 972b23f Author: Balazs Bence Sari Authored: Fri Dec 23 22:15:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 22:16:55 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 203 +++ .../QuickLinksProfileEvaluatorTest.java | 168 +++ .../QuickLinksProfileParserTest.java| 4 +- .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 21 files changed, 841 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f7c14f3..c26eda9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/amb
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 680661193 -> 0a1d7c2a9 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a1d7c2a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a1d7c2a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a1d7c2a Branch: refs/heads/trunk Commit: 0a1d7c2a947a143d94c7338b509809d261625217 Parents: 6806611 Author: Balazs Bence Sari Authored: Fri Dec 23 22:15:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 22:15:18 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 203 +++ .../QuickLinksProfileEvaluatorTest.java | 168 +++ .../QuickLinksProfileParserTest.java| 4 +- .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 21 files changed, 841 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index 72ad764..f589f5d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/amb
ambari git commit: AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c91ad2b37 -> 972b23fe2 AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/972b23fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/972b23fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/972b23fe Branch: refs/heads/branch-2.5 Commit: 972b23fe224fb918608c460cc57c83fbb03298ef Parents: c91ad2b Author: Attila Magyar Authored: Fri Dec 23 20:15:00 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 20:15:00 2016 +0100 -- .../YARN/2.1.0.2.0/kerberos.json| 3 ++- .../2.1.0.2.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 17 ++--- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../stacks/HDP/2.2/services/YARN/kerberos.json | 3 ++- .../HDP/2.3.ECS/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.3/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.5/services/YARN/kerberos.json | 3 ++- .../stacks/2.0.6/YARN/test_historyserver.py | 8 +- .../stacks/2.0.6/YARN/test_mapreduce2_client.py | 8 +- .../stacks/2.0.6/YARN/test_nodemanager.py | 8 +- .../stacks/2.0.6/YARN/test_resourcemanager.py | 8 +- .../stacks/2.0.6/YARN/test_yarn_client.py | 8 +- 14 files changed, 97 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/972b23fe/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json index 4093431..a8379ee 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json @@ -31,7 +31,8 @@ "yarn.resourcemanager.proxyusers.*.hosts": "", "yarn.resourcemanager.proxyusers.*.users": "", "yarn.resourcemanager.proxy-user-privileges.enabled": "true", -"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "" +"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "", +"yarn.resourcemanager.zk-acl" : "sasl:rm:rwcda" } }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/972b23fe/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0496995..aa0c4f5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -171,6 +171,7 @@ rm_nodes_exclude_path = default("/configurations/yarn-site/yarn.resourcemanager. rm_nodes_exclude_dir = os.path.dirname(rm_nodes_exclude_path) java64_home = config['hostLevelParams']['java_home'] +java_exec = format("{java64_home}/bin/java") hadoop_ssl_enabled = default("/configurations/core-site/hadoop.ssl.enabled", False) yarn_heapsize = config['configurations']['yarn-env']['yarn_heapsize'] @@ -244,11 +245,17 @@ rm_kinit_cmd = "" yarn_timelineservice_kinit_cmd = "" nodemanager_kinit_cmd = "" +rm_zk_address = config['configurations']['yarn-site']['yarn.resourcemanager.zk-address'] +rm_zk_znode = config['configurations']['yarn-site']['yarn.resourcemanager.zk-state-store.parent-path'] +rm_zk_store_class = config['configurations']['yarn-site']['yarn.resourcemanager.store.class'] + if security_enabled: rm_principal_name = config['configurations']['yarn-site']['yarn.resourcemanager.principal'] rm_principal_name = rm_principal_name.replace('_HOST',hostname.lower()) rm_keytab = config['configurations']['yarn-site']['yarn.resourcemanager.keytab'] rm_kinit_cmd = format("{kinit_path_local} -
ambari git commit: AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2051d58a8 -> 680661193 AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68066119 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68066119 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68066119 Branch: refs/heads/trunk Commit: 68066119360dd34a9fc5b4bd52e708fbf7f6b081 Parents: 2051d58 Author: Attila Magyar Authored: Fri Dec 23 19:30:29 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 20:11:03 2016 +0100 -- .../YARN/2.1.0.2.0/kerberos.json| 3 ++- .../2.1.0.2.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 17 ++--- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../YARN/3.0.0.3.0/kerberos.json| 3 ++- .../3.0.0.3.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 16 +++- .../YARN/3.0.0.3.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../stacks/HDP/2.2/services/YARN/kerberos.json | 3 ++- .../HDP/2.3.ECS/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.3/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.5/services/YARN/kerberos.json | 3 ++- .../stacks/2.0.6/YARN/test_historyserver.py | 8 +- .../stacks/2.0.6/YARN/test_mapreduce2_client.py | 8 +- .../stacks/2.0.6/YARN/test_nodemanager.py | 8 +- .../stacks/2.0.6/YARN/test_resourcemanager.py | 8 +- .../stacks/2.0.6/YARN/test_yarn_client.py | 8 +- 19 files changed, 152 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/68066119/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json index 4093431..a8379ee 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json @@ -31,7 +31,8 @@ "yarn.resourcemanager.proxyusers.*.hosts": "", "yarn.resourcemanager.proxyusers.*.users": "", "yarn.resourcemanager.proxy-user-privileges.enabled": "true", -"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "" +"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "", +"yarn.resourcemanager.zk-acl" : "sasl:rm:rwcda" } }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/68066119/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 6bf2927..53ea4d6 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -171,6 +171,7 @@ rm_nodes_exclude_path = default("/configurations/yarn-site/yarn.resourcemanager. rm_nodes_exclude_dir = os.path.dirname(rm_nodes_exclude_path) java64_home = config['hostLevelParams']['java_home'] +java_exec = format("{java64_home}/bin/java") hadoop_ssl_enabled = default("/configurations/core-site/hadoop.ssl.enabled", False) yarn_heapsize = config['configurations']['yarn-env']['yarn_heapsize'] @@ -251,11 +252,17 @@ rm_kinit_cmd = "" yarn_timelineservice_kinit_cmd = "" nodemanager_kinit_cmd = "" +rm_zk_address = config['configurations']['yarn-site']['yarn.resourcemanager.zk-address'] +rm_zk_znode = config['configurations']['yarn-site']['yarn.resourcemanager.zk-state-store.parent-path'] +rm_zk_store_class = config['configurations']['yarn-site']['yarn.resourcemanager.store.class'] + if security_enabled: rm_principal_name = config['configurations']['y
ambari git commit: AMBARI-18442. Python UT fail on trunk (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 003cebcc8 -> c91ad2b37 AMBARI-18442. Python UT fail on trunk (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c91ad2b3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c91ad2b3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c91ad2b3 Branch: refs/heads/branch-2.5 Commit: c91ad2b37351696d6553a75a29f9480d9c658087 Parents: 003cebc Author: Andrew Onishuk Authored: Thu Sep 22 13:56:14 2016 +0300 Committer: Toader, Sebastian Committed: Fri Dec 23 19:06:23 2016 +0100 -- .../src/test/python/stacks/2.3/ATLAS/test_service_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c91ad2b3/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py index b9dd736..43ce520 100644 --- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py +++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py @@ -34,7 +34,7 @@ class TestAtlasCheck(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Execute', 'curl -s -o /dev/null -w "%{http_code}" http://c6401.ambari.apache.org:21000/', +self.assertResourceCalled('Execute', 'curl -k -s -o /dev/null -w "%{http_code}" http://c6401.ambari.apache.org:21000/', user = 'ambari-qa', tries = 5, try_sleep = 10) @@ -54,7 +54,7 @@ class TestAtlasCheck(RMFTestCase): '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com', user = 'ambari-qa') -self.assertResourceCalled('Execute', 'curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{http_code}" https://c6401.ambari.apache.org:21443/', +self.assertResourceCalled('Execute', 'curl -k --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{http_code}" https://c6401.ambari.apache.org:21443/', user = 'ambari-qa', tries = 5, try_sleep = 10)
ambari git commit: Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/trunk 2f2c9cc58 -> 163fa4c9c Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)" This reverts commit 83f3b6fb0fb98bc99e74b0d1f2c55e5229c697ac. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/163fa4c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/163fa4c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/163fa4c9 Branch: refs/heads/trunk Commit: 163fa4c9c2e076ca16bf1a6f05d5e695af86b7d0 Parents: 2f2c9cc Author: Toader, Sebastian Authored: Fri Dec 23 16:14:12 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:14:12 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 - .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 -- .../state/quicklinksprofile/PropertyFilter.java | 60 ++ .../quicklinksprofile/QuickLinksProfile.java| 7 - .../QuickLinksProfileEvaluator.java | 202 -- .../QuickLinksProfileEvaluatorException.java| 27 --- .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 - .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 --- .../QuickLinksProfileEvaluatorTest.java | 167 --- .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 + .../dummy_stack/HIVE/package/.hash | 1 + .../child_quicklinks_with_attributes.json | 64 -- .../child_quicklinks_with_properties.json | 64 ++ .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 -- .../parent_quicklinks_with_properties.json | 65 ++ 23 files changed, 220 insertions(+), 841 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/163fa4c9/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f589f5d..72ad764 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("attributes") - private List attributes; + @JsonProperty("properties") + private List properties; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getAttributes() { -return attributes; + public List getProperties() { +return properties; } - public void setAttributes(List attributes) { -this.attributes = attributes; + public void setProperties(List properties) { +this.properties = properties; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == attributes && null != parentLink.attributes) { - attributes = parentLink.attributes; +if (null == properties && null != parentLink.properties) { + properties = parentLink.properties; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/163fa4c9/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index d784a22..5124241 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more speci
ambari git commit: Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 a12f05487 -> 0878b7e5f Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)" This reverts commit 8c79bd168aaad4cc185e258ee29513bb4f9def74. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0878b7e5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0878b7e5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0878b7e5 Branch: refs/heads/branch-2.5 Commit: 0878b7e5faf44a60564d8c694a7f80b6e5f541f3 Parents: a12f054 Author: Toader, Sebastian Authored: Fri Dec 23 16:11:38 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:11:38 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 - .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 -- .../state/quicklinksprofile/PropertyFilter.java | 60 ++ .../quicklinksprofile/QuickLinksProfile.java| 7 - .../QuickLinksProfileEvaluator.java | 202 -- .../QuickLinksProfileEvaluatorException.java| 27 --- .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 - .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 --- .../QuickLinksProfileEvaluatorTest.java | 167 --- .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 + .../dummy_stack/HIVE/package/.hash | 1 + .../child_quicklinks_with_attributes.json | 64 -- .../child_quicklinks_with_properties.json | 64 ++ .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 -- .../parent_quicklinks_with_properties.json | 65 ++ 23 files changed, 220 insertions(+), 841 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0878b7e5/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index c26eda9..f7c14f3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("attributes") - private List attributes; + @JsonProperty("properties") + private List properties; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getAttributes() { -return attributes; + public List getProperties() { +return properties; } - public void setAttributes(List attributes) { -this.attributes = attributes; + public void setProperties(List properties) { +this.properties = properties; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == attributes && null != parentLink.attributes) { - attributes = parentLink.attributes; +if (null == properties && null != parentLink.properties) { + properties = parentLink.properties; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0878b7e5/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index d784a22..5124241 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters han
ambari git commit: AMBARI-19187. Disable security hook. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 899d1eaa5 -> a12f05487 AMBARI-19187. Disable security hook. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a12f0548 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a12f0548 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a12f0548 Branch: refs/heads/branch-2.5 Commit: a12f05487993e2fcd9be1211af3df579cd9b1fab Parents: 899d1ea Author: Attila Magyar Authored: Fri Dec 23 16:10:09 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:10:37 2016 +0100 -- ambari-agent/pom.xml| 64 +++- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 107 + .../apache/ambari/tools/zk/ZkConnection.java| 53 +++ .../org/apache/ambari/tools/zk/ZkMigrator.java | 86 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 154 +++ .../core/resources/zkmigrator.py| 44 ++ .../libraries/script/script.py | 6 + ambari-server/pom.xml | 1 + .../server/controller/KerberosHelperImpl.java | 81 ++ .../ambari/server/metadata/ActionMetadata.java | 1 + .../server/controller/KerberosHelperTest.java | 23 ++- .../main/admin/kerberos/disable_controller.js | 10 +- ambari-web/app/messages.js | 10 +- 13 files changed, 628 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a12f0548/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 96e342c..510f6f6 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -25,7 +25,6 @@ 4.0.0 org.apache.ambari ambari-agent - pom 2.5.0.0.0 Ambari Agent Ambari Agent @@ -52,6 +51,41 @@ ${target.cache.dir}/custom_actions src/packages/tarball + + + org.apache.zookeeper + zookeeper + 3.4.9 + + + commons-cli + commons-cli + 1.3.1 + + + org.apache.curator + curator-test + 2.9.0 + test + + + org.apache.curator + curator-framework + 2.7.1 + test + + + utility + utility + test + 1.0.0.0-SNAPSHOT + + + junit + junit + test + + @@ -84,12 +118,39 @@ maven-compiler-plugin 3.0 + + 1.7 + 1.7 + + + +org.apache.maven.plugins +maven-shade-plugin +2.3 + + +package + + shade + + + + + org.apache.ambari.tools.zk.ZkMigrator + + + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/lib/ambari-agent/tools/zkmigrator.jar + + + org.apache.maven.plugins maven-surefire-plugin ${skipSurefireTests} + + ${testcase.groups} @@ -462,6 +523,7 @@ **/*.json **/*.pydevproject src/main/package/choco/ambari-agent.nuspec +**/dependency-reduced-pom.xml http://git-wip-us.apache.org/repos/asf/ambari/blob/a12f0548/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java new file mode 100644 index 000..420ab0a --- /dev/null +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -0,0 +1,107 @@ +/** + * 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. + */ + +package org.apache.ambari.too
ambari git commit: AMBARI-19187. Disable security hook. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2f311bedd -> 2f2c9cc58 AMBARI-19187. Disable security hook. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f2c9cc5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f2c9cc5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f2c9cc5 Branch: refs/heads/trunk Commit: 2f2c9cc588fca9522a159902d3e7db560877ff98 Parents: 2f311be Author: Attila Magyar Authored: Fri Dec 23 16:03:31 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:03:51 2016 +0100 -- ambari-agent/pom.xml| 64 +++- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 107 + .../apache/ambari/tools/zk/ZkConnection.java| 53 +++ .../org/apache/ambari/tools/zk/ZkMigrator.java | 86 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 154 +++ .../core/resources/zkmigrator.py| 44 ++ .../libraries/script/script.py | 6 + ambari-server/pom.xml | 1 + .../server/controller/KerberosHelperImpl.java | 81 ++ .../ambari/server/metadata/ActionMetadata.java | 1 + .../server/controller/KerberosHelperTest.java | 23 ++- .../main/admin/kerberos/disable_controller.js | 10 +- ambari-web/app/messages.js | 10 +- 13 files changed, 628 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2c9cc5/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index a8ed7f1..35fba19 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -25,7 +25,6 @@ 4.0.0 org.apache.ambari ambari-agent - pom 2.0.0.0-SNAPSHOT Ambari Agent Ambari Agent @@ -52,6 +51,41 @@ ${target.cache.dir}/custom_actions src/packages/tarball + + + org.apache.zookeeper + zookeeper + 3.4.9 + + + commons-cli + commons-cli + 1.3.1 + + + org.apache.curator + curator-test + 2.9.0 + test + + + org.apache.curator + curator-framework + 2.7.1 + test + + + utility + utility + test + 1.0.0.0-SNAPSHOT + + + junit + junit + test + + @@ -84,12 +118,39 @@ maven-compiler-plugin 3.0 + + 1.7 + 1.7 + + + +org.apache.maven.plugins +maven-shade-plugin +2.3 + + +package + + shade + + + + + org.apache.ambari.tools.zk.ZkMigrator + + + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/lib/ambari-agent/tools/zkmigrator.jar + + + org.apache.maven.plugins maven-surefire-plugin ${skipSurefireTests} + + ${testcase.groups} @@ -462,6 +523,7 @@ **/*.json **/*.pydevproject src/main/package/choco/ambari-agent.nuspec +**/dependency-reduced-pom.xml http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2c9cc5/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java new file mode 100644 index 000..420ab0a --- /dev/null +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -0,0 +1,107 @@ +/** + * 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. + */ + +package org.apache.ambari.too
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 e1ce1dfe7 -> 8c79bd168 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c79bd16 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c79bd16 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c79bd16 Branch: refs/heads/branch-2.5 Commit: 8c79bd168aaad4cc185e258ee29513bb4f9def74 Parents: e1ce1df Author: Balazs Bence Sari Authored: Fri Dec 23 13:27:56 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:28:52 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 +++ .../QuickLinksProfileEvaluatorTest.java | 167 +++ .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 - .../dummy_stack/HIVE/package/.hash | 1 - .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 23 files changed, 841 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c79bd16/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f7c14f3..c26eda9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/8c79bd16/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { h
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 564b8f775 -> 83f3b6fb0 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83f3b6fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83f3b6fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83f3b6fb Branch: refs/heads/trunk Commit: 83f3b6fb0fb98bc99e74b0d1f2c55e5229c697ac Parents: 564b8f7 Author: Balazs Bence Sari Authored: Fri Dec 23 13:27:56 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:27:56 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 +++ .../QuickLinksProfileEvaluatorTest.java | 167 +++ .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 - .../dummy_stack/HIVE/package/.hash | 1 - .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 23 files changed, 841 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/83f3b6fb/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index 72ad764..f589f5d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/83f3b6fb/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us
ambari git commit: AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 cf708d65d -> e1ce1dfe7 AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1ce1dfe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1ce1dfe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1ce1dfe Branch: refs/heads/branch-2.5 Commit: e1ce1dfe7bae68c9d17b84af835f33c452df7abc Parents: cf708d6 Author: Attila Doroszlai Authored: Fri Dec 23 13:16:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:18:28 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/FileCache.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1ce1dfe/ambari-agent/src/main/python/ambari_agent/FileCache.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/FileCache.py b/ambari-agent/src/main/python/ambari_agent/FileCache.py index a9ea8f6..0cd629b 100644 --- a/ambari-agent/src/main/python/ambari_agent/FileCache.py +++ b/ambari-agent/src/main/python/ambari_agent/FileCache.py @@ -167,6 +167,7 @@ class FileCache(): self.invalidate_directory(full_path) self.unpack_archive(membuffer, full_path) self.write_hash_sum(full_path, remote_hash) +logger.info("Updated directory {0}".format(full_path)) else: logger.warn("Skipping empty archive: {0}. " "Expected archive was not found. Cached copy will be used.".format(download_url))
ambari git commit: AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 47a988245 -> 564b8f775 AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/564b8f77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/564b8f77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/564b8f77 Branch: refs/heads/trunk Commit: 564b8f775959670259693c064b6d9025aec40760 Parents: 47a9882 Author: Attila Doroszlai Authored: Fri Dec 23 13:16:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:16:18 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/FileCache.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/564b8f77/ambari-agent/src/main/python/ambari_agent/FileCache.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/FileCache.py b/ambari-agent/src/main/python/ambari_agent/FileCache.py index a9ea8f6..0cd629b 100644 --- a/ambari-agent/src/main/python/ambari_agent/FileCache.py +++ b/ambari-agent/src/main/python/ambari_agent/FileCache.py @@ -167,6 +167,7 @@ class FileCache(): self.invalidate_directory(full_path) self.unpack_archive(membuffer, full_path) self.write_hash_sum(full_path, remote_hash) +logger.info("Updated directory {0}".format(full_path)) else: logger.warn("Skipping empty archive: {0}. " "Expected archive was not found. Cached copy will be used.".format(download_url))
ambari git commit: AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk f77ba790c -> 2f123f0ae AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f123f0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f123f0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f123f0a Branch: refs/heads/trunk Commit: 2f123f0ae969fc7304f04fc1f07abc3ff2498db2 Parents: f77ba79 Author: Attila Doroszlai Authored: Fri Dec 23 09:27:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 09:28:26 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f123f0a/ambari-agent/src/main/python/ambari_agent/Hardware.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0d431a3..2233b0a 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -163,9 +163,9 @@ class Hardware: else: ignored_mounts.append(mount) - if len(ignored_mounts) > 0: -ignore_list = [el["mountpoint"] for el in ignored_mounts] -logger.info("Some mount points was ignored: {0}".format(', '.join(ignore_list))) +if len(ignored_mounts) > 0: + ignore_list = [el["mountpoint"] for el in ignored_mounts] + logger.info("Some mount points were ignored: {0}".format(', '.join(ignore_list))) return result_mounts
ambari git commit: AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 238bbe58d -> c27fab37d AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c27fab37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c27fab37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c27fab37 Branch: refs/heads/branch-2.5 Commit: c27fab37d8f0b65dfc3047043c144f34c379f749 Parents: 238bbe5 Author: Attila Doroszlai Authored: Fri Dec 23 09:27:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 09:27:07 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c27fab37/ambari-agent/src/main/python/ambari_agent/Hardware.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0d431a3..2233b0a 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -163,9 +163,9 @@ class Hardware: else: ignored_mounts.append(mount) - if len(ignored_mounts) > 0: -ignore_list = [el["mountpoint"] for el in ignored_mounts] -logger.info("Some mount points was ignored: {0}".format(', '.join(ignore_list))) +if len(ignored_mounts) > 0: + ignore_list = [el["mountpoint"] for el in ignored_mounts] + logger.info("Some mount points were ignored: {0}".format(', '.join(ignore_list))) return result_mounts
ambari git commit: AMBARI-19278. Typo in the PostgreSQL database name for druid service. (Slim Bouguerra via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 0dd6356a6 -> 532673b04 AMBARI-19278. Typo in the PostgreSQL database name for druid service. (Slim Bouguerra via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/532673b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/532673b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/532673b0 Branch: refs/heads/branch-2.5 Commit: 532673b04e030bd09401a7097d1e6a9ba2165fd2 Parents: 0dd6356 Author: Slim Bouguerra Authored: Thu Dec 22 17:37:20 2016 +0100 Committer: Toader, Sebastian Committed: Thu Dec 22 18:28:47 2016 +0100 -- .../common-services/DRUID/0.9.2/configuration/druid-common.xml | 4 ++-- .../src/main/resources/stacks/HDP/2.6/services/stack_advisor.py | 4 ++-- .../src/test/python/stacks/2.6/common/test_stack_advisor.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/532673b0/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml index 39ede45..0ded5d6 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml +++ b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml @@ -154,8 +154,8 @@ DERBY - postgres - POSTGRES + postgresql + POSTGRESQL http://git-wip-us.apache.org/repos/asf/ambari/blob/532673b0/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py index ee56899..c9c590d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py @@ -84,7 +84,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor): metadata_storage_port = "3306" extensions_load_list = self.addToList(extensions_load_list, mysql_module_name) - if database_type == 'postgres': + if database_type == 'postgresql': extensions_load_list = self.addToList(extensions_load_list, postgres_module_name) metadata_storage_port = "5432" @@ -127,7 +127,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor): driverDict = { 'mysql': 'jdbc:mysql://{0}:{2}/{1}?createDatabaseIfNotExist=true', 'derby': 'jdbc:derby://{0}:{2}/{1};create=true', - 'postgres': 'jdbc:postgresql://{0}:{2}/{1}' + 'postgresql': 'jdbc:postgresql://{0}:{2}/{1}' } return driverDict.get(database_type.lower()) http://git-wip-us.apache.org/repos/asf/ambari/blob/532673b0/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py index c06bebb..de0b00f 100644 --- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py @@ -279,7 +279,7 @@ class TestHDP26StackAdvisor(TestCase): "properties": { "database_name": "druid", "metastore_hostname": "c6401.ambari.apache.org", -"druid.metadata.storage.type": "postgres", +"druid.metadata.storage.type": "postgresql", "druid.extensions.loadList": "[\"mysql-metadata-storage\"]", "druid.extensions.pullList": "[]" }
ambari git commit: AMBARI-19278. Typo in the PostgreSQL database name for druid service. (Slim Bouguerra via stoader)
Repository: ambari Updated Branches: refs/heads/trunk bc1b7ab8c -> c695e50a7 AMBARI-19278. Typo in the PostgreSQL database name for druid service. (Slim Bouguerra via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c695e50a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c695e50a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c695e50a Branch: refs/heads/trunk Commit: c695e50a71eb6afa2f4fbc4ed2ee65da8f276aed Parents: bc1b7ab Author: Slim Bouguerra Authored: Thu Dec 22 17:37:20 2016 +0100 Committer: Toader, Sebastian Committed: Thu Dec 22 18:26:55 2016 +0100 -- .../common-services/DRUID/0.9.2/configuration/druid-common.xml | 4 ++-- .../src/main/resources/stacks/HDP/2.6/services/stack_advisor.py | 4 ++-- .../src/test/python/stacks/2.6/common/test_stack_advisor.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c695e50a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml -- diff --git a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml index 39ede45..0ded5d6 100644 --- a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml +++ b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-common.xml @@ -154,8 +154,8 @@ DERBY - postgres - POSTGRES + postgresql + POSTGRESQL http://git-wip-us.apache.org/repos/asf/ambari/blob/c695e50a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py index ee56899..c9c590d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py @@ -84,7 +84,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor): metadata_storage_port = "3306" extensions_load_list = self.addToList(extensions_load_list, mysql_module_name) - if database_type == 'postgres': + if database_type == 'postgresql': extensions_load_list = self.addToList(extensions_load_list, postgres_module_name) metadata_storage_port = "5432" @@ -127,7 +127,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor): driverDict = { 'mysql': 'jdbc:mysql://{0}:{2}/{1}?createDatabaseIfNotExist=true', 'derby': 'jdbc:derby://{0}:{2}/{1};create=true', - 'postgres': 'jdbc:postgresql://{0}:{2}/{1}' + 'postgresql': 'jdbc:postgresql://{0}:{2}/{1}' } return driverDict.get(database_type.lower()) http://git-wip-us.apache.org/repos/asf/ambari/blob/c695e50a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py index c06bebb..de0b00f 100644 --- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py @@ -279,7 +279,7 @@ class TestHDP26StackAdvisor(TestCase): "properties": { "database_name": "druid", "metastore_hostname": "c6401.ambari.apache.org", -"druid.metadata.storage.type": "postgres", +"druid.metadata.storage.type": "postgresql", "druid.extensions.loadList": "[\"mysql-metadata-storage\"]", "druid.extensions.pullList": "[]" }
ambari git commit: AMBARI-18428. Atlas service check never fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 66cb2f3bd -> e675c63bc AMBARI-18428. Atlas service check never fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e675c63b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e675c63b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e675c63b Branch: refs/heads/branch-2.5 Commit: e675c63bc9adbc6fc2cf961aa24fac4254543f29 Parents: 66cb2f3 Author: Andrew Onishuk Authored: Thu Sep 22 11:23:11 2016 +0300 Committer: Toader, Sebastian Committed: Thu Dec 22 11:05:36 2016 +0100 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py| 4 ++-- .../ATLAS/0.1.0.2.3/package/scripts/service_check.py | 8 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e675c63b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 2ce480c..ebfc3e6 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -185,9 +185,9 @@ smokeuser_keytab = config['configurations']['cluster-env']['smokeuser_keytab'] security_check_status_file = format('{log_dir}/security_check.status') if security_enabled: -smoke_cmd = format('curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') +smoke_cmd = format('curl -k --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') else: -smoke_cmd = format('curl -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') +smoke_cmd = format('curl -k -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') # hbase hbase_conf_dir = "/etc/hbase/conf" http://git-wip-us.apache.org/repos/asf/ambari/blob/e675c63b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/service_check.py index 61b3ac0..8cb4f04 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/service_check.py @@ -32,12 +32,8 @@ class AtlasServiceCheck(Script): Execute(format("{kinit_path_local} -kt {smokeuser_keytab} {smokeuser_principal}"), user=params.smoke_test_user) -try: - Execute(params.smoke_cmd, user=params.smoke_test_user, tries = 5, - try_sleep = 10) - Logger.info('Atlas server up and running') -except: - Logger.debug('Atlas server not running') +Execute(params.smoke_cmd, user=params.smoke_test_user, tries = 5, +try_sleep = 10) if __name__ == "__main__":
ambari git commit: AMBARI-19266. Command line support for setting configuration options to support Kerberos token authentication. (Laszlo Puskas via stoader)
Repository: ambari Updated Branches: refs/heads/trunk ae1438007 -> 52d7b7ef6 AMBARI-19266. Command line support for setting configuration options to support Kerberos token authentication. (Laszlo Puskas via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52d7b7ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52d7b7ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52d7b7ef Branch: refs/heads/trunk Commit: 52d7b7ef624b8866428f0b0b5f3f8f5157193350 Parents: ae14380 Author: Laszlo Puskas Authored: Wed Dec 21 20:28:28 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 21 20:30:42 2016 +0100 -- ambari-server/sbin/ambari-server| 6 +- ambari-server/src/main/python/ambari-server.py | 14 ++- .../main/python/ambari_server/kerberos_setup.py | 99 .../main/python/ambari_server/setupActions.py | 1 + 4 files changed, 117 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/52d7b7ef/ambari-server/sbin/ambari-server -- diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server index 8afabb1..5f97299 100755 --- a/ambari-server/sbin/ambari-server +++ b/ambari-server/sbin/ambari-server @@ -196,9 +196,13 @@ case "${1:-}" in echo -e "Upgrading management pack" $PYTHON "$AMBARI_PYTHON_EXECUTABLE" $@ ;; + setup-kerberos) +echo -e "Setting up Kerberos authentication" +$PYTHON "$AMBARI_PYTHON_EXECUTABLE" $@ +;; *) echo "Usage: $AMBARI_EXECUTABLE - {start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-cleanup|install-mpack|uninstall-mpack|upgrade-mpack} [options] + {start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-cleanup|install-mpack|uninstall-mpack|upgrade-mpack|setup-kerberos} [options] Use $AMBARI_PYTHON_EXECUTABLE --help to get details on options available. Or, simply invoke ambari-server.py --help to print the options." exit 1 http://git-wip-us.apache.org/repos/asf/ambari/blob/52d7b7ef/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index dff4fc3..5d4f5d7 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -52,9 +52,10 @@ from ambari_server.setupActions import BACKUP_ACTION, LDAP_SETUP_ACTION, LDAP_SY SETUP_ACTION, SETUP_SECURITY_ACTION,START_ACTION, STATUS_ACTION, STOP_ACTION, RESTART_ACTION, UPGRADE_ACTION, \ UPGRADE_STACK_ACTION, SETUP_JCE_ACTION, SET_CURRENT_ACTION, START_ACTION, STATUS_ACTION, STOP_ACTION, UPGRADE_ACTION, \ UPGRADE_STACK_ACTION, SETUP_JCE_ACTION, SET_CURRENT_ACTION, ENABLE_STACK_ACTION, SETUP_SSO_ACTION, \ - DB_CLEANUP_ACTION, INSTALL_MPACK_ACTION, UNINSTALL_MPACK_ACTION, UPGRADE_MPACK_ACTION, PAM_SETUP_ACTION + DB_CLEANUP_ACTION, INSTALL_MPACK_ACTION, UNINSTALL_MPACK_ACTION, UPGRADE_MPACK_ACTION, PAM_SETUP_ACTION, KERBEROS_SETUP_ACTION from ambari_server.setupSecurity import setup_ldap, sync_ldap, setup_master_key, setup_ambari_krb5_jaas, setup_pam from ambari_server.userInput import get_validated_string_input +from ambari_server.kerberos_setup import setup_kerberos from ambari_server_main import server_process_main from ambari_server.ambariPath import AmbariPath @@ -587,6 +588,14 @@ def init_parser_options(parser): parser.add_option('--jaas-principal', default=None, help="Kerberos principal for ambari server", dest="jaas_principal") parser.add_option('--jaas-keytab', default=None, help="Keytab path for Kerberos principal", dest="jaas_keytab") + parser.add_option('--kerberos-setup', default=None, help="Setup Kerberos Authentication", dest="kerberos_setup") + parser.add_option('--kerberos-enabled', default=False, help="Kerberos enabled", dest="kerberos_enabled") + parser.add_option('--kerberos-spnego-principal', default="HTTP/_HOST", help="Kerberos SPNEGO principal", dest="kerberos_spnego_principal") + parser.add_option('--kerberos-spnego-keytab-file',
ambari git commit: AMBARI-19266. Command line support for setting configuration options to support Kerberos token authentication. (Laszlo Puskas via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 585c2b877 -> f652f61e7 AMBARI-19266. Command line support for setting configuration options to support Kerberos token authentication. (Laszlo Puskas via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f652f61e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f652f61e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f652f61e Branch: refs/heads/branch-2.5 Commit: f652f61e7bcd2eebe651d8cf96266d2b362bb578 Parents: 585c2b8 Author: Laszlo Puskas Authored: Wed Dec 21 20:28:28 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 21 20:29:00 2016 +0100 -- ambari-server/sbin/ambari-server| 6 +- ambari-server/src/main/python/ambari-server.py | 14 ++- .../main/python/ambari_server/kerberos_setup.py | 99 .../main/python/ambari_server/setupActions.py | 1 + 4 files changed, 117 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f652f61e/ambari-server/sbin/ambari-server -- diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server index e0faf99..b63f128 100755 --- a/ambari-server/sbin/ambari-server +++ b/ambari-server/sbin/ambari-server @@ -189,9 +189,13 @@ case "${1:-}" in echo -e "Upgrading management pack" $PYTHON "$AMBARI_PYTHON_EXECUTABLE" $@ ;; + setup-kerberos) +echo -e "Setting up Kerberos authentication" +$PYTHON "$AMBARI_PYTHON_EXECUTABLE" $@ +;; *) echo "Usage: $AMBARI_EXECUTABLE - {start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-cleanup|install-mpack|uninstall-mpack|upgrade-mpack} [options] + {start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-cleanup|install-mpack|uninstall-mpack|upgrade-mpack|setup-kerberos} [options] Use $AMBARI_PYTHON_EXECUTABLE --help to get details on options available. Or, simply invoke ambari-server.py --help to print the options." exit 1 http://git-wip-us.apache.org/repos/asf/ambari/blob/f652f61e/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 64962d3..845a9f6 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -52,9 +52,10 @@ from ambari_server.setupActions import BACKUP_ACTION, LDAP_SETUP_ACTION, LDAP_SY SETUP_ACTION, SETUP_SECURITY_ACTION,START_ACTION, STATUS_ACTION, STOP_ACTION, RESTART_ACTION, UPGRADE_ACTION, \ UPGRADE_STACK_ACTION, SETUP_JCE_ACTION, SET_CURRENT_ACTION, START_ACTION, STATUS_ACTION, STOP_ACTION, UPGRADE_ACTION, \ UPGRADE_STACK_ACTION, SETUP_JCE_ACTION, SET_CURRENT_ACTION, ENABLE_STACK_ACTION, SETUP_SSO_ACTION, \ - DB_CLEANUP_ACTION, INSTALL_MPACK_ACTION, UNINSTALL_MPACK_ACTION, UPGRADE_MPACK_ACTION, PAM_SETUP_ACTION + DB_CLEANUP_ACTION, INSTALL_MPACK_ACTION, UNINSTALL_MPACK_ACTION, UPGRADE_MPACK_ACTION, PAM_SETUP_ACTION, KERBEROS_SETUP_ACTION from ambari_server.setupSecurity import setup_ldap, sync_ldap, setup_master_key, setup_ambari_krb5_jaas, setup_pam from ambari_server.userInput import get_validated_string_input +from ambari_server.kerberos_setup import setup_kerberos from ambari_server_main import server_process_main from ambari_server.ambariPath import AmbariPath @@ -584,6 +585,14 @@ def init_parser_options(parser): parser.add_option('--jaas-principal', default=None, help="Kerberos principal for ambari server", dest="jaas_principal") parser.add_option('--jaas-keytab', default=None, help="Keytab path for Kerberos principal", dest="jaas_keytab") + parser.add_option('--kerberos-setup', default=None, help="Setup Kerberos Authentication", dest="kerberos_setup") + parser.add_option('--kerberos-enabled', default=False, help="Kerberos enabled", dest="kerberos_enabled") + parser.add_option('--kerberos-spnego-principal', default="HTTP/_HOST", help="Kerberos SPNEGO principal", dest="kerberos_spnego_principal") + parser.add_option('--kerberos-spnego-keytab-
ambari git commit: AMBARI-18956. Ambari attempts to commit transactions marked as rollback-only (magyari_sandor)
Repository: ambari Updated Branches: refs/heads/branch-2.5 6512cc1a0 -> 4c04a9153 AMBARI-18956. Ambari attempts to commit transactions marked as rollback-only (magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c04a915 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c04a915 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c04a915 Branch: refs/heads/branch-2.5 Commit: 4c04a91536f87c422440b4e954d810336585882d Parents: 6512cc1 Author: Sandor Magyari Authored: Fri Dec 2 09:43:24 2016 +0100 Committer: Toader, Sebastian Committed: Mon Dec 19 18:40:35 2016 +0100 -- .../orm/AmbariJpaLocalTxnInterceptor.java | 9 +- .../orm/AmbariJpaLocalTxnInterceptorTest.java | 155 +++ 2 files changed, 162 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c04a915/ambari-server/src/main/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptor.java index d7ba463..e19192a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptor.java @@ -218,12 +218,17 @@ public class AmbariJpaLocalTxnInterceptor implements MethodInterceptor { /** * Returns True if rollback DID NOT HAPPEN (i.e. if commit should continue). * - * @param transactional The metadata annotaiton of the method + * @param transactional The metadata annotation of the method * @param e The exception to test for rollback * @param txn A JPA Transaction to issue rollbacks on */ - private boolean rollbackIfNecessary(Transactional transactional, Exception e, + static boolean rollbackIfNecessary(Transactional transactional, Exception e, EntityTransaction txn) { +if (txn.getRollbackOnly()) { + txn.rollback(); + return false; +} + boolean commit = true; //check rollback clauses http://git-wip-us.apache.org/repos/asf/ambari/blob/4c04a915/ambari-server/src/test/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptorTest.java new file mode 100644 index 000..ea7ea53 --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/AmbariJpaLocalTxnInterceptorTest.java @@ -0,0 +1,155 @@ +/* + * 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. + */ +package org.apache.ambari.server.orm; + +import com.google.inject.persist.Transactional; +import org.easymock.EasyMockSupport; +import org.junit.Assert; +import org.junit.Test; + +import javax.persistence.EntityTransaction; + +import java.io.FileNotFoundException; +import java.io.IOException; + +import static org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.rollbackIfNecessary; +import static org.easymock.EasyMock.expect; + +public class AmbariJpaLocalTxnInterceptorTest extends EasyMockSupport { + + @Test + public void canBeCommittedIfExceptionsToBeRolledBackOnIsEmpty() { +Transactional transactional = createNiceMock(Transactional.class); +EntityTransaction transaction = createStrictMock(EntityTransaction.class); + +expect(transaction.getRollbackOnly()).andReturn(false); +expect(transactional.rollbackOn()).andReturn(new Class[0]); + +replayAll(); + +boolean canCommit = rollbackIfNecessary(transactional, new RuntimeException(), transaction); +Assert.assertTrue("Should be allowed to commit, since rollbackOn clause is empty"
ambari git commit: AMBARI-18978. Create Quick link profile data model and json parser. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 77908c64f -> 2e154608f AMBARI-18978. Create Quick link profile data model and json parser. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2e154608 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2e154608 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2e154608 Branch: refs/heads/branch-2.5 Commit: 2e154608fdd078ce6f879c3a2d747341c17202af Parents: 77908c6 Author: Balazs Bence Sari Authored: Mon Dec 19 10:47:47 2016 +0100 Committer: Toader, Sebastian Committed: Mon Dec 19 16:10:34 2016 +0100 -- .../quicklinksprofile/AcceptAllFilter.java | 46 .../state/quicklinksprofile/Component.java | 57 ++ .../server/state/quicklinksprofile/Filter.java | 78 ++ .../state/quicklinksprofile/LinkNameFilter.java | 61 +++ .../state/quicklinksprofile/PropertyFilter.java | 60 +++ .../quicklinksprofile/QuickLinksProfile.java| 70 .../QuickLinksProfileParser.java| 108 +++ .../server/state/quicklinksprofile/Service.java | 72 + .../QuickLinksConfigurationModuleTest.java | 2 - .../QuickLinksProfileParserTest.java| 70 .../resources/example_quicklinks_profile.json | 48 + .../inconsistent_quicklinks_profile.json| 10 ++ 12 files changed, 680 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2e154608/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java new file mode 100644 index 000..5124241 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.ambari.server.state.quicklinksprofile; + +import org.apache.ambari.server.state.quicklinks.Link; + +/** + * A filter that accepts all links. It is useful to specify a general rule while the more specific + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + */ +public class AcceptAllFilter extends Filter { + + @Override + public boolean accept(Link link) { +return true; + } + + @Override + public boolean equals(Object o) { +if (this == o) return true; +if (o == null || getClass() != o.getClass()) return false; +AcceptAllFilter that = (AcceptAllFilter) o; +return isVisible() == that.isVisible(); + } + + @Override + public int hashCode() { +return java.util.Objects.hash(isVisible()); + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/2e154608/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java new file mode 100644 index 000..7ef0259 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java @@ -0,0 +1,57 @@ +/* + * 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 + * + *
ambari git commit: AMBARI-18978. Create Quick link profile data model and json parser. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk fce9d6e09 -> 61dcdc3f1 AMBARI-18978. Create Quick link profile data model and json parser. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61dcdc3f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61dcdc3f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61dcdc3f Branch: refs/heads/trunk Commit: 61dcdc3f1db0f8091ab3314f6746dace68847178 Parents: fce9d6e Author: Balazs Bence Sari Authored: Mon Dec 19 10:47:47 2016 +0100 Committer: Toader, Sebastian Committed: Mon Dec 19 10:47:47 2016 +0100 -- .../quicklinksprofile/AcceptAllFilter.java | 46 .../state/quicklinksprofile/Component.java | 57 ++ .../server/state/quicklinksprofile/Filter.java | 78 ++ .../state/quicklinksprofile/LinkNameFilter.java | 61 +++ .../state/quicklinksprofile/PropertyFilter.java | 60 +++ .../quicklinksprofile/QuickLinksProfile.java| 70 .../QuickLinksProfileParser.java| 108 +++ .../server/state/quicklinksprofile/Service.java | 72 + .../QuickLinksConfigurationModuleTest.java | 2 - .../QuickLinksProfileParserTest.java| 70 .../resources/example_quicklinks_profile.json | 48 + .../inconsistent_quicklinks_profile.json| 10 ++ 12 files changed, 680 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/61dcdc3f/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java new file mode 100644 index 000..5124241 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.ambari.server.state.quicklinksprofile; + +import org.apache.ambari.server.state.quicklinks.Link; + +/** + * A filter that accepts all links. It is useful to specify a general rule while the more specific + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + */ +public class AcceptAllFilter extends Filter { + + @Override + public boolean accept(Link link) { +return true; + } + + @Override + public boolean equals(Object o) { +if (this == o) return true; +if (o == null || getClass() != o.getClass()) return false; +AcceptAllFilter that = (AcceptAllFilter) o; +return isVisible() == that.isVisible(); + } + + @Override + public int hashCode() { +return java.util.Objects.hash(isVisible()); + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/61dcdc3f/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java new file mode 100644 index 000..7ef0259 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java @@ -0,0 +1,57 @@ +/* + * 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://ww
ambari git commit: AMBARI-19164. Add PK to hostcomponentdesiredstate Table To Support FK Relationships. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 b37d1ffb8 -> d9a03d43c AMBARI-19164. Add PK to hostcomponentdesiredstate Table To Support FK Relationships. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d9a03d43 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d9a03d43 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d9a03d43 Branch: refs/heads/branch-2.5 Commit: d9a03d43c41e50bd19435328fb3e8cd71307fe21 Parents: b37d1ff Author: Toader, Sebastian Authored: Thu Dec 15 17:14:01 2016 +0100 Committer: Toader, Sebastian Committed: Thu Dec 15 17:14:01 2016 +0100 -- .../apache/ambari/server/orm/DBAccessor.java| 11 ++ .../ambari/server/orm/DBAccessorImpl.java | 20 ++- .../orm/dao/HostComponentDesiredStateDAO.java | 32 - .../HostComponentDesiredStateEntity.java| 59 +--- .../HostComponentDesiredStateEntityPK.java | 95 - .../server/orm/helpers/dbms/DbmsHelper.java | 3 + .../orm/helpers/dbms/GenericDbmsHelper.java | 16 ++- .../server/state/ServiceComponentImpl.java | 14 +- .../svccomphost/ServiceComponentHostImpl.java | 23 +-- .../server/upgrade/UpgradeCatalog250.java | 124 +++-- .../main/resources/Ambari-DDL-Derby-CREATE.sql | 9 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 8 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 5 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 7 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 5 +- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 8 +- .../server/state/ServiceComponentTest.java | 15 +- .../server/state/cluster/ClustersTest.java | 20 +-- .../svccomphost/ServiceComponentHostTest.java | 34 ++--- .../server/upgrade/UpgradeCatalog200Test.java | 13 +- .../server/upgrade/UpgradeCatalog250Test.java | 139 +++ 21 files changed, 391 insertions(+), 269 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d9a03d43/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 488c01e..b8a760f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -71,6 +71,17 @@ public interface DBAccessor { String... columnNames) throws SQLException; /** + * Create new index + * @param indexName The name of the index to be created + * @param tableName The database table the index to be created on + * @param columnNames The columns included into the index + * @param isUnique Specifies whether unique index is to be created. + * @throws SQLException Exception in case the index creation fails. + */ + void createIndex(String indexName, String tableName, boolean isUnique, + String... columnNames) throws SQLException; + + /** * Add foreign key for a relation * @param tableName * @param constraintName http://git-wip-us.apache.org/repos/asf/ambari/blob/d9a03d43/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index 123fa96..ff8f7b0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -427,12 +427,18 @@ public class DBAccessorImpl implements DBAccessor { @Override public void createIndex(String indexName, String tableName, String... columnNames) throws SQLException { - if (!tableHasIndex(tableName, false, indexName)) { - String query = dbmsHelper.getCreateIndexStatement(indexName, tableName, columnNames); - executeQuery(query); - } else { - LOG.info("Index {} already exist, skipping creation, table = {}", indexName, tableName); - } +createIndex(indexName, tableName, false, columnNames); + } + + @Override + public void createIndex(String indexName, String tableName, boolean isUnique, + String... columnNames) throws SQLException { +if (!tableHasIndex(tableName, false, indexName)) { + String query = dbmsHelper.getCreateIndexStatement(indexName, tableName, isUnique, columnNames); + executeQuery(query); +} else { + LOG.info("Index {} alrea
ambari git commit: AMBARI-19164. Add PK to hostcomponentdesiredstate Table To Support FK Relationships. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 65fe71a1b -> f7399125e AMBARI-19164. Add PK to hostcomponentdesiredstate Table To Support FK Relationships. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7399125 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7399125 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7399125 Branch: refs/heads/trunk Commit: f7399125edb9615ad7cb7842b084314307495a83 Parents: 65fe71a Author: Toader, Sebastian Authored: Thu Dec 15 17:04:22 2016 +0100 Committer: Toader, Sebastian Committed: Thu Dec 15 17:04:22 2016 +0100 -- .../apache/ambari/server/orm/DBAccessor.java| 11 + .../ambari/server/orm/DBAccessorImpl.java | 20 +- .../orm/dao/HostComponentDesiredStateDAO.java | 32 ++- .../HostComponentDesiredStateEntity.java| 59 -- .../HostComponentDesiredStateEntityPK.java | 96 - .../server/orm/helpers/dbms/DbmsHelper.java | 3 + .../orm/helpers/dbms/GenericDbmsHelper.java | 16 +- .../server/state/ServiceComponentImpl.java | 14 +- .../svccomphost/ServiceComponentHostImpl.java | 23 +-- .../server/upgrade/UpgradeCatalog250.java | 113 +- .../main/resources/Ambari-DDL-Derby-CREATE.sql | 9 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 8 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 5 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 7 +- .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 5 +- .../resources/Ambari-DDL-SQLServer-CREATE.sql | 8 +- .../server/state/ServiceComponentTest.java | 15 +- .../server/state/cluster/ClustersTest.java | 20 +- .../svccomphost/ServiceComponentHostTest.java | 34 +-- .../server/upgrade/UpgradeCatalog200Test.java | 13 +- .../server/upgrade/UpgradeCatalog250Test.java | 205 ++- 21 files changed, 416 insertions(+), 300 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f7399125/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 488c01e..b8a760f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -71,6 +71,17 @@ public interface DBAccessor { String... columnNames) throws SQLException; /** + * Create new index + * @param indexName The name of the index to be created + * @param tableName The database table the index to be created on + * @param columnNames The columns included into the index + * @param isUnique Specifies whether unique index is to be created. + * @throws SQLException Exception in case the index creation fails. + */ + void createIndex(String indexName, String tableName, boolean isUnique, + String... columnNames) throws SQLException; + + /** * Add foreign key for a relation * @param tableName * @param constraintName http://git-wip-us.apache.org/repos/asf/ambari/blob/f7399125/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index 39e8488..c645d6d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -427,12 +427,18 @@ public class DBAccessorImpl implements DBAccessor { @Override public void createIndex(String indexName, String tableName, String... columnNames) throws SQLException { - if (!tableHasIndex(tableName, false, indexName)) { - String query = dbmsHelper.getCreateIndexStatement(indexName, tableName, columnNames); - executeQuery(query); - } else { - LOG.info("Index {} already exist, skipping creation, table = {}", indexName, tableName); - } +createIndex(indexName, tableName, false, columnNames); + } + + @Override + public void createIndex(String indexName, String tableName, boolean isUnique, + String... columnNames) throws SQLException { +if (!tableHasIndex(tableName, false, indexName)) { + String query = dbmsHelper.getCreateIndexStatement(indexName, tableName, isUnique, columnNames); + executeQuery(query); +} else { + LOG.info("Index {} already exist, skippi
ambari git commit: AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 1cd0d555d -> 9c902d681 AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c902d68 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c902d68 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c902d68 Branch: refs/heads/branch-2.5 Commit: 9c902d681a26034014eefcaae7eac312504572bb Parents: 1cd0d55 Author: Attila Doroszlai Authored: Wed Dec 7 11:43:08 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 11:43:28 2016 +0100 -- ambari-project/pom.xml | 41 +++ ambari-server/checkstyle.xml| 17 ++ ambari-server/pom.xml | 4 ++ .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java| 4 +- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 6 +-- .../apache/ambari/server/state/ServiceImpl.java | 2 +- .../server/state/cluster/ClustersImpl.java | 2 +- .../ambari/server/state/host/HostImpl.java | 2 +- .../services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../server/upgrade/UpgradeCatalog240.java | 4 +- pom.xml | 1 + utility/pom.xml | 33 +++- ...AvoidTransactionalOnPrivateMethodsCheck.java | 55 .../src/main/resources/checkstyle_packages.xml | 15 ++ ...dTransactionalOnPrivateMethodsCheckTest.java | 49 + .../InputTransactionalOnPrivateMethods.java | 46 19 files changed, 274 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c902d68/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index a38c6a2..52c9992 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -30,6 +30,8 @@ ${project.parent.basedir} 1.6.3 8.1.19.v20160209 +6.19 +false @@ -477,6 +479,11 @@ jline 2.11 + +com.puppycrawl.tools +checkstyle +${checkstyle.version} + @@ -486,6 +493,40 @@ org.apache.maven.plugins maven-surefire-plugin + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + + checkstyle + test + + ${project.basedir}/checkstyle.xml +UTF-8 +true +true +false +${checkstyle.skip} + + +check + + + + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + utility + utility + 1.0.0.0-SNAPSHOT + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/9c902d68/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml new file mode 100644 index 000..81f6380 --- /dev/null +++ b/ambari-server/checkstyle.xml @@ -0,0 +1,17 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/9c902d68/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index d1277c3..08757a2 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -686,6 +686,10 @@ jetty-maven-plugin ${jetty.version} + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/9c902d68/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 8e5674e..4010528 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controll
ambari git commit: Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 03fa5ea67 -> 5287ab113 Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)" This reverts commit 03fa5ea67a49b898997663cf62cee721715380d4. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5287ab11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5287ab11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5287ab11 Branch: refs/heads/branch-2.5 Commit: 5287ab11310cd3e5a54d39d7192399fff8fe55fc Parents: 03fa5ea Author: Toader, Sebastian Authored: Wed Dec 7 11:37:22 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 11:37:22 2016 +0100 -- ambari-project/pom.xml | 41 --- ambari-server/checkstyle.xml| 17 -- ambari-server/pom.xml | 4 -- .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java| 4 +- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 6 +-- .../apache/ambari/server/state/ServiceImpl.java | 2 +- .../server/state/cluster/ClustersImpl.java | 2 +- .../ambari/server/state/host/HostImpl.java | 2 +- .../services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../server/upgrade/UpgradeCatalog240.java | 4 +- pom.xml | 1 - utility/pom.xml | 33 +--- ...AvoidTransactionalOnPrivateMethodsCheck.java | 55 .../src/main/resources/checkstyle_packages.xml | 15 -- ...dTransactionalOnPrivateMethodsCheckTest.java | 49 - .../InputTransactionalOnPrivateMethods.java | 46 19 files changed, 15 insertions(+), 274 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5287ab11/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index 52c9992..a38c6a2 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -30,8 +30,6 @@ ${project.parent.basedir} 1.6.3 8.1.19.v20160209 -6.19 -false @@ -479,11 +477,6 @@ jline 2.11 - -com.puppycrawl.tools -checkstyle -${checkstyle.version} - @@ -493,40 +486,6 @@ org.apache.maven.plugins maven-surefire-plugin - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - - - checkstyle - test - - ${project.basedir}/checkstyle.xml -UTF-8 -true -true -false -${checkstyle.skip} - - -check - - - - - - com.puppycrawl.tools - checkstyle - ${checkstyle.version} - - - utility - utility - 1.0.0.0-SNAPSHOT - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/5287ab11/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml deleted file mode 100644 index 81f6380..000 --- a/ambari-server/checkstyle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - -http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/5287ab11/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 08757a2..d1277c3 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -686,10 +686,6 @@ jetty-maven-plugin ${jetty.version} - -org.apache.maven.plugins -maven-checkstyle-plugin - http://git-wip-us.apache.org/repos/asf/ambari/blob/5287ab11/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 4010528..
ambari git commit: AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 588e2ced1 -> 03fa5ea67 AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/03fa5ea6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/03fa5ea6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/03fa5ea6 Branch: refs/heads/branch-2.5 Commit: 03fa5ea67a49b898997663cf62cee721715380d4 Parents: 588e2ce Author: Attila Doroszlai Authored: Wed Dec 7 10:45:54 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 10:46:35 2016 +0100 -- ambari-project/pom.xml | 41 +++ ambari-server/checkstyle.xml| 17 ++ ambari-server/pom.xml | 4 ++ .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java| 4 +- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 6 +-- .../apache/ambari/server/state/ServiceImpl.java | 2 +- .../server/state/cluster/ClustersImpl.java | 2 +- .../ambari/server/state/host/HostImpl.java | 2 +- .../services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../server/upgrade/UpgradeCatalog240.java | 4 +- pom.xml | 1 + utility/pom.xml | 33 +++- ...AvoidTransactionalOnPrivateMethodsCheck.java | 55 .../src/main/resources/checkstyle_packages.xml | 15 ++ ...dTransactionalOnPrivateMethodsCheckTest.java | 49 + .../InputTransactionalOnPrivateMethods.java | 46 19 files changed, 274 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/03fa5ea6/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index a38c6a2..52c9992 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -30,6 +30,8 @@ ${project.parent.basedir} 1.6.3 8.1.19.v20160209 +6.19 +false @@ -477,6 +479,11 @@ jline 2.11 + +com.puppycrawl.tools +checkstyle +${checkstyle.version} + @@ -486,6 +493,40 @@ org.apache.maven.plugins maven-surefire-plugin + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + + checkstyle + test + + ${project.basedir}/checkstyle.xml +UTF-8 +true +true +false +${checkstyle.skip} + + +check + + + + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + utility + utility + 1.0.0.0-SNAPSHOT + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/03fa5ea6/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml new file mode 100644 index 000..81f6380 --- /dev/null +++ b/ambari-server/checkstyle.xml @@ -0,0 +1,17 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/03fa5ea6/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index d1277c3..08757a2 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -686,6 +686,10 @@ jetty-maven-plugin ${jetty.version} + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/03fa5ea6/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 8e5674e..4010528 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controll
ambari git commit: AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 6806edcd9 -> 304a5bf60 AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/304a5bf6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/304a5bf6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/304a5bf6 Branch: refs/heads/trunk Commit: 304a5bf6027efa9e70b1deaba325d54e586e4292 Parents: 6806edc Author: Attila Doroszlai Authored: Wed Dec 7 10:45:54 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 10:45:54 2016 +0100 -- ambari-project/pom.xml | 41 +++ ambari-server/checkstyle.xml| 17 ++ ambari-server/pom.xml | 4 ++ .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java| 4 +- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 6 +-- .../apache/ambari/server/state/ServiceImpl.java | 2 +- .../server/state/cluster/ClustersImpl.java | 2 +- .../ambari/server/state/host/HostImpl.java | 2 +- .../services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../server/upgrade/UpgradeCatalog240.java | 4 +- pom.xml | 1 + utility/pom.xml | 33 +++- ...AvoidTransactionalOnPrivateMethodsCheck.java | 55 .../src/main/resources/checkstyle_packages.xml | 15 ++ ...dTransactionalOnPrivateMethodsCheckTest.java | 49 + .../InputTransactionalOnPrivateMethods.java | 46 19 files changed, 274 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/304a5bf6/ambari-project/pom.xml -- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index 7f273eb..b00be38 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -30,6 +30,8 @@ ${project.parent.basedir} 1.6.3 8.1.19.v20160209 +6.19 +false @@ -477,6 +479,11 @@ jline 2.11 + +com.puppycrawl.tools +checkstyle +${checkstyle.version} + @@ -486,6 +493,40 @@ org.apache.maven.plugins maven-surefire-plugin + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + + checkstyle + test + + ${project.basedir}/checkstyle.xml +UTF-8 +true +true +false +${checkstyle.skip} + + +check + + + + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + utility + utility + 1.0.0.0-SNAPSHOT + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/304a5bf6/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml new file mode 100644 index 000..81f6380 --- /dev/null +++ b/ambari-server/checkstyle.xml @@ -0,0 +1,17 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/304a5bf6/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 69ab9d0..e8de84e 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -692,6 +692,10 @@ jetty-maven-plugin ${jetty.version} + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/304a5bf6/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 8e5674e..4010528 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controll
ambari git commit: Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)"
Repository: ambari Updated Branches: refs/heads/trunk 9170b4993 -> 6806edcd9 Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)" This reverts commit 9170b49933106a0af651530d827af4f4e73f1541. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6806edcd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6806edcd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6806edcd Branch: refs/heads/trunk Commit: 6806edcd94dd5568b8a21ec757fa7fa668eec71c Parents: 9170b49 Author: Toader, Sebastian Authored: Wed Dec 7 10:44:23 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 10:44:23 2016 +0100 -- ambari-server/checkstyle.xml | 17 - ambari-server/pom.xml | 4 .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java | 4 ++-- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java| 6 +++--- .../apache/ambari/server/state/ServiceImpl.java| 2 +- .../ambari/server/state/cluster/ClustersImpl.java | 2 +- .../apache/ambari/server/state/host/HostImpl.java | 2 +- .../state/services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../ambari/server/upgrade/UpgradeCatalog240.java | 4 ++-- 12 files changed, 14 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6806edcd/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml deleted file mode 100644 index 81f6380..000 --- a/ambari-server/checkstyle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - -http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/6806edcd/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index e8de84e..69ab9d0 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -692,10 +692,6 @@ jetty-maven-plugin ${jetty.version} - -org.apache.maven.plugins -maven-checkstyle-plugin - http://git-wip-us.apache.org/repos/asf/ambari/blob/6806edcd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 4010528..8e5674e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -374,7 +374,7 @@ public class AlertTargetResourceProvider extends */ @Transactional @SuppressWarnings("unchecked") - void updateAlertTargets(long alertTargetId, + private void updateAlertTargets(long alertTargetId, Map requestMap) throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/6806edcd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java index d417ec2..42aae84 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java @@ -442,7 +442,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - void createHostVersions(Cluster cluster, List hosts, StackId stackId, + private void createHostVersions(Cluster cluster, List hosts, StackId stackId, String desiredRepoVersion, RepositoryVersionState repoState) throws AmbariException, SystemException { final String clusterName = cluster.getClusterName(); @@ -482,7 +482,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControlle
ambari git commit: Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 8a2bdfeaf -> 588e2ced1 Revert "AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)" This reverts commit 8a2bdfeaf228ac9285ffe372e1327b04f8c6c155. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/588e2ced Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/588e2ced Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/588e2ced Branch: refs/heads/branch-2.5 Commit: 588e2ced18414413bceb7faf306a3df7ae364d2e Parents: 8a2bdfe Author: Toader, Sebastian Authored: Wed Dec 7 10:43:24 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 10:43:24 2016 +0100 -- ambari-server/checkstyle.xml | 17 - ambari-server/pom.xml | 4 .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java | 4 ++-- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java| 6 +++--- .../apache/ambari/server/state/ServiceImpl.java| 2 +- .../ambari/server/state/cluster/ClustersImpl.java | 2 +- .../apache/ambari/server/state/host/HostImpl.java | 2 +- .../state/services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../ambari/server/upgrade/UpgradeCatalog240.java | 4 ++-- 12 files changed, 14 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/588e2ced/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml deleted file mode 100644 index 81f6380..000 --- a/ambari-server/checkstyle.xml +++ /dev/null @@ -1,17 +0,0 @@ - - -http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/588e2ced/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 08757a2..d1277c3 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -686,10 +686,6 @@ jetty-maven-plugin ${jetty.version} - -org.apache.maven.plugins -maven-checkstyle-plugin - http://git-wip-us.apache.org/repos/asf/ambari/blob/588e2ced/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 4010528..8e5674e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -374,7 +374,7 @@ public class AlertTargetResourceProvider extends */ @Transactional @SuppressWarnings("unchecked") - void updateAlertTargets(long alertTargetId, + private void updateAlertTargets(long alertTargetId, Map requestMap) throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/588e2ced/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java index d417ec2..42aae84 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java @@ -442,7 +442,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - void createHostVersions(Cluster cluster, List hosts, StackId stackId, + private void createHostVersions(Cluster cluster, List hosts, StackId stackId, String desiredRepoVersion, RepositoryVersionState repoState) throws AmbariException, SystemException { final String clusterName = cluster.getClusterName(); @@ -482,7 +482,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControlle
ambari git commit: AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 1e261db06 -> 9170b4993 AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9170b499 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9170b499 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9170b499 Branch: refs/heads/trunk Commit: 9170b49933106a0af651530d827af4f4e73f1541 Parents: 1e261db Author: Attila Doroszlai Authored: Wed Dec 7 09:52:10 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 09:55:26 2016 +0100 -- ambari-server/checkstyle.xml | 17 + ambari-server/pom.xml | 4 .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java | 4 ++-- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java| 6 +++--- .../apache/ambari/server/state/ServiceImpl.java| 2 +- .../ambari/server/state/cluster/ClustersImpl.java | 2 +- .../apache/ambari/server/state/host/HostImpl.java | 2 +- .../state/services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../ambari/server/upgrade/UpgradeCatalog240.java | 4 ++-- 12 files changed, 35 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9170b499/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml new file mode 100644 index 000..81f6380 --- /dev/null +++ b/ambari-server/checkstyle.xml @@ -0,0 +1,17 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/9170b499/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 69ab9d0..e8de84e 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -692,6 +692,10 @@ jetty-maven-plugin ${jetty.version} + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/9170b499/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 8e5674e..4010528 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -374,7 +374,7 @@ public class AlertTargetResourceProvider extends */ @Transactional @SuppressWarnings("unchecked") - private void updateAlertTargets(long alertTargetId, + void updateAlertTargets(long alertTargetId, Map requestMap) throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/9170b499/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java index 42aae84..d417ec2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java @@ -442,7 +442,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - private void createHostVersions(Cluster cluster, List hosts, StackId stackId, + void createHostVersions(Cluster cluster, List hosts, StackId stackId, String desiredRepoVersion, RepositoryVersionState repoState) throws AmbariException, SystemException { final String clusterName = cluster.getClusterName(); @@ -482,7 +482,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - private RequestStageContainer createOrchestration(Cluster clus
ambari git commit: AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 5309703b0 -> 8a2bdfeaf AMBARI-18966. Add check to ensure we do not have @Transactional annotations on private methods. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a2bdfea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a2bdfea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a2bdfea Branch: refs/heads/branch-2.5 Commit: 8a2bdfeaf228ac9285ffe372e1327b04f8c6c155 Parents: 5309703 Author: Attila Doroszlai Authored: Wed Dec 7 09:52:10 2016 +0100 Committer: Toader, Sebastian Committed: Wed Dec 7 09:52:10 2016 +0100 -- ambari-server/checkstyle.xml | 17 + ambari-server/pom.xml | 4 .../internal/AlertTargetResourceProvider.java | 2 +- .../ClusterStackVersionResourceProvider.java | 4 ++-- .../internal/UpgradeResourceProvider.java | 2 +- .../apache/ambari/server/orm/dao/AlertsDAO.java| 6 +++--- .../apache/ambari/server/state/ServiceImpl.java| 2 +- .../ambari/server/state/cluster/ClustersImpl.java | 2 +- .../apache/ambari/server/state/host/HostImpl.java | 2 +- .../state/services/RetryUpgradeActionService.java | 2 +- .../svccomphost/ServiceComponentHostImpl.java | 2 +- .../ambari/server/upgrade/UpgradeCatalog240.java | 4 ++-- 12 files changed, 35 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2bdfea/ambari-server/checkstyle.xml -- diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml new file mode 100644 index 000..81f6380 --- /dev/null +++ b/ambari-server/checkstyle.xml @@ -0,0 +1,17 @@ + + +http://www.puppycrawl.com/dtds/configuration_1_3.dtd";> + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2bdfea/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index d1277c3..08757a2 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -686,6 +686,10 @@ jetty-maven-plugin ${jetty.version} + +org.apache.maven.plugins +maven-checkstyle-plugin + http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2bdfea/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index 8e5674e..4010528 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -374,7 +374,7 @@ public class AlertTargetResourceProvider extends */ @Transactional @SuppressWarnings("unchecked") - private void updateAlertTargets(long alertTargetId, + void updateAlertTargets(long alertTargetId, Map requestMap) throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2bdfea/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java index 42aae84..d417ec2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java @@ -442,7 +442,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - private void createHostVersions(Cluster cluster, List hosts, StackId stackId, + void createHostVersions(Cluster cluster, List hosts, StackId stackId, String desiredRepoVersion, RepositoryVersionState repoState) throws AmbariException, SystemException { final String clusterName = cluster.getClusterName(); @@ -482,7 +482,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou } @Transactional - private RequestStageContainer createOrchestration(Clu
ambari git commit: AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 049a051f5 -> 3b9056bac AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3b9056ba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3b9056ba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3b9056ba Branch: refs/heads/branch-2.4 Commit: 3b9056bac4324ba929a72985a80b99e7e85931a6 Parents: 049a051 Author: Attila Magyar Authored: Fri Nov 18 12:12:03 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 18 12:12:03 2016 +0100 -- .../stacks/HDP/2.5/services/SPARK/kerberos.json | 60 ++-- 1 file changed, 30 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3b9056ba/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json index 934f3c6..bd6c6c1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json @@ -26,36 +26,6 @@ }, "configuration": "spark-defaults/spark.history.kerberos.keytab" } -}, -{ - "name": "livyuser", - "principal": { -"value": "${livy-env/livy_user}/_HOST@${realm}", -"type" : "service", -"configuration": "livy-conf/livy.server.kerberos.principal", -"local_username": "${livy-env/livy_user}" - }, - "keytab": { -"file": "${keytab_dir}/livy.service.keytab", -"owner": { - "name": "${livy-env/livy_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "livy-conf/livy.server.kerberos.keytab" - } -}, -{ - "name": "/spnego", - "principal": { -"configuration": "livy-conf/livy.server.auth.kerberos.principal" - }, - "keytab": { -"configuration": "livy-conf/livy.server.auth.kerberos.keytab" - } } ], "configurations": [ @@ -112,6 +82,36 @@ "identities": [ { "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "livyuser", + "principal": { +"value": "${livy-env/livy_user}/_HOST@${realm}", +"type" : "service", +"configuration": "livy-conf/livy.server.kerberos.principal", +"local_username": "${livy-env/livy_user}" + }, + "keytab": { +"file": "${keytab_dir}/livy.service.keytab", +"owner": { + "name": "${livy-env/livy_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "livy-conf/livy.server.kerberos.keytab" + } +}, +{ + "name": "/spnego", + "principal": { +"configuration": "livy-conf/livy.server.auth.kerberos.principal" + }, + "keytab": { +"configuration": "livy-conf/livy.server.auth.kerberos.keytab" + } } ] }
ambari git commit: AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 02f0e3646 -> 2027166f5 AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2027166f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2027166f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2027166f Branch: refs/heads/branch-2.5 Commit: 2027166f59cebb84a11be012218ce006162011d8 Parents: 02f0e36 Author: Attila Magyar Authored: Fri Nov 18 12:03:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 18 12:05:29 2016 +0100 -- .../stacks/HDP/2.5/services/SPARK/kerberos.json | 60 +-- .../stacks/HDP/2.6/services/SPARK/kerberos.json | 62 ++-- 2 files changed, 61 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2027166f/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json index 934f3c6..bd6c6c1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json @@ -26,36 +26,6 @@ }, "configuration": "spark-defaults/spark.history.kerberos.keytab" } -}, -{ - "name": "livyuser", - "principal": { -"value": "${livy-env/livy_user}/_HOST@${realm}", -"type" : "service", -"configuration": "livy-conf/livy.server.kerberos.principal", -"local_username": "${livy-env/livy_user}" - }, - "keytab": { -"file": "${keytab_dir}/livy.service.keytab", -"owner": { - "name": "${livy-env/livy_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "livy-conf/livy.server.kerberos.keytab" - } -}, -{ - "name": "/spnego", - "principal": { -"configuration": "livy-conf/livy.server.auth.kerberos.principal" - }, - "keytab": { -"configuration": "livy-conf/livy.server.auth.kerberos.keytab" - } } ], "configurations": [ @@ -112,6 +82,36 @@ "identities": [ { "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "livyuser", + "principal": { +"value": "${livy-env/livy_user}/_HOST@${realm}", +"type" : "service", +"configuration": "livy-conf/livy.server.kerberos.principal", +"local_username": "${livy-env/livy_user}" + }, + "keytab": { +"file": "${keytab_dir}/livy.service.keytab", +"owner": { + "name": "${livy-env/livy_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "livy-conf/livy.server.kerberos.keytab" + } +}, +{ + "name": "/spnego", + "principal": { +"configuration": "livy-conf/livy.server.auth.kerberos.principal" + }, + "keytab": { +"configuration": "livy-conf/livy.server.auth.kerberos.keytab" + } } ] } http://git-wip-us.apache.org/repos/asf/ambari/blob/2027166f/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json --
ambari git commit: AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk eb1411d22 -> e96c68fcb AMBARI-18923. Keytab settings in kerberos.json for SPARK are at the wrong place. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e96c68fc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e96c68fc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e96c68fc Branch: refs/heads/trunk Commit: e96c68fcb9804bec46380bca84c2f69b5aa3808a Parents: eb1411d Author: Attila Magyar Authored: Fri Nov 18 12:03:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 18 12:03:23 2016 +0100 -- .../stacks/HDP/2.5/services/SPARK/kerberos.json | 60 +-- .../stacks/HDP/2.6/services/SPARK/kerberos.json | 62 ++-- 2 files changed, 61 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e96c68fc/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json index 934f3c6..bd6c6c1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json @@ -26,36 +26,6 @@ }, "configuration": "spark-defaults/spark.history.kerberos.keytab" } -}, -{ - "name": "livyuser", - "principal": { -"value": "${livy-env/livy_user}/_HOST@${realm}", -"type" : "service", -"configuration": "livy-conf/livy.server.kerberos.principal", -"local_username": "${livy-env/livy_user}" - }, - "keytab": { -"file": "${keytab_dir}/livy.service.keytab", -"owner": { - "name": "${livy-env/livy_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "livy-conf/livy.server.kerberos.keytab" - } -}, -{ - "name": "/spnego", - "principal": { -"configuration": "livy-conf/livy.server.auth.kerberos.principal" - }, - "keytab": { -"configuration": "livy-conf/livy.server.auth.kerberos.keytab" - } } ], "configurations": [ @@ -112,6 +82,36 @@ "identities": [ { "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "livyuser", + "principal": { +"value": "${livy-env/livy_user}/_HOST@${realm}", +"type" : "service", +"configuration": "livy-conf/livy.server.kerberos.principal", +"local_username": "${livy-env/livy_user}" + }, + "keytab": { +"file": "${keytab_dir}/livy.service.keytab", +"owner": { + "name": "${livy-env/livy_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "livy-conf/livy.server.kerberos.keytab" + } +}, +{ + "name": "/spnego", + "principal": { +"configuration": "livy-conf/livy.server.auth.kerberos.principal" + }, + "keytab": { +"configuration": "livy-conf/livy.server.auth.kerberos.keytab" + } } ] } http://git-wip-us.apache.org/repos/asf/ambari/blob/e96c68fc/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json --
ambari git commit: Revert "AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/trunk e83b06b27 -> 5766783a1 Revert "AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)" This reverts commit eb71c65f73c2a1917b94ff6f727bbd3658de15ee. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5766783a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5766783a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5766783a Branch: refs/heads/trunk Commit: 5766783a1f2d202bbfcd4857f2204f744c0fc0db Parents: e83b06b Author: Toader, Sebastian Authored: Fri Nov 18 10:58:53 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 18 10:58:53 2016 +0100 -- .../main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml | 2 +- .../main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml| 2 +- .../main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml| 2 +- .../src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml | 2 +- .../src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml | 2 +- .../src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml index 80274fc..f363e55 100644 --- a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml @@ -62,7 +62,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 1d6a1c1..eff162e 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -150,7 +150,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml index dcda7c0..7c7357c 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml @@ -162,7 +162,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml index c3190f8..d445e58 100644 --- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml @@ -68,7 +68,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml index b2677f1..8b3a153 100644 --- a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml @@ -86,7 +86,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/5766783a/ambari-server/src/main/res
ambari git commit: Revert "AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 0e4bf17bf -> 245cffc3f Revert "AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)" This reverts commit c76cac371d6483653f0e279640d54ed0dcb2bb7a. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/245cffc3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/245cffc3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/245cffc3 Branch: refs/heads/branch-2.5 Commit: 245cffc3f5fcc8ce4b74029640c1a704560e16ee Parents: 0e4bf17 Author: Toader, Sebastian Authored: Fri Nov 18 10:57:20 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 18 10:57:20 2016 +0100 -- .../main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml | 2 +- .../main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml| 2 +- .../main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml| 2 +- .../src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml | 2 +- .../src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml | 2 +- .../src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml index 80274fc..f363e55 100644 --- a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml @@ -62,7 +62,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 1d6a1c1..eff162e 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -150,7 +150,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml index dcda7c0..7c7357c 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml @@ -162,7 +162,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml index c3190f8..d445e58 100644 --- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml @@ -68,7 +68,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml index b2677f1..8b3a153 100644 --- a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml @@ -86,7 +86,7 @@ scripts/service_check.py PYTHON -600 +300 http://git-wip-us.apache.org/repos/asf/ambari/blob/245cffc3/ambari-server/src/m
ambari git commit: AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 8787f1e77 -> c76cac371 AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c76cac37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c76cac37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c76cac37 Branch: refs/heads/branch-2.5 Commit: c76cac371d6483653f0e279640d54ed0dcb2bb7a Parents: 8787f1e Author: Balazs Bence Sari Authored: Wed Nov 16 15:57:03 2016 +0100 Committer: Toader, Sebastian Committed: Wed Nov 16 16:22:23 2016 +0100 -- .../main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml | 2 +- .../main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml| 2 +- .../main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml| 2 +- .../src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml | 2 +- .../src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml | 2 +- .../src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml index f363e55..80274fc 100644 --- a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml @@ -62,7 +62,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 8282240..15aea2d 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -150,7 +150,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml index 96ac9ce..8b8829b 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml @@ -162,7 +162,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml index d445e58..c3190f8 100644 --- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml @@ -68,7 +68,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml index 8b3a153..b2677f1 100644 --- a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml @@ -86,7 +86,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/c76cac37/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.
ambari git commit: AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk d1d90db50 -> eb71c65f7 AMBARI-18904. Oozie service check fails due to timeout. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb71c65f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb71c65f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb71c65f Branch: refs/heads/trunk Commit: eb71c65f73c2a1917b94ff6f727bbd3658de15ee Parents: d1d90db Author: Balazs Bence Sari Authored: Wed Nov 16 15:57:03 2016 +0100 Committer: Toader, Sebastian Committed: Wed Nov 16 15:57:03 2016 +0100 -- .../main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml | 2 +- .../main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml| 2 +- .../main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml| 2 +- .../src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml | 2 +- .../src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml | 2 +- .../src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml index f363e55..80274fc 100644 --- a/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/MAHOUT/1.0.0.2.3/metainfo.xml @@ -62,7 +62,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 8282240..15aea2d 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -150,7 +150,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml index 96ac9ce..8b8829b 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml @@ -162,7 +162,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml index d445e58..c3190f8 100644 --- a/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/PIG/0.12.0.2.0/metainfo.xml @@ -68,7 +68,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml index 8b3a153..b2677f1 100644 --- a/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml @@ -86,7 +86,7 @@ scripts/service_check.py PYTHON -300 +600 http://git-wip-us.apache.org/repos/asf/ambari/blob/eb71c65f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.
ambari git commit: AMBARI-18891. Oozie config not shown as stale upon changing DefaultFS. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c1f49b244 -> 7b4505354 AMBARI-18891. Oozie config not shown as stale upon changing DefaultFS. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b450535 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b450535 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b450535 Branch: refs/heads/branch-2.5 Commit: 7b45053549b8d3dc2cfc8cc4fee7683df075c585 Parents: c1f49b2 Author: Toader, Sebastian Authored: Tue Nov 15 13:56:12 2016 +0100 Committer: Toader, Sebastian Committed: Tue Nov 15 13:57:49 2016 +0100 -- .../src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7b450535/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 66d272a..8282240 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -164,6 +164,7 @@ yarn-site hive-site tez-site +core-site
ambari git commit: AMBARI-18891. Oozie config not shown as stale upon changing DefaultFS. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk fcd0d2adb -> 7df30b172 AMBARI-18891. Oozie config not shown as stale upon changing DefaultFS. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7df30b17 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7df30b17 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7df30b17 Branch: refs/heads/trunk Commit: 7df30b172d88271ffa5300149a73e86bf330a912 Parents: fcd0d2a Author: Toader, Sebastian Authored: Tue Nov 15 13:56:12 2016 +0100 Committer: Toader, Sebastian Committed: Tue Nov 15 13:56:12 2016 +0100 -- .../src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7df30b17/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 66d272a..8282240 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -164,6 +164,7 @@ yarn-site hive-site tez-site +core-site
[2/2] ambari git commit: AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader)
AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a5fdae80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a5fdae80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a5fdae80 Branch: refs/heads/branch-2.5 Commit: a5fdae802210ae1f8d4fed2234f1651cbe61c2b5 Parents: 7ba1495 Author: Laszlo Puskas Authored: Mon Nov 14 18:43:53 2016 +0100 Committer: Toader, Sebastian Committed: Mon Nov 14 18:44:26 2016 +0100 -- ambari-server/src/main/assemblies/server.xml| 8 + .../server/configuration/Configuration.java | 17 ++ .../server/controller/ControllerModule.java | 42 ++- .../ambari/server/events/AmbariEvent.java | 12 +- .../ambari/server/hooks/AmbariEventFactory.java | 33 +++ .../apache/ambari/server/hooks/HookContext.java | 26 ++ .../ambari/server/hooks/HookContextFactory.java | 44 +++ .../apache/ambari/server/hooks/HookService.java | 36 +++ .../users/PostUserCreationHookContext.java | 55 .../server/hooks/users/UserCreatedEvent.java| 45 +++ .../server/hooks/users/UserHookParams.java | 49 .../server/hooks/users/UserHookService.java | 279 +++ .../server/security/authorization/Users.java| 119 +--- .../serveraction/AbstractServerAction.java | 2 +- .../server/serveraction/ServerAction.java | 4 +- .../users/CollectionPersisterService.java | 46 +++ .../CollectionPersisterServiceFactory.java | 24 ++ .../users/CsvFilePersisterService.java | 103 +++ .../users/PostUserCreationHookServerAction.java | 163 +++ .../users/ShellCommandCallableFactory.java | 26 ++ .../users/ShellCommandUtilityCallable.java | 48 .../users/ShellCommandUtilityWrapper.java | 57 .../server/topology/AsyncCallableService.java | 25 +- .../ambari/server/utils/ShellCommandUtil.java | 2 +- .../scripts/post-user-creation-hook.sh | 133 + .../ActiveWidgetLayoutResourceProviderTest.java | 4 + .../StackUpgradeConfigurationMergeTest.java | 5 + .../UserAuthorizationResourceProviderTest.java | 4 + .../internal/UserResourceProviderTest.java | 4 + .../server/hooks/users/UserHookServiceTest.java | 224 +++ .../AmbariAuthorizationFilterTest.java | 4 + ...uthenticationProviderForDNWithSpaceTest.java | 28 +- .../security/authorization/UsersTest.java | 10 + .../PostUserCreationHookServerActionTest.java | 182 .../cluster/ClusterEffectiveVersionTest.java| 5 +- .../topology/AsyncCallableServiceTest.java | 59 ++-- .../server/upgrade/UpgradeCatalog240Test.java | 33 +++ 37 files changed, 1875 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a5fdae80/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index b6e0723..9a193a9 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -126,6 +126,9 @@ src/main/resources/scripts /var/lib/ambari-server/resources/scripts + +post-user-creation-hook.sh + ${ambari-admin-dir}/target @@ -336,6 +339,11 @@ ${basedir}/target/version /var/lib/ambari-server/resources + + 755 + src/main/resources/scripts/post-user-creation-hook.sh + /var/lib/ambari-server/resources/scripts + http://git-wip-us.apache.org/repos/asf/ambari/blob/a5fdae80/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 45e2ea3..8d0dcce 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2408,6 +2408,14 @@ public class Configuration { public static final ConfigurationProperty ACTIVE_INSTANCE = new ConfigurationProperty<>( "active.instance", Boolean.TRUE); + @Markdown(description = "Indicates whether the post user creation is enabled or not. By default is false.") + public static final ConfigurationProperty POST_USER_CREATION_HOOK_ENABLED = new ConfigurationProperty<>( + "ambari.post.user.creation.hook.enabled", Boolean
[1/2] ambari git commit: AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 7ba1495e1 -> a5fdae802 http://git-wip-us.apache.org/repos/asf/ambari/blob/a5fdae80/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java index 1bc9125..ca36e39 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java @@ -31,6 +31,8 @@ import org.apache.ambari.server.controller.AbstractRootServiceResponseFactory; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.KerberosHelper; import org.apache.ambari.server.controller.spi.ClusterController; +import org.apache.ambari.server.hooks.HookContextFactory; +import org.apache.ambari.server.hooks.HookService; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.dao.HostRoleCommandDAO; import org.apache.ambari.server.orm.dao.RepositoryVersionDAO; @@ -291,6 +293,9 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport { binder.bind(Users.class).toInstance(createNiceMock(Users.class)); binder.bind(ConfigHelper.class).toInstance(createNiceMock(ConfigHelper.class)); binder.bind(RepositoryVersionDAO.class).toInstance(createNiceMock(RepositoryVersionDAO.class)); + binder.bind(HookContextFactory.class).toInstance(createMock(HookContextFactory.class)); + binder.bind(HookService.class).toInstance(createMock(HookService.class)); + binder.requestStaticInjection(UpgradeResourceProvider.class); } http://git-wip-us.apache.org/repos/asf/ambari/blob/a5fdae80/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java index 013d42d..c93d1fb 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java @@ -43,6 +43,8 @@ import org.apache.ambari.server.controller.spi.ResourceProvider; import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.controller.utilities.PredicateBuilder; import org.apache.ambari.server.controller.utilities.PropertyHelper; +import org.apache.ambari.server.hooks.HookContextFactory; +import org.apache.ambari.server.hooks.HookService; import org.apache.ambari.server.metadata.CachedRoleCommandOrderProvider; import org.apache.ambari.server.metadata.RoleCommandOrderProvider; import org.apache.ambari.server.orm.DBAccessor; @@ -413,6 +415,8 @@ public class UserAuthorizationResourceProviderTest extends EasyMockSupport { bind(ResourceTypeDAO.class).toInstance(createMock(ResourceTypeDAO.class)); bind(PermissionDAO.class).toInstance(createMock(PermissionDAO.class)); bind(HostRoleCommandDAO.class).toInstance(createMock(HostRoleCommandDAO.class)); + bind(HookContextFactory.class).toInstance(createMock(HookContextFactory.class)); +bind(HookService.class).toInstance(createMock(HookService.class)); } }); } http://git-wip-us.apache.org/repos/asf/ambari/blob/a5fdae80/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java index bed5be3..a90474d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java @@ -38,6 +38,8 @@ import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.spi.ResourceProvider; import org.apache.ambari.server.controller.utilities.PredicateBuilder; import org.apache.ambari.server.controller.utilities.PropertyHelper; +import org.apache.ambari.server.hooks.HookContextFact
[2/2] ambari git commit: AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader)
AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95233eb3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95233eb3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95233eb3 Branch: refs/heads/trunk Commit: 95233eb3aa57027601072440f6c7b9b757c28692 Parents: fa23822 Author: Laszlo Puskas Authored: Mon Nov 14 18:40:11 2016 +0100 Committer: Toader, Sebastian Committed: Mon Nov 14 18:40:47 2016 +0100 -- ambari-server/src/main/assemblies/server.xml| 8 + .../server/configuration/Configuration.java | 17 ++ .../server/controller/ControllerModule.java | 73 +++-- .../ambari/server/events/AmbariEvent.java | 7 +- .../ambari/server/hooks/AmbariEventFactory.java | 33 +++ .../apache/ambari/server/hooks/HookContext.java | 26 ++ .../ambari/server/hooks/HookContextFactory.java | 44 +++ .../apache/ambari/server/hooks/HookService.java | 36 +++ .../users/PostUserCreationHookContext.java | 55 .../server/hooks/users/UserCreatedEvent.java| 45 +++ .../server/hooks/users/UserHookParams.java | 49 .../server/hooks/users/UserHookService.java | 279 +++ .../server/security/authorization/Users.java| 119 +--- .../serveraction/AbstractServerAction.java | 2 +- .../server/serveraction/ServerAction.java | 4 +- .../users/CollectionPersisterService.java | 46 +++ .../CollectionPersisterServiceFactory.java | 24 ++ .../users/CsvFilePersisterService.java | 103 +++ .../users/PostUserCreationHookServerAction.java | 163 +++ .../users/ShellCommandCallableFactory.java | 26 ++ .../users/ShellCommandUtilityCallable.java | 48 .../users/ShellCommandUtilityWrapper.java | 57 .../server/topology/AsyncCallableService.java | 25 +- .../ambari/server/utils/ShellCommandUtil.java | 2 +- .../scripts/post-user-creation-hook.sh | 133 + .../ActiveWidgetLayoutResourceProviderTest.java | 4 + .../StackUpgradeConfigurationMergeTest.java | 5 + .../UserAuthorizationResourceProviderTest.java | 4 + .../internal/UserResourceProviderTest.java | 4 + .../server/hooks/users/UserHookServiceTest.java | 224 +++ .../AmbariAuthorizationFilterTest.java | 4 + ...uthenticationProviderForDNWithSpaceTest.java | 28 +- .../security/authorization/UsersTest.java | 10 + .../PostUserCreationHookServerActionTest.java | 182 .../cluster/ClusterEffectiveVersionTest.java| 5 +- .../topology/AsyncCallableServiceTest.java | 59 ++-- .../server/upgrade/UpgradeCatalog240Test.java | 35 +++ 37 files changed, 1887 insertions(+), 101 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/95233eb3/ambari-server/src/main/assemblies/server.xml -- diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml index 11f940a..3a61477 100644 --- a/ambari-server/src/main/assemblies/server.xml +++ b/ambari-server/src/main/assemblies/server.xml @@ -126,6 +126,9 @@ src/main/resources/scripts /var/lib/ambari-server/resources/scripts + +post-user-creation-hook.sh + ${ambari-admin-dir}/target @@ -331,6 +334,11 @@ ${basedir}/target/version /var/lib/ambari-server/resources + + 755 + src/main/resources/scripts/post-user-creation-hook.sh + /var/lib/ambari-server/resources/scripts + http://git-wip-us.apache.org/repos/asf/ambari/blob/95233eb3/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 15f186b..b5a29b3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -2473,6 +2473,14 @@ public class Configuration { public static final ConfigurationProperty ACTIVE_INSTANCE = new ConfigurationProperty<>( "active.instance", Boolean.TRUE); + @Markdown(description = "Indicates whether the post user creation is enabled or not. By default is false.") + public static final ConfigurationProperty POST_USER_CREATION_HOOK_ENABLED = new ConfigurationProperty<>( + "ambari.post.user.creation.hook.enabled", Boolean
[1/2] ambari git commit: AMBARI-18587. Post user creation hook. (Laszlo Puskas via stoader)
Repository: ambari Updated Branches: refs/heads/trunk fa23822bd -> 95233eb3a http://git-wip-us.apache.org/repos/asf/ambari/blob/95233eb3/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh -- diff --git a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh new file mode 100755 index 000..34169c1 --- /dev/null +++ b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env 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. 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. +# + +: "${DEBUG:=0}" + +validate_input_arguments(){ + +# the first argument is the csv file | username, group1, group2 +CSV_FILE="$1" +: "${CSV_FILE:?"Missing csv file input for the post-user creation hook"}" + +# the second argument is the cluster security type +SECURITY_TYPE=$2 +: "${SECURITY_TYPE:?"Missing security type input for the post-user creation hook"}" + +} + + +# wraps the command passed in as argument to be called via the ambari sudo +ambari_sudo(){ + +ARG_STR="$1" +CMD_STR="/var/lib/ambari-server/ambari-sudo.sh su hdfs -l -s /bin/bash -c '$ARG_STR'" + +eval "$CMD_STR" +} + +setup_security(){ +if [ "$SECURITY_TYPE" == "KERBEROS" ] +then + HDFS_PRINCIPAL=$3 +: "${HDFS_PRINCIPAL:?"Missing hdfs principal for the post-user creation hook"}" + + HDFS_KEYTAB=$4 +: "${HDFS_KEYTAB:?"Missing hdfs principal for the post-user creation hook"}" + + echo "The cluster is secure, calling kinit ..." + kinit_cmd="/usr/bin/kinit -kt $HDFS_KEYTAB $HDFS_PRINCIPAL" + + ambari_sudo "$kinit_cmd" +else + echo "The cluster security type is $SECURITY_TYPE" +fi +} + +check_tools(){ +echo "Checking for required tools ..." + +# check for hadoop +ambari_sudo "type hadoop > /dev/null 2>&1 || { echo >&2 \"hadoop client not installed\"; exit 1; }" + +# check for the hdfs +ambari_sudo "hadoop fs -ls / > /dev/null 2>&1 || { echo >&2 \"hadoop dfs not available\"; exit 1; }" + +echo "Checking for required tools ... DONE." + +} + +prepare_input(){ +# perform any specific logic on the arguments +echo "Processing post user creation hook payload ..." + +JSON_INPUT="$CSV_FILE.json" +echo "Generating json file $JSON_INPUT ..." + +echo "[" | cat > "$JSON_INPUT" +while read -r LINE +do + USR_NAME=$(echo "$LINE" | awk -F, '{print $1}') + + cat <> "$JSON_INPUT" +{ +"target":"/user/$USR_NAME", +"type":"directory", +"action":"create", +"owner":"$USR_NAME", +"group":"hadoop", +"manageIfExists": "true" + }, +EOF +done <"$CSV_FILE" + +sed -i '$ d' "$JSON_INPUT" +echo $'}\n]' | cat >> "$JSON_INPUT" +echo "Generating file $JSON_INPUT ... DONE." +echo "Processing post user creation hook payload ... DONE." + +} + + +# encapsulates the logic of the post user creation script +main(){ + +echo $DEBUG; + +if [ "$DEBUG" != "0" ]; then echo "Switch debug ON";set -x; else echo "debug: OFF"; fi + +echo "Executing user hook with parameters: $*" + +validate_input_arguments "$@" + +setup_security "$@" + +check_tools + +prepare_input + +# the default implementation creates user home folders; the first argument must be the username +ambari_sudo "yarn jar /var/lib/ambari-server/resources/stacks/HDP/2.0.6/hooks/before-START/files/fast-hdfs-resource.jar $JSON_INPUT" + +if [ "$DEBUG" -gt "0" ]; then echo "Switch debug OFF";set -x;unset DEBUG; else echo "debug: OFF"; fi +unset DEBUG +} + + +main "$@" http://git-wip-us.apache.org/repos/asf/ambari/blob/95233eb3/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java index c592a20..28a8bc8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutRes
ambari git commit: AMBARI-18569. Execute topology tasks in parallel by hosts. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 1e2c44bb4 -> 5eb3bb432 AMBARI-18569. Execute topology tasks in parallel by hosts. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5eb3bb43 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5eb3bb43 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5eb3bb43 Branch: refs/heads/branch-2.5 Commit: 5eb3bb432bd9570861c3bdd93476a3a2d85e8b76 Parents: 1e2c44b Author: Attila Doroszlai Authored: Fri Nov 11 13:08:14 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 11 13:08:14 2016 +0100 -- .../server/configuration/Configuration.java | 35 +- .../AmbariManagementControllerImpl.java | 20 .../internal/ComponentResourceProvider.java | 4 +- .../internal/HostComponentResourceProvider.java | 2 +- .../internal/ServiceResourceProvider.java | 4 +- .../ambari/server/orm/entities/StackEntity.java | 10 +++- .../server/topology/HostOfferResponse.java | 46 -- .../ambari/server/topology/HostRequest.java | 18 +++ .../ambari/server/topology/LogicalRequest.java | 13 +++--- .../ambari/server/topology/TopologyManager.java | 49 ++-- .../server/configuration/ConfigurationTest.java | 6 +-- 11 files changed, 142 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5eb3bb43/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 6cc4120..45e2ea3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -100,7 +100,6 @@ import com.google.gson.JsonPrimitive; import com.google.inject.Inject; import com.google.inject.Singleton; - /** * The {@link Configuration} class is used to read from the * {{ambari.properties}} file and manage/expose the configuration properties. @@ -2416,6 +2415,22 @@ public class Configuration { public static final ConfigurationProperty LOG4JMONITOR_DELAY = new ConfigurationProperty<>( "log4j.monitor.delay", TimeUnit.MINUTES.toMillis(5)); + /** + * Indicates whether parallel topology task creation is enabled for blueprint cluster provisioning. + * Defaults to false. + * @see #TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT + */ + @Markdown(description = "Indicates whether parallel topology task creation is enabled") + public static final ConfigurationProperty TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED = new ConfigurationProperty<>("topology.task.creation.parallel", Boolean.FALSE); + + /** + * The number of threads to use for parallel topology task creation in blueprint cluster provisioning if enabled. + * Defaults to 10. + * @see #TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED + */ + @Markdown(description = "The number of threads to use for parallel topology task creation if enabled") + public static final ConfigurationProperty TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT = new ConfigurationProperty<>("topology.task.creation.parallel.threads", 10); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -5013,6 +5028,24 @@ public class Configuration { } /** + * @return the number of threads to use for parallel topology task creation if enabled + */ + public int getParallelTopologyTaskCreationThreadPoolSize() { +try { + return Integer.parseInt(getProperty(TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT)); +} catch (NumberFormatException e) { + return TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT.getDefaultValue(); +} + } + + /** + * @return true if parallel execution of task creation is enabled explicitly + */ + public boolean isParallelTopologyTaskCreationEnabled() { +return Boolean.parseBoolean(getProperty(TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED)); + } + + /** * Generates a markdown table which includes: * * Property key name http://git-wip-us.apache.org/repos/asf/ambari/blob/5eb3bb43/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/serve
ambari git commit: AMBARI-18569. Execute topology tasks in parallel by hosts. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2ddd7a338 -> 5dea886ef AMBARI-18569. Execute topology tasks in parallel by hosts. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5dea886e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5dea886e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5dea886e Branch: refs/heads/trunk Commit: 5dea886efde58fb93033f705b5dd43b5ccd72ad6 Parents: 2ddd7a3 Author: Attila Doroszlai Authored: Fri Nov 11 12:22:04 2016 +0100 Committer: Toader, Sebastian Committed: Fri Nov 11 12:22:04 2016 +0100 -- .../server/configuration/Configuration.java | 37 ++- .../AmbariManagementControllerImpl.java | 20 .../internal/ComponentResourceProvider.java | 4 +- .../internal/HostComponentResourceProvider.java | 2 +- .../internal/ServiceResourceProvider.java | 4 +- .../ambari/server/orm/entities/StackEntity.java | 10 +++- .../server/topology/HostOfferResponse.java | 46 -- .../ambari/server/topology/HostRequest.java | 18 +++ .../ambari/server/topology/LogicalRequest.java | 13 +++--- .../ambari/server/topology/TopologyManager.java | 49 ++-- .../server/configuration/ConfigurationTest.java | 6 +-- 11 files changed, 143 insertions(+), 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5dea886e/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 9d2243b..15f186b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -100,7 +100,6 @@ import com.google.gson.JsonPrimitive; import com.google.inject.Inject; import com.google.inject.Singleton; - /** * The {@link Configuration} class is used to read from the * {{ambari.properties}} file and manage/expose the configuration properties. @@ -2481,6 +2480,22 @@ public class Configuration { public static final ConfigurationProperty LOG4JMONITOR_DELAY = new ConfigurationProperty<>( "log4j.monitor.delay", TimeUnit.MINUTES.toMillis(5)); + /** + * Indicates whether parallel topology task creation is enabled for blueprint cluster provisioning. + * Defaults to false. + * @see #TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT + */ + @Markdown(description = "Indicates whether parallel topology task creation is enabled") + public static final ConfigurationProperty TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED = new ConfigurationProperty<>("topology.task.creation.parallel", Boolean.FALSE); + + /** + * The number of threads to use for parallel topology task creation in blueprint cluster provisioning if enabled. + * Defaults to 10. + * @see #TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED + */ + @Markdown(description = "The number of threads to use for parallel topology task creation if enabled") + public static final ConfigurationProperty TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT = new ConfigurationProperty<>("topology.task.creation.parallel.threads", 10); + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); @@ -5168,6 +5183,24 @@ public class Configuration { } /** + * @return the number of threads to use for parallel topology task creation if enabled + */ + public int getParallelTopologyTaskCreationThreadPoolSize() { +try { + return Integer.parseInt(getProperty(TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT)); +} catch (NumberFormatException e) { + return TOPOLOGY_TASK_PARALLEL_CREATION_THREAD_COUNT.getDefaultValue(); +} + } + + /** + * @return true if parallel execution of task creation is enabled explicitly + */ + public boolean isParallelTopologyTaskCreationEnabled() { +return Boolean.parseBoolean(getProperty(TOPOLOGY_TASK_PARALLEL_CREATION_ENABLED)); + } + + /** * Generates a markdown table which includes: * * Property key name http://git-wip-us.apache.org/repos/asf/ambari/blob/5dea886e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -
ambari git commit: AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 062a58a4c -> 91d480eb6 AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91d480eb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91d480eb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91d480eb Branch: refs/heads/branch-2.5 Commit: 91d480eb62cc5aeb8d34c863d1443345cf0567a5 Parents: 062a58a Author: Attila Magyar Authored: Mon Nov 7 16:54:48 2016 +0100 Committer: Toader, Sebastian Committed: Wed Nov 9 12:57:25 2016 +0100 -- .../libraries/functions/curl_krb_request.py | 4 ++-- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 4 ++-- .../services/WEBHCAT/package/files/alert_webhcat_server.py | 4 ++-- .../python/stacks/2.0.6/YARN/test_yarn_service_check.py | 9 - 4 files changed, 14 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/91d480eb/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index 2acf871..557db58 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -176,11 +176,11 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, try: if return_only_http_code: - _, curl_stdout, curl_stderr = get_user_call_output(['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', + _, curl_stdout, curl_stderr = get_user_call_output(['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', '%{http_code}', url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout), '-o', '/dev/null'], user=user, env=kerberos_env) else: - curl_command = ['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, + curl_command = ['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout)] # returns response body if len(method) > 0 and len(body) == 0 and len(header) == 0: http://git-wip-us.apache.org/repos/asf/ambari/blob/91d480eb/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index daa8e7e..1d8963d 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -129,13 +129,13 @@ class ServiceCheckDefault(ServiceCheck): for rm_webapp_address in params.rm_webapp_addresses_list: info_app_url = params.scheme + "://" + rm_webapp_address + "/ws/v1/cluster/apps/" + application_name - get_app_info_cmd = "curl --negotiate -u : -ksL --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url + get_app_info_cmd = "curl --negotiate -u : -ks --location-trusted --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url return_code, stdout, _ = get_user_call_output(get_app_info_cmd, user=params.smokeuser, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', ) - + # Handle HDP<2.2.8.1 where RM doesn't do automatic redirection from stand
ambari git commit: AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk f87ec899c -> d99df76a8 AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d99df76a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d99df76a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d99df76a Branch: refs/heads/trunk Commit: d99df76a8731662f89eb1668cf9144b9317cfd4a Parents: f87ec89 Author: Attila Magyar Authored: Mon Nov 7 16:54:48 2016 +0100 Committer: Toader, Sebastian Committed: Mon Nov 7 17:02:37 2016 +0100 -- .../libraries/functions/curl_krb_request.py | 4 ++-- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 4 ++-- .../services/WEBHCAT/package/files/alert_webhcat_server.py | 4 ++-- .../python/stacks/2.0.6/YARN/test_yarn_service_check.py | 9 - 4 files changed, 14 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d99df76a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index 2acf871..557db58 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -176,11 +176,11 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, try: if return_only_http_code: - _, curl_stdout, curl_stderr = get_user_call_output(['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', + _, curl_stdout, curl_stderr = get_user_call_output(['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', '%{http_code}', url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout), '-o', '/dev/null'], user=user, env=kerberos_env) else: - curl_command = ['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, + curl_command = ['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout)] # returns response body if len(method) > 0 and len(body) == 0 and len(header) == 0: http://git-wip-us.apache.org/repos/asf/ambari/blob/d99df76a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index 184d038..c0bd480 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -133,13 +133,13 @@ class ServiceCheckDefault(ServiceCheck): for rm_webapp_address in params.rm_webapp_addresses_list: info_app_url = params.scheme + "://" + rm_webapp_address + "/ws/v1/cluster/apps/" + application_name - get_app_info_cmd = "curl --negotiate -u : -ksL --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url + get_app_info_cmd = "curl --negotiate -u : -ks --location-trusted --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url return_code, stdout, _ = get_user_call_output(get_app_info_cmd, user=params.smokeuser, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', ) - + # Handle HDP<2.2.8.1 where RM doesn't do automatic redirection from standby to activ
ambari git commit: AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 3a808822b -> d314e3478 AMBARI-18770. Service check and Ambari Alerting for RM fails against Yarn with HA and SPNEGO. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d314e347 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d314e347 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d314e347 Branch: refs/heads/branch-2.4 Commit: d314e3478ca9af5260c1a197cebd801644dce1d0 Parents: 3a80882 Author: Attila Magyar Authored: Mon Nov 7 16:54:48 2016 +0100 Committer: Toader, Sebastian Committed: Mon Nov 7 16:54:48 2016 +0100 -- .../libraries/functions/curl_krb_request.py | 4 ++-- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 4 ++-- .../services/WEBHCAT/package/files/alert_webhcat_server.py | 4 ++-- .../python/stacks/2.0.6/YARN/test_yarn_service_check.py | 9 - 4 files changed, 14 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d314e347/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index 2acf871..557db58 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -176,11 +176,11 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, try: if return_only_http_code: - _, curl_stdout, curl_stderr = get_user_call_output(['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', + _, curl_stdout, curl_stderr = get_user_call_output(['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', '%{http_code}', url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout), '-o', '/dev/null'], user=user, env=kerberos_env) else: - curl_command = ['curl', '-L', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, + curl_command = ['curl', '--location-trusted', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, url, '--connect-timeout', str(connection_timeout), '--max-time', str(maximum_timeout)] # returns response body if len(method) > 0 and len(body) == 0 and len(header) == 0: http://git-wip-us.apache.org/repos/asf/ambari/blob/d314e347/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index daa8e7e..1d8963d 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -129,13 +129,13 @@ class ServiceCheckDefault(ServiceCheck): for rm_webapp_address in params.rm_webapp_addresses_list: info_app_url = params.scheme + "://" + rm_webapp_address + "/ws/v1/cluster/apps/" + application_name - get_app_info_cmd = "curl --negotiate -u : -ksL --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url + get_app_info_cmd = "curl --negotiate -u : -ks --location-trusted --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url return_code, stdout, _ = get_user_call_output(get_app_info_cmd, user=params.smokeuser, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', ) - + # Handle HDP<2.2.8.1 where RM doesn't do automatic redirection from stand
ambari git commit: AMBARI-18700. Add HDFS resources for HBase, Spark, Spark2, Zeppelin to AmbariPreupload script. (Attila Doroszlai via stoader).
Repository: ambari Updated Branches: refs/heads/trunk f1117c25d -> be6b6b872 AMBARI-18700. Add HDFS resources for HBase, Spark, Spark2, Zeppelin to AmbariPreupload script. (Attila Doroszlai via stoader). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be6b6b87 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be6b6b87 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be6b6b87 Branch: refs/heads/trunk Commit: be6b6b872861ee4b1daa8f755f175996c95334f5 Parents: f1117c2 Author: Attila Doroszlai Authored: Thu Nov 3 11:53:05 2016 +0100 Committer: Toader, Sebastian Committed: Thu Nov 3 11:55:03 2016 +0100 -- .../2.0.0/package/scripts/spark_service.py | 9 + .../main/resources/scripts/Ambaripreupload.py| 19 ++- 2 files changed, 23 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be6b6b87/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py index 1cbca8b..12988c8 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py @@ -57,10 +57,11 @@ def spark_service(name, upgrade_type=None, action=None): if name == 'jobhistoryserver' and effective_version and check_stack_feature(StackFeature.SPARK_16PLUS, effective_version): # create & copy spark2-hdp-yarn-archive.tar.gz to hdfs - source_dir=params.spark_home+"/jars" - tmp_archive_file=get_tarball_paths("spark2")[1] - make_tarfile(tmp_archive_file, source_dir) - copy_to_hdfs("spark2", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) + if not params.sysprep_skip_copy_tarballs_hdfs: + source_dir=params.spark_home+"/jars" + tmp_archive_file=get_tarball_paths("spark2")[1] + make_tarfile(tmp_archive_file, source_dir) + copy_to_hdfs("spark2", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) # create spark history directory params.HdfsResource(params.spark_history_dir, type="directory", http://git-wip-us.apache.org/repos/asf/ambari/blob/be6b6b87/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index 1082b5e..c04424f 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -243,6 +243,7 @@ with Environment() as env: return _copy_files(source_and_dest_pairs, file_owner, group_owner, kinit_if_needed) def createHdfsResources(): +print "Creating hdfs directories..." params.HdfsResource(format('{hdfs_path_prefix}/atshistory'), user='hdfs', change_permissions_for_parents=True, owner='yarn', group='hadoop', type='directory', action= ['create_on_execute'], mode=0755) params.HdfsResource(format('{hdfs_path_prefix}/user/hcat'), owner='hcat', type='directory', action=['create_on_execute'], mode=0755) params.HdfsResource(format('{hdfs_path_prefix}/hive/warehouse'), owner='hive', type='directory', action=['create_on_execute'], mode=0777) @@ -261,8 +262,23 @@ with Environment() as env: params.HdfsResource(format('{hdfs_path_prefix}/amshbase/staging'), owner='ams', type='directory', action=['create_on_execute'], mode=0711) params.HdfsResource(format('{hdfs_path_prefix}/user/ams/hbase'), owner='ams', type='directory', action=['create_on_execute'], mode=0775) params.HdfsResource(format('{hdfs_path_prefix}/hdp'), owner='hdfs', type='directory', action=['create_on_execute'], mode=0755) +params.HdfsResource(format('{hdfs_path_prefix}/user/spark'), owner='spark', group='hadoop', type='directory', action=['create_on_execute'], mode=0775) +params.HdfsResource(format('{hdfs_path_prefix}/user
ambari git commit: AMBARI-18700. Add HDFS resources for HBase, Spark, Spark2, Zeppelin to AmbariPreupload script. (Attila Doroszlai via stoader).
Repository: ambari Updated Branches: refs/heads/branch-2.5 0dd2842be -> ebfd3b5cf AMBARI-18700. Add HDFS resources for HBase, Spark, Spark2, Zeppelin to AmbariPreupload script. (Attila Doroszlai via stoader). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ebfd3b5c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ebfd3b5c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ebfd3b5c Branch: refs/heads/branch-2.5 Commit: ebfd3b5cff731e0c1d5faaae4549bcc67cfc8c4a Parents: 0dd2842 Author: Attila Doroszlai Authored: Thu Nov 3 11:53:05 2016 +0100 Committer: Toader, Sebastian Committed: Thu Nov 3 11:53:05 2016 +0100 -- .../2.0.0/package/scripts/spark_service.py | 9 + .../main/resources/scripts/Ambaripreupload.py| 19 ++- 2 files changed, 23 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ebfd3b5c/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py index a8010e8..89edfb5 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py @@ -57,10 +57,11 @@ def spark_service(name, upgrade_type=None, action=None): if name == 'jobhistoryserver' and effective_version and check_stack_feature(StackFeature.SPARK_16PLUS, effective_version): # create & copy spark2-hdp-yarn-archive.tar.gz to hdfs - source_dir=params.spark_home+"/jars" - tmp_archive_file=get_tarball_paths("spark2")[1] - make_tarfile(tmp_archive_file, source_dir) - copy_to_hdfs("spark2", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) + if not params.sysprep_skip_copy_tarballs_hdfs: + source_dir=params.spark_home+"/jars" + tmp_archive_file=get_tarball_paths("spark2")[1] + make_tarfile(tmp_archive_file, source_dir) + copy_to_hdfs("spark2", params.user_group, params.hdfs_user, skip=params.sysprep_skip_copy_tarballs_hdfs) # create spark history directory params.HdfsResource(params.spark_history_dir, type="directory", http://git-wip-us.apache.org/repos/asf/ambari/blob/ebfd3b5c/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index 1082b5e..c04424f 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -243,6 +243,7 @@ with Environment() as env: return _copy_files(source_and_dest_pairs, file_owner, group_owner, kinit_if_needed) def createHdfsResources(): +print "Creating hdfs directories..." params.HdfsResource(format('{hdfs_path_prefix}/atshistory'), user='hdfs', change_permissions_for_parents=True, owner='yarn', group='hadoop', type='directory', action= ['create_on_execute'], mode=0755) params.HdfsResource(format('{hdfs_path_prefix}/user/hcat'), owner='hcat', type='directory', action=['create_on_execute'], mode=0755) params.HdfsResource(format('{hdfs_path_prefix}/hive/warehouse'), owner='hive', type='directory', action=['create_on_execute'], mode=0777) @@ -261,8 +262,23 @@ with Environment() as env: params.HdfsResource(format('{hdfs_path_prefix}/amshbase/staging'), owner='ams', type='directory', action=['create_on_execute'], mode=0711) params.HdfsResource(format('{hdfs_path_prefix}/user/ams/hbase'), owner='ams', type='directory', action=['create_on_execute'], mode=0775) params.HdfsResource(format('{hdfs_path_prefix}/hdp'), owner='hdfs', type='directory', action=['create_on_execute'], mode=0755) +params.HdfsResource(format('{hdfs_path_prefix}/user/spark'), owner='spark', group='hadoop', type='directory', action=['create_on_execute'], mode=0775) +params.HdfsResource(format('{hd
ambari git commit: AMBARI-18654. Implement instrumented Lock for profiling/logging. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 3b159d272 -> 462c8d9f6 AMBARI-18654. Implement instrumented Lock for profiling/logging. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/462c8d9f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/462c8d9f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/462c8d9f Branch: refs/heads/trunk Commit: 462c8d9f61554f42704013d53b6376379dc408e0 Parents: 3b159d2 Author: Attila Doroszlai Authored: Fri Oct 21 18:51:31 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 21 18:53:11 2016 +0200 -- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/logging/LockFactory.java | 128 .../server/logging/LockProfileDelegate.java | 186 + .../ambari/server/logging/ProfiledLock.java | 50 + .../server/logging/ProfiledReentrantLock.java | 115 ++ .../logging/ProfiledReentrantReadWriteLock.java | 208 +++ .../server/state/cluster/ClusterImpl.java | 14 +- .../server/configuration/ConfigurationTest.java | 12 ++ .../ambari/server/logging/LockFactoryTest.java | 95 + .../ProfiledReentrantReadWriteLockTest.java | 157 ++ 10 files changed, 974 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/462c8d9f/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 1759dc4..1753216 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -1114,6 +1114,12 @@ public class Configuration { /** + * Enable the profiling of internal locks. + */ + @Markdown(description = "Enable the profiling of internal locks.") + public static final ConfigurationProperty SERVER_LOCKS_PROFILING = new ConfigurationProperty<>("server.locks.profiling", Boolean.FALSE); + + /** * The size of the cache used to hold {@link HostRoleCommand} instances in-memory. */ @Markdown(description = "The size of the cache which is used to hold current operations in memory until they complete.") @@ -4941,6 +4947,13 @@ public class Configuration { } /** + * @return true if lock profiling is enabled for Ambari Server, in which case LockFactory should create instrumented locks + */ + public boolean isServerLocksProfilingEnabled() { +return Boolean.parseBoolean(getProperty(SERVER_LOCKS_PROFILING)); + } + + /** * @return the capacity of async audit logger */ public int getAuditLoggerCapacity() { http://git-wip-us.apache.org/repos/asf/ambari/blob/462c8d9f/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java new file mode 100644 index 000..f40aa84 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java @@ -0,0 +1,128 @@ +/* + * 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. + */ +package org.apache.ambari.server.logging; + +import com.google.common.base.Ticker; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import org.apache.ambari.server.configuration.Configuration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.Read
ambari git commit: AMBARI-18654. Implement instrumented Lock for profiling/logging. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 90c531317 -> c2507d575 AMBARI-18654. Implement instrumented Lock for profiling/logging. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c2507d57 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c2507d57 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c2507d57 Branch: refs/heads/branch-2.5 Commit: c2507d575599a44403107e375b583aa1222af65c Parents: 90c5313 Author: Attila Doroszlai Authored: Fri Oct 21 18:51:31 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 21 18:51:31 2016 +0200 -- .../server/configuration/Configuration.java | 13 ++ .../ambari/server/logging/LockFactory.java | 128 .../server/logging/LockProfileDelegate.java | 186 + .../ambari/server/logging/ProfiledLock.java | 50 + .../server/logging/ProfiledReentrantLock.java | 115 ++ .../logging/ProfiledReentrantReadWriteLock.java | 208 +++ .../server/state/cluster/ClusterImpl.java | 14 +- .../server/configuration/ConfigurationTest.java | 12 ++ .../ambari/server/logging/LockFactoryTest.java | 95 + .../ProfiledReentrantReadWriteLockTest.java | 157 ++ 10 files changed, 974 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c2507d57/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index a0747d4..12e36c3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -,6 +,12 @@ public class Configuration { /** + * Enable the profiling of internal locks. + */ + @Markdown(description = "Enable the profiling of internal locks.") + public static final ConfigurationProperty SERVER_LOCKS_PROFILING = new ConfigurationProperty<>("server.locks.profiling", Boolean.FALSE); + + /** * The size of the cache used to hold {@link HostRoleCommand} instances in-memory. */ @Markdown(description = "The size of the cache which is used to hold current operations in memory until they complete.") @@ -4786,6 +4792,13 @@ public class Configuration { } /** + * @return true if lock profiling is enabled for Ambari Server, in which case LockFactory should create instrumented locks + */ + public boolean isServerLocksProfilingEnabled() { +return Boolean.parseBoolean(getProperty(SERVER_LOCKS_PROFILING)); + } + + /** * @return the capacity of async audit logger */ public int getAuditLoggerCapacity() { http://git-wip-us.apache.org/repos/asf/ambari/blob/c2507d57/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java new file mode 100644 index 000..f40aa84 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java @@ -0,0 +1,128 @@ +/* + * 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. + */ +package org.apache.ambari.server.logging; + +import com.google.common.base.Ticker; +import com.google.inject.Inject; +import com.google.inject.Singleton; +import org.apache.ambari.server.configuration.Configuration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.locks.Lock
ambari git commit: AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 562bac816 -> 942b3dba7 AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/942b3dba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/942b3dba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/942b3dba Branch: refs/heads/trunk Commit: 942b3dba72d946bbf82ea90d0f66b6d9c16c0eff Parents: 562bac8 Author: Attila Doroszlai Authored: Fri Oct 21 17:27:02 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 21 17:31:13 2016 +0200 -- .../BlueprintConfigurationProcessor.java| 7 +- .../BlueprintConfigurationProcessorTest.java| 103 --- 2 files changed, 68 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/942b3dba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 8cc6ec7..f890326 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -2242,16 +2242,17 @@ public class BlueprintConfigurationProcessor { String[] keyValuePairs = origValue.split(","); boolean firstValue = true; for (String keyValuePair : keyValuePairs) { +keyValuePair = keyValuePair.trim(); if (!firstValue) { updatedResult.append(","); } else { firstValue = false; } -String key = keyValuePair.split("=")[0]; +String key = keyValuePair.split("=")[0].trim(); if (mapOfKeysToUpdaters.containsKey(key)) { String result = mapOfKeysToUpdaters.get(key).updateForClusterCreate( - key, keyValuePair.split("=")[1], properties, topology); + key, keyValuePair.split("=")[1].trim(), properties, topology); // append the internal property result, escape out any commas in the internal property, // this is required due to the specific syntax of templeton.hive.properties updatedResult.append(key); http://git-wip-us.apache.org/repos/asf/ambari/blob/942b3dba/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index 15fd4e7..5bedb9d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -58,7 +58,7 @@ import org.apache.ambari.server.topology.HostGroup; import org.apache.ambari.server.topology.HostGroupImpl; import org.apache.ambari.server.topology.HostGroupInfo; import org.apache.ambari.server.topology.InvalidTopologyException; -import org.apache.ambari.server.utils.CollectionPresentationUtils; +import org.apache.commons.lang.StringUtils; import org.easymock.EasyMockRule; import org.easymock.Mock; import org.easymock.MockType; @@ -86,7 +86,7 @@ public class BlueprintConfigurationProcessorTest { public EasyMockRule mocks = new EasyMockRule(this); @Mock(type = MockType.NICE) - private AmbariContext ambariConext; + private AmbariContext ambariContext; @Mock(type = MockType.NICE) private Blueprint bp; @@ -197,7 +197,7 @@ public class BlueprintConfigurationProcessorTest { @After public void tearDown() { -reset(bp, serviceInfo, stack, ambariConext); +reset(bp, serviceInfo, stack, ambar
ambari git commit: AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 7437efe53 -> 90c531317 AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/90c53131 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/90c53131 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/90c53131 Branch: refs/heads/branch-2.5 Commit: 90c531317b33f37c6c68e3cc1cf6039be92d8616 Parents: 7437efe Author: Attila Doroszlai Authored: Fri Oct 21 17:27:02 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 21 17:29:48 2016 +0200 -- .../BlueprintConfigurationProcessor.java| 7 +- .../BlueprintConfigurationProcessorTest.java| 103 --- 2 files changed, 68 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/90c53131/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 069fa56..de72c2a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -2246,16 +2246,17 @@ public class BlueprintConfigurationProcessor { String[] keyValuePairs = origValue.split(","); boolean firstValue = true; for (String keyValuePair : keyValuePairs) { +keyValuePair = keyValuePair.trim(); if (!firstValue) { updatedResult.append(","); } else { firstValue = false; } -String key = keyValuePair.split("=")[0]; +String key = keyValuePair.split("=")[0].trim(); if (mapOfKeysToUpdaters.containsKey(key)) { String result = mapOfKeysToUpdaters.get(key).updateForClusterCreate( - key, keyValuePair.split("=")[1], properties, topology); + key, keyValuePair.split("=")[1].trim(), properties, topology); // append the internal property result, escape out any commas in the internal property, // this is required due to the specific syntax of templeton.hive.properties updatedResult.append(key); http://git-wip-us.apache.org/repos/asf/ambari/blob/90c53131/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index c2d0f44..3e0cbc6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -58,7 +58,7 @@ import org.apache.ambari.server.topology.HostGroup; import org.apache.ambari.server.topology.HostGroupImpl; import org.apache.ambari.server.topology.HostGroupInfo; import org.apache.ambari.server.topology.InvalidTopologyException; -import org.apache.ambari.server.utils.CollectionPresentationUtils; +import org.apache.commons.lang.StringUtils; import org.easymock.EasyMockRule; import org.easymock.Mock; import org.easymock.MockType; @@ -86,7 +86,7 @@ public class BlueprintConfigurationProcessorTest { public EasyMockRule mocks = new EasyMockRule(this); @Mock(type = MockType.NICE) - private AmbariContext ambariConext; + private AmbariContext ambariContext; @Mock(type = MockType.NICE) private Blueprint bp; @@ -197,7 +197,7 @@ public class BlueprintConfigurationProcessorTest { @After public void tearDown() { -reset(bp, serviceInfo, stack, ambariConext); +reset(bp, serviceInfo, stack,
ambari git commit: AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 017b620ab -> 32565cd3c AMBARI-18108. [BLUEPRINT] hive.metastore.uris contains single entry when deployed with metastore HA enabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32565cd3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32565cd3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32565cd3 Branch: refs/heads/branch-2.4 Commit: 32565cd3c705dc48885064d454084deef4e44655 Parents: 017b620 Author: Attila Doroszlai Authored: Fri Oct 21 17:27:02 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 21 17:27:02 2016 +0200 -- .../BlueprintConfigurationProcessor.java| 7 +- .../BlueprintConfigurationProcessorTest.java| 103 --- 2 files changed, 68 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32565cd3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 4776dc6..d5e21b6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -2167,16 +2167,17 @@ public class BlueprintConfigurationProcessor { String[] keyValuePairs = origValue.split(","); boolean firstValue = true; for (String keyValuePair : keyValuePairs) { +keyValuePair = keyValuePair.trim(); if (!firstValue) { updatedResult.append(","); } else { firstValue = false; } -String key = keyValuePair.split("=")[0]; +String key = keyValuePair.split("=")[0].trim(); if (mapOfKeysToUpdaters.containsKey(key)) { String result = mapOfKeysToUpdaters.get(key).updateForClusterCreate( - key, keyValuePair.split("=")[1], properties, topology); + key, keyValuePair.split("=")[1].trim(), properties, topology); // append the internal property result, escape out any commas in the internal property, // this is required due to the specific syntax of templeton.hive.properties updatedResult.append(key); http://git-wip-us.apache.org/repos/asf/ambari/blob/32565cd3/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index 13927f8..7341478 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1,4 +1,4 @@ -/** +/* * 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 @@ -48,7 +48,7 @@ import org.apache.ambari.server.topology.HostGroup; import org.apache.ambari.server.topology.HostGroupImpl; import org.apache.ambari.server.topology.HostGroupInfo; import org.apache.ambari.server.topology.InvalidTopologyException; -import org.apache.ambari.server.utils.CollectionPresentationUtils; +import org.apache.commons.lang.StringUtils; import org.easymock.EasyMockRule; import org.easymock.Mock; import org.easymock.MockType; @@ -81,7 +81,7 @@ public class BlueprintConfigurationProcessorTest { public EasyMockRule mocks = new EasyMockRule(this); @Mock(type = MockType.NICE) - private AmbariContext ambariConext; + private AmbariContext ambariContext; @Mock(type = MockType.NICE) private Blueprint bp; @@ -192,7 +192,7 @@ public class BlueprintConfigurationProcessorTest { @After public void tearDown() { -reset(bp, serviceInfo, stack, ambariConext); +reset(bp, serviceInfo, stack,
ambari git commit: AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 b07c01fe0 -> 63bb78bc7 AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/63bb78bc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63bb78bc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63bb78bc Branch: refs/heads/branch-2.4 Commit: 63bb78bc744fcfc733d6081688eb38c31fed Parents: b07c01f Author: Balazs Bence Sari Authored: Mon Oct 17 10:59:39 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 17 11:06:06 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.5/kerberos.json | 15 .../MICROSOFT_R/8.0.5/metainfo.xml | 53 .../package/files/microsoft_r_serviceCheck.r| 28 -- .../8.0.5/package/scripts/microsoft_r.py| 38 - .../MICROSOFT_R/8.0.5/package/scripts/params.py | 31 --- .../8.0.5/package/scripts/params_linux.py | 79 - .../8.0.5/package/scripts/params_windows.py | 26 -- .../8.0.5/package/scripts/service_check.py | 89 .../MICROSOFT_R/8.0.5/role_command_order.json | 6 -- .../MICROSOFT_R/8.0.5/service_advisor.py| 73 .../MICROSOFT_R_SERVER/8.0.5/kerberos.json | 15 .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 53 .../files/microsoft_r_server_serviceCheck.r | 28 ++ .../8.0.5/package/scripts/microsoft_r_server.py | 38 + .../8.0.5/package/scripts/params.py | 31 +++ .../8.0.5/package/scripts/params_linux.py | 79 + .../8.0.5/package/scripts/params_windows.py | 26 ++ .../8.0.5/package/scripts/service_check.py | 89 .../8.0.5/role_command_order.json | 6 ++ .../MICROSOFT_R_SERVER/8.0.5/service_advisor.py | 73 .../MICROSOFT_R/8.0.5/metainfo.xml | 47 --- .../MICROSOFT_R/8.0.5/repos/repoinfo.xml| 40 - .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 47 +++ .../MICROSOFT_R_SERVER/8.0.5/repos/repoinfo.xml | 40 + .../src/main/resources/mpack.json | 10 +-- 26 files changed, 531 insertions(+), 531 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/63bb78bc/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 2c084d6..f5273fc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_NODE_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/63bb78bc/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json deleted file mode 100644 index 86fab2d..000 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "services": [ -{ - "name": "MICROSOFT_R", - "identities": [ -{ - "name": "/HDFS/NAMENODE/hdfs" -}, -{ - "name": "/smokeuser" -} - ] -} - ] -} http://git-wip-us.apache.org/repos/asf/ambari/blob/63bb78bc/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-servic
ambari git commit: AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 a5f8a9033 -> 472c6d293 AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/472c6d29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/472c6d29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/472c6d29 Branch: refs/heads/branch-2.5 Commit: 472c6d29322c25e73b3744c838b30ab81910ec0b Parents: a5f8a90 Author: Balazs Bence Sari Authored: Mon Oct 17 10:59:39 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 17 11:03:25 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.5/kerberos.json | 15 .../MICROSOFT_R/8.0.5/metainfo.xml | 53 .../package/files/microsoft_r_serviceCheck.r| 28 -- .../8.0.5/package/scripts/microsoft_r.py| 38 - .../MICROSOFT_R/8.0.5/package/scripts/params.py | 31 --- .../8.0.5/package/scripts/params_linux.py | 79 - .../8.0.5/package/scripts/params_windows.py | 26 -- .../8.0.5/package/scripts/service_check.py | 89 .../MICROSOFT_R/8.0.5/role_command_order.json | 6 -- .../MICROSOFT_R/8.0.5/service_advisor.py| 73 .../MICROSOFT_R_SERVER/8.0.5/kerberos.json | 15 .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 53 .../files/microsoft_r_server_serviceCheck.r | 28 ++ .../8.0.5/package/scripts/microsoft_r_server.py | 38 + .../8.0.5/package/scripts/params.py | 31 +++ .../8.0.5/package/scripts/params_linux.py | 79 + .../8.0.5/package/scripts/params_windows.py | 26 ++ .../8.0.5/package/scripts/service_check.py | 89 .../8.0.5/role_command_order.json | 6 ++ .../MICROSOFT_R_SERVER/8.0.5/service_advisor.py | 73 .../MICROSOFT_R/8.0.5/metainfo.xml | 47 --- .../MICROSOFT_R/8.0.5/repos/repoinfo.xml| 40 - .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 47 +++ .../MICROSOFT_R_SERVER/8.0.5/repos/repoinfo.xml | 40 + .../src/main/resources/mpack.json | 10 +-- 26 files changed, 531 insertions(+), 531 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/472c6d29/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 397c22d..5dce8e0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_NODE_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/472c6d29/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json deleted file mode 100644 index 86fab2d..000 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "services": [ -{ - "name": "MICROSOFT_R", - "identities": [ -{ - "name": "/HDFS/NAMENODE/hdfs" -}, -{ - "name": "/smokeuser" -} - ] -} - ] -} http://git-wip-us.apache.org/repos/asf/ambari/blob/472c6d29/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-servic
ambari git commit: AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk e8544ba49 -> 61442de4c AMBARI-18597. Rename service to "Microsoft R Server" and component to "Microsoft R Node Client". (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/61442de4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/61442de4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/61442de4 Branch: refs/heads/trunk Commit: 61442de4c6d8690595a5b331cda3890b9e26b5b9 Parents: e8544ba Author: Balazs Bence Sari Authored: Mon Oct 17 10:59:39 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 17 10:59:39 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.5/kerberos.json | 15 .../MICROSOFT_R/8.0.5/metainfo.xml | 53 .../package/files/microsoft_r_serviceCheck.r| 28 -- .../8.0.5/package/scripts/microsoft_r.py| 38 - .../MICROSOFT_R/8.0.5/package/scripts/params.py | 31 --- .../8.0.5/package/scripts/params_linux.py | 79 - .../8.0.5/package/scripts/params_windows.py | 26 -- .../8.0.5/package/scripts/service_check.py | 89 .../MICROSOFT_R/8.0.5/role_command_order.json | 6 -- .../MICROSOFT_R/8.0.5/service_advisor.py| 73 .../MICROSOFT_R_SERVER/8.0.5/kerberos.json | 15 .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 53 .../files/microsoft_r_server_serviceCheck.r | 28 ++ .../8.0.5/package/scripts/microsoft_r_server.py | 38 + .../8.0.5/package/scripts/params.py | 31 +++ .../8.0.5/package/scripts/params_linux.py | 79 + .../8.0.5/package/scripts/params_windows.py | 26 ++ .../8.0.5/package/scripts/service_check.py | 89 .../8.0.5/role_command_order.json | 6 ++ .../MICROSOFT_R_SERVER/8.0.5/service_advisor.py | 73 .../MICROSOFT_R/8.0.5/metainfo.xml | 47 --- .../MICROSOFT_R/8.0.5/repos/repoinfo.xml| 40 - .../MICROSOFT_R_SERVER/8.0.5/metainfo.xml | 47 +++ .../MICROSOFT_R_SERVER/8.0.5/repos/repoinfo.xml | 40 + .../src/main/resources/mpack.json | 10 +-- 26 files changed, 531 insertions(+), 531 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/61442de4/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 397c22d..5dce8e0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_NODE_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/61442de4/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json deleted file mode 100644 index 86fab2d..000 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/kerberos.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "services": [ -{ - "name": "MICROSOFT_R", - "identities": [ -{ - "name": "/HDFS/NAMENODE/hdfs" -}, -{ - "name": "/smokeuser" -} - ] -} - ] -} http://git-wip-us.apache.org/repos/asf/ambari/blob/61442de4/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_
ambari git commit: AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 b6eae9deb -> 559a12030 AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/559a1203 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/559a1203 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/559a1203 Branch: refs/heads/branch-2.4 Commit: 559a12030ff41ee3f14b929a7e230994d2c6bcad Parents: b6eae9d Author: Attila Doroszlai Authored: Fri Oct 14 11:15:27 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 14 11:27:29 2016 +0200 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | 2 +- .../test/python/stacks/2.0.6/OOZIE/test_oozie_server.py | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/559a1203/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py index 16991c8..de98852 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py @@ -24,7 +24,7 @@ import os from oozie import copy_atlas_hive_hook_to_dfs_share_lib # Resource Managemente Imports -from resource_management.core import sudo +from resource_management.core import shell, sudo from resource_management import * from resource_management.core.shell import as_user from resource_management.core.logger import Logger http://git-wip-us.apache.org/repos/asf/ambari/blob/559a1203/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py index 2a512f4..bfa6d45 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py @@ -510,6 +510,9 @@ class TestOozieServer(RMFTestCase): @patch("os.path.isfile") @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) def test_start_default(self, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + + def _test_start(self, isfile_mock, call_mocks): isfile_mock.return_value = True call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added")) self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", @@ -568,6 +571,13 @@ class TestOozieServer(RMFTestCase): ) self.assertNoMoreResources() + @patch.object(WebHDFSUtil, 'is_webhdfs_available', return_value=False) + @patch.object(shell, "call") + @patch("os.path.isfile") + @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) + def test_start_no_webhdfs(self, webhdfsutil_mock, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + def test_stop_default(self): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", classname = "OozieServer",
ambari git commit: AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2b35c980c -> 78f43507f AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/78f43507 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78f43507 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78f43507 Branch: refs/heads/trunk Commit: 78f43507f883f527f41c6a3ab71ff40bbd433647 Parents: 2b35c98 Author: Attila Doroszlai Authored: Fri Oct 14 11:15:27 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 14 11:15:27 2016 +0200 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | 2 +- .../test/python/stacks/2.0.6/OOZIE/test_oozie_server.py | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/78f43507/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py index a5bd59d..5fcbf45 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py @@ -24,7 +24,7 @@ import os from oozie import copy_atlas_hive_hook_to_dfs_share_lib # Resource Managemente Imports -from resource_management.core import sudo +from resource_management.core import shell, sudo from resource_management.core.shell import as_user from resource_management.core.logger import Logger from resource_management.core.resources.service import Service http://git-wip-us.apache.org/repos/asf/ambari/blob/78f43507/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py index 2a512f4..bfa6d45 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py @@ -510,6 +510,9 @@ class TestOozieServer(RMFTestCase): @patch("os.path.isfile") @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) def test_start_default(self, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + + def _test_start(self, isfile_mock, call_mocks): isfile_mock.return_value = True call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added")) self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", @@ -568,6 +571,13 @@ class TestOozieServer(RMFTestCase): ) self.assertNoMoreResources() + @patch.object(WebHDFSUtil, 'is_webhdfs_available', return_value=False) + @patch.object(shell, "call") + @patch("os.path.isfile") + @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) + def test_start_no_webhdfs(self, webhdfsutil_mock, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + def test_stop_default(self): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", classname = "OozieServer",
ambari git commit: AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 eb982a0eb -> 827fc5bc2 AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/827fc5bc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/827fc5bc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/827fc5bc Branch: refs/heads/branch-2.5 Commit: 827fc5bc2c4e7d0b56ed9b493d0a88cde9f7c7a9 Parents: eb982a0 Author: Attila Doroszlai Authored: Fri Oct 14 11:15:27 2016 +0200 Committer: Toader, Sebastian Committed: Fri Oct 14 11:25:11 2016 +0200 -- .../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | 2 +- .../test/python/stacks/2.0.6/OOZIE/test_oozie_server.py | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/827fc5bc/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py index 562d0e3..7b15a63 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py @@ -24,7 +24,7 @@ import os from oozie import copy_atlas_hive_hook_to_dfs_share_lib # Resource Managemente Imports -from resource_management.core import sudo +from resource_management.core import shell, sudo from resource_management import * from resource_management.core.shell import as_user from resource_management.core.logger import Logger http://git-wip-us.apache.org/repos/asf/ambari/blob/827fc5bc/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py index 2a512f4..bfa6d45 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py @@ -510,6 +510,9 @@ class TestOozieServer(RMFTestCase): @patch("os.path.isfile") @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) def test_start_default(self, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + + def _test_start(self, isfile_mock, call_mocks): isfile_mock.return_value = True call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added")) self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", @@ -568,6 +571,13 @@ class TestOozieServer(RMFTestCase): ) self.assertNoMoreResources() + @patch.object(WebHDFSUtil, 'is_webhdfs_available', return_value=False) + @patch.object(shell, "call") + @patch("os.path.isfile") + @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True])) + def test_start_no_webhdfs(self, webhdfsutil_mock, isfile_mock, call_mocks): +self._test_start(isfile_mock, call_mocks) + def test_stop_default(self): self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py", classname = "OozieServer",
ambari git commit: AMBARI-18302.Desired state of client component should not be changed in case configuration changes are applied through a "Restart.(Laszlo Puskas via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 a0693e001 -> 551958219 AMBARI-18302.Desired state of client component should not be changed in case configuration changes are applied through a "Restart.(Laszlo Puskas via stoader)" Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55195821 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55195821 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55195821 Branch: refs/heads/branch-2.5 Commit: 551958219f170e31f951aaf8fffbeecf37ed0b18 Parents: a0693e0 Author: Toader, Sebastian Authored: Wed Sep 7 15:18:25 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 10 17:13:33 2016 +0200 -- .../AmbariCustomCommandExecutionHelper.java | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/55195821/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java index 8c8ae10..a671f0c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java @@ -465,15 +465,20 @@ public class AmbariCustomCommandExecutionHelper { private void applyCustomCommandBackendLogic(Cluster cluster, String serviceName, String componentName, String commandName, String hostname) throws AmbariException { switch (commandName) { case "RESTART": -ServiceComponentHost serviceComponentHost = cluster.getService( - serviceName).getServiceComponent(componentName).getServiceComponentHost(hostname); - +ServiceComponent serviceComponent = cluster.getService(serviceName).getServiceComponent(componentName); +ServiceComponentHost serviceComponentHost = serviceComponent.getServiceComponentHost(hostname); State currentDesiredState = serviceComponentHost.getDesiredState(); -if (currentDesiredState != State.STARTED) { - LOG.info("Updating desired state to {} on RESTART for {}/{} because it was {}", - State.STARTED, serviceName, componentName, currentDesiredState); - serviceComponentHost.setDesiredState(State.STARTED); +if( !serviceComponent.isClientComponent()) { + if (currentDesiredState != State.STARTED) { +LOG.info("Updating desired state to {} on RESTART for {}/{} because it was {}", +State.STARTED, serviceName, componentName, currentDesiredState); + +serviceComponentHost.setDesiredState(State.STARTED); + } +} else { + LOG.debug("Desired state for client components should not be updated on RESTART. Service/Component {}/{}", + serviceName, componentName); } break;
ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 243cafa89 -> 0e01a3554 AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e01a355 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e01a355 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e01a355 Branch: refs/heads/branch-2.4 Commit: 0e01a3554edea119acf3b68008631a334195b685 Parents: 243cafa Author: Toader, Sebastian Authored: Mon Oct 10 16:06:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 10 16:14:26 2016 +0200 -- .../AmbariManagementControllerImpl.java | 2 +- .../controller/ServiceComponentHostRequest.java | 4 +- .../internal/HostComponentResourceProvider.java | 44 ++-- 3 files changed, 27 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 3e4de3d..28914db 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -2447,7 +2447,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if ((changedServices == null || changedServices.isEmpty()) && (changedComps == null || changedComps.isEmpty()) && (changedScHosts == null || changedScHosts.isEmpty())) { - LOG.debug("Created 0 stages"); + LOG.info("Created 0 stages"); return requestStages; } http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java index 73cedb4..4a07804 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java @@ -182,7 +182,9 @@ public class ServiceComponentHostRequest { .append(", state=").append(state) .append(", desiredStackId=").append(desiredStackId) .append(", staleConfig=").append(staleConfig) - .append(", adminState=").append(adminState).append("}"); + .append(", adminState=").append(adminState) + .append(", maintenanceState=").append(maintenanceState) + .append("}"); return sb.toString(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java index df2b476..bc3f632 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java @@ -575,7 +575,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro } if (newState == null) { -logComponentInfo("Nothing to do for new updateServiceComponentHost", request, oldState, null); +LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for new updateServiceComponentHost", request, oldState, null)); continue; } @@ -589,7 +589,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro if (sc.isClientComponent() && newState == State.STARTED && !requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) { ignoredScHosts.add(sch); -logComponentInfo("Ignoring ServiceComponentHost", request, sch.getSta
ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 46a528ffb -> 9d6d67852 AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d6d6785 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d6d6785 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d6d6785 Branch: refs/heads/branch-2.5 Commit: 9d6d6785227dfc8baf758e842413a12ef626a3e8 Parents: 46a528f Author: Toader, Sebastian Authored: Mon Oct 10 16:06:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 10 16:09:40 2016 +0200 -- .../AmbariManagementControllerImpl.java | 2 +- .../controller/ServiceComponentHostRequest.java | 4 +- .../internal/HostComponentResourceProvider.java | 44 ++-- 3 files changed, 27 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index c285c3d..cd02223 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -2452,7 +2452,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if ((changedServices == null || changedServices.isEmpty()) && (changedComps == null || changedComps.isEmpty()) && (changedScHosts == null || changedScHosts.isEmpty())) { - LOG.debug("Created 0 stages"); + LOG.info("Created 0 stages"); return requestStages; } http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java index 73cedb4..4a07804 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java @@ -182,7 +182,9 @@ public class ServiceComponentHostRequest { .append(", state=").append(state) .append(", desiredStackId=").append(desiredStackId) .append(", staleConfig=").append(staleConfig) - .append(", adminState=").append(adminState).append("}"); + .append(", adminState=").append(adminState) + .append(", maintenanceState=").append(maintenanceState) + .append("}"); return sb.toString(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java index 85a4949..4f279c8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java @@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro } if (newState == null) { -logComponentInfo("Nothing to do for new updateServiceComponentHost", request, oldState, null); +LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for new updateServiceComponentHost", request, oldState, null)); continue; } @@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro if (sc.isClientComponent() && newState == State.STARTED && !requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) { ignoredScHosts.add(sch); -logComponentInfo("Ignoring ServiceComponentHost", request, sch.getSta
ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk 58afcf93d -> 2d1d5f9b0 AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2d1d5f9b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d1d5f9b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d1d5f9b Branch: refs/heads/trunk Commit: 2d1d5f9b00e39a137c5aea8341436f408975cf82 Parents: 58afcf9 Author: Toader, Sebastian Authored: Mon Oct 10 16:06:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 10 16:06:55 2016 +0200 -- .../AmbariManagementControllerImpl.java | 2 +- .../controller/ServiceComponentHostRequest.java | 4 +- .../internal/HostComponentResourceProvider.java | 44 ++-- 3 files changed, 27 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 1fc9dbf..ef4fc33 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -2474,7 +2474,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle if ((changedServices == null || changedServices.isEmpty()) && (changedComps == null || changedComps.isEmpty()) && (changedScHosts == null || changedScHosts.isEmpty())) { - LOG.debug("Created 0 stages"); + LOG.info("Created 0 stages"); return requestStages; } http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java index 73cedb4..4a07804 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java @@ -182,7 +182,9 @@ public class ServiceComponentHostRequest { .append(", state=").append(state) .append(", desiredStackId=").append(desiredStackId) .append(", staleConfig=").append(staleConfig) - .append(", adminState=").append(adminState).append("}"); + .append(", adminState=").append(adminState) + .append(", maintenanceState=").append(maintenanceState) + .append("}"); return sb.toString(); } http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java index 85a4949..4f279c8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java @@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro } if (newState == null) { -logComponentInfo("Nothing to do for new updateServiceComponentHost", request, oldState, null); +LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for new updateServiceComponentHost", request, oldState, null)); continue; } @@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro if (sc.isClientComponent() && newState == State.STARTED && !requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) { ignoredScHosts.add(sch); -logComponentInfo("Ignoring ServiceComponentHost", request, sch.getState(), n
ambari git commit: AMBARI-15538. Support service-specific repo for add-on services (part2). (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 5b9bc932e -> bac68f745 AMBARI-15538. Support service-specific repo for add-on services (part2). (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bac68f74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bac68f74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bac68f74 Branch: refs/heads/branch-2.4 Commit: bac68f74591306860fb8e4cfa19a2ae75431f4b3 Parents: 5b9bc93 Author: Balazs Bence Sari Authored: Mon Oct 3 11:15:38 2016 +0200 Committer: Toader, Sebastian Committed: Mon Oct 3 11:15:38 2016 +0200 -- .../8.0.0/package/scripts/microsoft_r.py| 22 +++- 1 file changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bac68f74/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py index 61ea96b..382bd0f 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py @@ -19,30 +19,24 @@ limitations under the License. """ from resource_management.libraries.script import Script from resource_management.core.logger import Logger -from resource_management.core.source import DownloadSource -from resource_management.core.resources import File, Package +from resource_management.core.resources import Package -rpm_location = 'http://104.196.87.250/msft-r/8.1/' -rpms = ['microsoft-r-server-mro-8.0.rpm', -'microsoft-r-server-intel-mkl-8.0.rpm', -'microsoft-r-server-packages-8.0.rpm', -'microsoft-r-server-hadoop-8.0.rpm'] + +rpms = ['microsoft-r-server-mro-8.0', +'microsoft-r-server-intel-mkl-8.0', +'microsoft-r-server-packages-8.0', +'microsoft-r-server-hadoop-8.0'] class MicrosoftR(Script): + def install(self, env): Logger.info('Installing R Server Client...') tmp_dir = Script.tmp_dir Logger.debug('Using temp dir: {0}'.format(tmp_dir)) -Logger.info("Will download and install the following rpm's from {0}: {1}".format(rpm_location, rpms)) for rpm in rpms: - Logger.info('Downloading {0}'.format(rpm)) - rpmFile = '{0}/{1}'.format(tmp_dir, rpm) - File(rpmFile, \ - content = DownloadSource(rpm_location + rpm), \ - mode = 0644) Logger.info('Installing {0}'.format(rpm)) - Package(rpmFile) + Package(rpm) Logger.info('Installed R Server')
ambari git commit: AMBARI-18401. Allow running a subset of Python unit tests. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2700bd125 -> 39858ccaf AMBARI-18401. Allow running a subset of Python unit tests. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/39858cca Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39858cca Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39858cca Branch: refs/heads/trunk Commit: 39858ccafcee6c49bba21d7385d7129d71dc8851 Parents: 2700bd1 Author: Attila Doroszlai Authored: Wed Sep 28 13:58:32 2016 +0200 Committer: Toader, Sebastian Committed: Wed Sep 28 13:58:32 2016 +0200 -- ambari-server/pom.xml | 2 ++ ambari-server/src/test/python/unitTests.py | 25 ++--- 2 files changed, 12 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/39858cca/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 354b6cb..d507b82 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -28,6 +28,7 @@ amd64 false +[Tt]est*.py http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.1.0 http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json /usr/lib/ambari-server/lib/ambari_commons @@ -621,6 +622,7 @@ unitTests.py ${custom.tests} +${python.test.mask} ${path.python.1}${pathsep}$PYTHONPATH http://git-wip-us.apache.org/repos/asf/ambari/blob/39858cca/ambari-server/src/test/python/unitTests.py -- diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py index 037b6a5..7941ed3 100644 --- a/ambari-server/src/test/python/unitTests.py +++ b/ambari-server/src/test/python/unitTests.py @@ -86,17 +86,12 @@ def get_stack_name(): def get_stack_name(): return "HDP" -def stack_test_executor(base_folder, service, stack, custom_tests, executor_result): +def stack_test_executor(base_folder, service, stack, test_mask, executor_result): """ Stack tests executor. Must be executed in separate process to prevent module name conflicts in different stacks. """ #extract stack scripts folders - if custom_tests: -test_mask = CUSTOM_TEST_MASK - else: -test_mask = TEST_MASK - server_src_dir = get_parent_path(base_folder, 'src') script_folders = set() @@ -152,10 +147,14 @@ def stack_test_executor(base_folder, service, stack, custom_tests, executor_resu def main(): if not os.path.exists(newtmpdirpath): os.makedirs(newtmpdirpath) - custom_tests = False - if len(sys.argv) > 1: -if sys.argv[1] == "true": - custom_tests = True + + if len(sys.argv) > 1 and sys.argv[1] == "true": # handle custom_tests for backward-compatibility +test_mask = CUSTOM_TEST_MASK + elif len(sys.argv) > 2: +test_mask = sys.argv[2] + else: +test_mask = TEST_MASK + pwd = os.path.abspath(os.path.dirname(__file__)) ambari_server_folder = get_parent_path(pwd, 'ambari-server') @@ -212,7 +211,7 @@ def main(): args=(variant['directory'], variant['service'], variant['stack'], -custom_tests, +test_mask, executor_result) ) process.start() @@ -238,10 +237,6 @@ def main(): #run base ambari-server tests sys.stderr.write("Running tests for ambari-server\n") - if custom_tests: -test_mask = CUSTOM_TEST_MASK - else: -test_mask = TEST_MASK test_dirs = [ (os.path.join(pwd, 'custom_actions'), "\nRunning tests for custom actions\n"),
ambari git commit: AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 154870f3a -> 20d488742 AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/20d48874 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20d48874 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20d48874 Branch: refs/heads/branch-2.4 Commit: 20d4887429277e9d2d95429dbb9d61c8dd249a04 Parents: 154870f Author: Balazs Bence Sari Authored: Wed Sep 28 13:42:59 2016 +0200 Committer: Toader, Sebastian Committed: Wed Sep 28 13:45:41 2016 +0200 -- .../stack/UpdateActiveRepoVersionOnStartup.java | 9 +-- .../UpdateActiveRepoVersionOnStartupTest.java | 28 +--- 2 files changed, 26 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/20d48874/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java index 1413c66..8a32a42 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java @@ -94,9 +94,14 @@ public class UpdateActiveRepoVersionOnStartup { LOG.info("Updating existing repo versions for cluster {} on stack {}-{}", cluster.getClusterName(), stack.getName(), stack.getVersion()); ClusterVersionEntity clusterVersion = clusterVersionDao.findByClusterAndStateCurrent(cluster.getClusterName()); +if (null != clusterVersion) { RepositoryVersionEntity repoVersion = clusterVersion.getRepositoryVersion(); -updateRepoVersion(stack, repoVersion); -repositoryVersionDao.merge(repoVersion); + updateRepoVersion(stack, repoVersion); + repositoryVersionDao.merge(repoVersion); +} +else { + LOG.warn("Missing cluster version for cluster {}", cluster.getClusterName()); +} } } catch(Exception ex) { http://git-wip-us.apache.org/repos/asf/ambari/blob/20d48874/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java index 9c54a88..24ab0e8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java @@ -37,7 +37,6 @@ import org.apache.ambari.server.state.RepositoryInfo; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; import com.google.common.base.Charsets; @@ -61,10 +60,17 @@ public class UpdateActiveRepoVersionOnStartupTest { @Test public void addAServiceRepoToExistingRepoVersion() throws Exception { +init(true); activeRepoUpdater.process(); verifyRepoIsAdded(); } + @Test + public void missingClusterVersionShouldNotCauseException() throws Exception { +init(false); +activeRepoUpdater.process(); + } + /** * Verifies if the add-on service repo is added to the repo version entity, both json and xml representations. * @@ -84,8 +90,7 @@ public class UpdateActiveRepoVersionOnStartupTest { Assert.assertTrue(ADD_ON_REPO_ID + " is add-on repo was not added to JSON representation", serviceRepoAddedToJson); } - @Before - public void init() throws Exception { + public void init(boolean addClusterVersion) throws Exception { ClusterDAO clusterDao = mock(ClusterDAO.class); ClusterVersionDAO clusterVersionDAO = mock(ClusterVersionDAO.class); repositoryVersionDao = mock(RepositoryVersionDAO.class); @@ -125,17 +130,22 @@ public class UpdateActiveRepoVersionOnStartupTest { } }; Injector injector = Guice.createInjector(testModule); -repoVersion = new RepositoryVersionEntity(); -repoVersion.setStack(stackEntity); - repoVersion.setOperatingSystems(resourceAsString("org/apache/ambari/server/stack/UpdateActiveRepo
ambari git commit: AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 16af8bc0d -> 1f0c25493 AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1f0c2549 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1f0c2549 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1f0c2549 Branch: refs/heads/branch-2.5 Commit: 1f0c25493cadc545cba17e2d597b8cfc8efa8737 Parents: 16af8bc Author: Balazs Bence Sari Authored: Wed Sep 28 13:42:59 2016 +0200 Committer: Toader, Sebastian Committed: Wed Sep 28 13:44:12 2016 +0200 -- .../stack/UpdateActiveRepoVersionOnStartup.java | 9 +-- .../UpdateActiveRepoVersionOnStartupTest.java | 28 +--- 2 files changed, 26 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1f0c2549/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java index 1413c66..8a32a42 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java @@ -94,9 +94,14 @@ public class UpdateActiveRepoVersionOnStartup { LOG.info("Updating existing repo versions for cluster {} on stack {}-{}", cluster.getClusterName(), stack.getName(), stack.getVersion()); ClusterVersionEntity clusterVersion = clusterVersionDao.findByClusterAndStateCurrent(cluster.getClusterName()); +if (null != clusterVersion) { RepositoryVersionEntity repoVersion = clusterVersion.getRepositoryVersion(); -updateRepoVersion(stack, repoVersion); -repositoryVersionDao.merge(repoVersion); + updateRepoVersion(stack, repoVersion); + repositoryVersionDao.merge(repoVersion); +} +else { + LOG.warn("Missing cluster version for cluster {}", cluster.getClusterName()); +} } } catch(Exception ex) { http://git-wip-us.apache.org/repos/asf/ambari/blob/1f0c2549/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java index 9c54a88..24ab0e8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java @@ -37,7 +37,6 @@ import org.apache.ambari.server.state.RepositoryInfo; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; import com.google.common.base.Charsets; @@ -61,10 +60,17 @@ public class UpdateActiveRepoVersionOnStartupTest { @Test public void addAServiceRepoToExistingRepoVersion() throws Exception { +init(true); activeRepoUpdater.process(); verifyRepoIsAdded(); } + @Test + public void missingClusterVersionShouldNotCauseException() throws Exception { +init(false); +activeRepoUpdater.process(); + } + /** * Verifies if the add-on service repo is added to the repo version entity, both json and xml representations. * @@ -84,8 +90,7 @@ public class UpdateActiveRepoVersionOnStartupTest { Assert.assertTrue(ADD_ON_REPO_ID + " is add-on repo was not added to JSON representation", serviceRepoAddedToJson); } - @Before - public void init() throws Exception { + public void init(boolean addClusterVersion) throws Exception { ClusterDAO clusterDao = mock(ClusterDAO.class); ClusterVersionDAO clusterVersionDAO = mock(ClusterVersionDAO.class); repositoryVersionDao = mock(RepositoryVersionDAO.class); @@ -125,17 +130,22 @@ public class UpdateActiveRepoVersionOnStartupTest { } }; Injector injector = Guice.createInjector(testModule); -repoVersion = new RepositoryVersionEntity(); -repoVersion.setStack(stackEntity); - repoVersion.setOperatingSystems(resourceAsString("org/apache/ambari/server/stack/UpdateActiveRepo
ambari git commit: AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk a0fff8472 -> 2700bd125 AMBARI-18467. Ambari server does not come up after restart if cluster install fails. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2700bd12 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2700bd12 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2700bd12 Branch: refs/heads/trunk Commit: 2700bd125f2f9bbae2ebfcc0831ec881097b4cff Parents: a0fff84 Author: Balazs Bence Sari Authored: Wed Sep 28 13:42:59 2016 +0200 Committer: Toader, Sebastian Committed: Wed Sep 28 13:42:59 2016 +0200 -- .../stack/UpdateActiveRepoVersionOnStartup.java | 9 +-- .../UpdateActiveRepoVersionOnStartupTest.java | 28 +--- 2 files changed, 26 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2700bd12/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java index 1413c66..8a32a42 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java @@ -94,9 +94,14 @@ public class UpdateActiveRepoVersionOnStartup { LOG.info("Updating existing repo versions for cluster {} on stack {}-{}", cluster.getClusterName(), stack.getName(), stack.getVersion()); ClusterVersionEntity clusterVersion = clusterVersionDao.findByClusterAndStateCurrent(cluster.getClusterName()); +if (null != clusterVersion) { RepositoryVersionEntity repoVersion = clusterVersion.getRepositoryVersion(); -updateRepoVersion(stack, repoVersion); -repositoryVersionDao.merge(repoVersion); + updateRepoVersion(stack, repoVersion); + repositoryVersionDao.merge(repoVersion); +} +else { + LOG.warn("Missing cluster version for cluster {}", cluster.getClusterName()); +} } } catch(Exception ex) { http://git-wip-us.apache.org/repos/asf/ambari/blob/2700bd12/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java index 9c54a88..24ab0e8 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java @@ -37,7 +37,6 @@ import org.apache.ambari.server.state.RepositoryInfo; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; import com.google.common.base.Charsets; @@ -61,10 +60,17 @@ public class UpdateActiveRepoVersionOnStartupTest { @Test public void addAServiceRepoToExistingRepoVersion() throws Exception { +init(true); activeRepoUpdater.process(); verifyRepoIsAdded(); } + @Test + public void missingClusterVersionShouldNotCauseException() throws Exception { +init(false); +activeRepoUpdater.process(); + } + /** * Verifies if the add-on service repo is added to the repo version entity, both json and xml representations. * @@ -84,8 +90,7 @@ public class UpdateActiveRepoVersionOnStartupTest { Assert.assertTrue(ADD_ON_REPO_ID + " is add-on repo was not added to JSON representation", serviceRepoAddedToJson); } - @Before - public void init() throws Exception { + public void init(boolean addClusterVersion) throws Exception { ClusterDAO clusterDao = mock(ClusterDAO.class); ClusterVersionDAO clusterVersionDAO = mock(ClusterVersionDAO.class); repositoryVersionDao = mock(RepositoryVersionDAO.class); @@ -125,17 +130,22 @@ public class UpdateActiveRepoVersionOnStartupTest { } }; Injector injector = Guice.createInjector(testModule); -repoVersion = new RepositoryVersionEntity(); -repoVersion.setStack(stackEntity); - repoVersion.setOperatingSystems(resourceAsString("org/apache/ambari/server/stack/UpdateActiveRepo
ambari git commit: AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 2dfce2214 -> 154870f3a AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/154870f3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/154870f3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/154870f3 Branch: refs/heads/branch-2.4 Commit: 154870f3aa80da994318a4ccded7e0212e641d1f Parents: 2dfce22 Author: Attila Doroszlai Authored: Tue Sep 27 11:20:06 2016 +0200 Committer: Toader, Sebastian Committed: Tue Sep 27 11:24:10 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.0/metainfo.xml | 4 ++-- .../MICROSOFT_R/8.0.0/service_advisor.py| 22 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/154870f3/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 2427ddf..2c084d6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/154870f3/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml index 6998efc..709929e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml @@ -27,8 +27,8 @@ - MICROSOFT_R_CLIENT - Microsoft R Client + MICROSOFT_R_SERVER_CLIENT + Microsoft R Server Client CLIENT 1+ http://git-wip-us.apache.org/repos/asf/ambari/blob/154870f3/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py index 891d2c9..58f0dbe 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py @@ -37,19 +37,19 @@ except Exception as e: class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): def colocateService(self, hostsComponentsMap, serviceComponents): -# colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs -rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_CLIENT"] +# colocate R_SERVER_CLIENT with NODEMANAGERs and YARN_CLIENTs +rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_SERVER_CLIENT"] traceback.print_tb(None) rClientComponent = rClientComponent[0] if not self.isComponentHostsPopulated(rClientComponent): for hostName in hostsComponentsMap.keys(): hostComponents = hostsComponentsMap[hostName] if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents) \ -and {"name&quo
ambari git commit: AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 52beda11e -> b170b136b AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b170b136 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b170b136 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b170b136 Branch: refs/heads/branch-2.5 Commit: b170b136b569561b8c75b9beb5a6c60eda4ba06f Parents: 52beda1 Author: Attila Doroszlai Authored: Tue Sep 27 11:20:06 2016 +0200 Committer: Toader, Sebastian Committed: Tue Sep 27 11:22:32 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.0/metainfo.xml | 4 ++-- .../MICROSOFT_R/8.0.0/service_advisor.py| 22 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b170b136/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 2182fd1..397c22d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/b170b136/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml index 6998efc..709929e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml @@ -27,8 +27,8 @@ - MICROSOFT_R_CLIENT - Microsoft R Client + MICROSOFT_R_SERVER_CLIENT + Microsoft R Server Client CLIENT 1+ http://git-wip-us.apache.org/repos/asf/ambari/blob/b170b136/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py index 891d2c9..58f0dbe 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py @@ -37,19 +37,19 @@ except Exception as e: class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): def colocateService(self, hostsComponentsMap, serviceComponents): -# colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs -rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_CLIENT"] +# colocate R_SERVER_CLIENT with NODEMANAGERs and YARN_CLIENTs +rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_SERVER_CLIENT"] traceback.print_tb(None) rClientComponent = rClientComponent[0] if not self.isComponentHostsPopulated(rClientComponent): for hostName in hostsComponentsMap.keys(): hostComponents = hostsComponentsMap[hostName] if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents) \ -and {"name&quo
ambari git commit: AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 5af6d547f -> 6d3522825 AMBARI-18466. Component should be renamed to "Microsoft R Server Client". (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d352282 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d352282 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d352282 Branch: refs/heads/trunk Commit: 6d3522825b962e926fe5e244b706a619c74b0116 Parents: 5af6d54 Author: Attila Doroszlai Authored: Tue Sep 27 11:20:06 2016 +0200 Committer: Toader, Sebastian Committed: Tue Sep 27 11:20:06 2016 +0200 -- .../scripts/shared_initialization.py| 2 +- .../MICROSOFT_R/8.0.0/metainfo.xml | 4 ++-- .../MICROSOFT_R/8.0.0/service_advisor.py| 22 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py index 2182fd1..397c22d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py @@ -177,7 +177,7 @@ def create_dirs(): def create_microsoft_r_dir(): import params - if 'MICROSOFT_R_CLIENT' in params.component_list and params.default_fs: + if 'MICROSOFT_R_SERVER_CLIENT' in params.component_list and params.default_fs: directory = '/user/RevoShare' try: params.HdfsResource(directory, http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml index 6998efc..709929e 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml @@ -27,8 +27,8 @@ - MICROSOFT_R_CLIENT - Microsoft R Client + MICROSOFT_R_SERVER_CLIENT + Microsoft R Server Client CLIENT 1+ http://git-wip-us.apache.org/repos/asf/ambari/blob/6d352282/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py index 891d2c9..58f0dbe 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py @@ -37,19 +37,19 @@ except Exception as e: class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): def colocateService(self, hostsComponentsMap, serviceComponents): -# colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs -rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_CLIENT"] +# colocate R_SERVER_CLIENT with NODEMANAGERs and YARN_CLIENTs +rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_SERVER_CLIENT"] traceback.print_tb(None) rClientComponent = rClientComponent[0] if not self.isComponentHostsPopulated(rClientComponent): for hostName in hostsComponentsMap.keys(): hostComponents = hostsComponentsMap[hostName] if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents) \ -and {"name&quo
[1/4] ambari git commit: AMBARI-17891. Provide stack-advisor support for Microsoft-R service. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.4 57116b774 -> cd1ffc956 AMBARI-17891. Provide stack-advisor support for Microsoft-R service. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bbb70fe1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bbb70fe1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bbb70fe1 Branch: refs/heads/branch-2.4 Commit: bbb70fe10bf5b211be8bc5b5613aa729ea79817c Parents: 57116b7 Author: Attila Doroszlai Authored: Wed Sep 7 16:44:21 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 17:20:20 2016 +0200 -- .../MICROSOFT_R/8.0.0/service_advisor.py| 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bbb70fe1/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py index 554be2d..891d2c9 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py @@ -34,14 +34,14 @@ except Exception as e: traceback.print_exc() print "Failed to load parent" -class HDP23MICROSOFT_RServiceAdvisor(service_advisor.ServiceAdvisor): +class MICROSOFT_R800ServiceAdvisor(service_advisor.ServiceAdvisor): - def colocateService(self, stackAdvisor, hostsComponentsMap, serviceComponents): + def colocateService(self, hostsComponentsMap, serviceComponents): # colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "MICROSOFT_R_CLIENT"] traceback.print_tb(None) rClientComponent = rClientComponent[0] -if not stackAdvisor.isComponentHostsPopulated(rClientComponent): +if not self.isComponentHostsPopulated(rClientComponent): for hostName in hostsComponentsMap.keys(): hostComponents = hostsComponentsMap[hostName] if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents) \ @@ -51,18 +51,18 @@ class HDP23MICROSOFT_RServiceAdvisor(service_advisor.ServiceAdvisor): and {"name": "MICROSOFT_R_CLIENT"} in hostComponents: hostsComponentsMap[hostName].remove({"name": "MICROSOFT_R_CLIENT"}) - def getComponentLayoutValidations(self, stackAdvisor, services, hosts): + def getServiceComponentLayoutValidations(self, services, hosts): componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] hostsList = [host["Hosts"]["host_name"] for host in hosts["items"]] hostsCount = len(hostsList) rClientHosts = self.getHosts(componentsList, "MICROSOFT_R_CLIENT") -expectedrClientHosts = set(self.getHosts(componentsList, "NODEMANAGER") + self.getHosts(componentsList, "YARN_CLIENT")) +expectedrClientHosts = set(self.getHosts(componentsList, "NODEMANAGER")) | set(self.getHosts(componentsList, "YARN_CLIENT")) items = [] -# Generate WARNING if any PXF is not colocated with NAMENODE or DATANODE +# Generate WARNING if any R_CLIENT is not colocated with NODEMANAGER or YARN_CLIENT mismatchHosts = sorted(expectedrClientHosts.symmetric_difference(set(rClientHosts))) if len(mismatchHosts) > 0: hostsString = ', '.join(mismatchHosts)
[4/4] ambari git commit: AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader)
AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd1ffc95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd1ffc95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd1ffc95 Branch: refs/heads/branch-2.4 Commit: cd1ffc956d2739754a54e324412ac107151f60b4 Parents: 36eeb38 Author: Balazs Bence Sari Authored: Mon Sep 26 13:28:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 17:34:56 2016 +0200 -- .../MICROSOFT_R/8.0.0/repos/repoinfo.xml| 33 .../src/main/resources/mpack.json | 10 +- 2 files changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd1ffc95/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml new file mode 100644 index 000..687643b --- /dev/null +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml @@ -0,0 +1,33 @@ + + + + + +http://PLEASE_ENTER_REPO_URL +MSFT_R-8.1 +MSFT_R + + + + +http://PLEASE_ENTER_REPO_URL +MSFT_R-8.1 +MSFT_R + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/cd1ffc95/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json index f90ccce..52363d1 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json @@ -37,15 +37,7 @@ }, { "stack_name" : "HDP", - "stack_version" : "2.1" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.2" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.3" + "stack_version" : "2.0.6" } ] }
[2/4] ambari git commit: AMBARI-18338. Microsoft-R client should work in a secured cluster (Balazs bence Sari via magyari_sandor)
AMBARI-18338. Microsoft-R client should work in a secured cluster (Balazs bence Sari via magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2003eff9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2003eff9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2003eff9 Branch: refs/heads/branch-2.4 Commit: 2003eff9ba6bd9ff64ee1893205476bcd6f250f7 Parents: bbb70fe Author: Balazs Bence Sari Authored: Thu Sep 15 14:11:50 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 17:20:50 2016 +0200 -- .../MICROSOFT_R/8.0.0/kerberos.json | 15 ++ .../MICROSOFT_R/8.0.0/package/scripts/params.py | 1 + .../8.0.0/package/scripts/params_linux.py | 29 .../8.0.0/package/scripts/service_check.py | 11 +++- 4 files changed, 55 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2003eff9/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/kerberos.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/kerberos.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/kerberos.json new file mode 100644 index 000..86fab2d --- /dev/null +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/kerberos.json @@ -0,0 +1,15 @@ +{ + "services": [ +{ + "name": "MICROSOFT_R", + "identities": [ +{ + "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "/smokeuser" +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/2003eff9/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params.py index 36541e7..aa20797 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params.py @@ -28,3 +28,4 @@ else: host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) +revo_share_hdfs_folder = "/user/RevoShare" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2003eff9/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params_linux.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params_linux.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params_linux.py index d72c42e..71f17b6 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params_linux.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/params_linux.py @@ -44,7 +44,36 @@ smoke_hdfs_user_mode = 0770 user_group = config['configurations']['cluster-env']['user_group'] security_enabled = config['configurations']['cluster-env']['security_enabled'] smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab'] +hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] +hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) # not supporting 32 bit jdk. java64_home = config['hostLevelParams']['java_home'] + +hadoop_bin_dir = stack_select.get_hadoop_dir("bin") +hdfs_user_principal = default('/configurations/hadoop-env/hdfs_principal_name', None) +hdfs_site = config['configurations']['hdfs-site'] +default_fs = config['configurations']['core-site']['fs.defaultFS'] +dfs_type = default("/commandParams/dfs_type", "") +hadoop_conf_dir = "/etc/hadoop/conf" + + +import functools +#create partial functions with common arguments for every HdfsResource call +#to create/delete/copyfromlocal hdfs directories/files we need to call params.HdfsResource in code +HdfsResource = functools.partial( +HdfsResource, +user=hdfs_u
[3/4] ambari git commit: AMBARI-18349. Specify role command order to make Microsoft-R service check run after YARN is started. (Attila Doroszlai via stoader)
AMBARI-18349. Specify role command order to make Microsoft-R service check run after YARN is started. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/36eeb38d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/36eeb38d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/36eeb38d Branch: refs/heads/branch-2.4 Commit: 36eeb38da948abfe418ac19fe2c2286cf5041388 Parents: 2003eff Author: Attila Doroszlai Authored: Mon Sep 19 15:02:13 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 17:21:04 2016 +0200 -- .../MICROSOFT_R/8.0.0/package/scripts/service_check.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/36eeb38d/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/service_check.py -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/service_check.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/service_check.py index 547476b..5368e94 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/service_check.py +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/service_check.py @@ -45,6 +45,7 @@ class MicrosoftRServiceCheckLinux(MicrosoftRServiceCheck): action="create_on_execute", owner=params.hdfs_user, mode=0777) + params.HdfsResource(None, action="execute") except Exception as exception: Logger.warning("Could not check the existence of /user/RevoShare on HDFS, exception: {0}".format(str(exception)))
ambari git commit: AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 a6c12bfc3 -> 1b0212c72 AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b0212c7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b0212c7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b0212c7 Branch: refs/heads/branch-2.5 Commit: 1b0212c72c1c710b1b1cf77855e4ecd766b7537d Parents: a6c12bf Author: Balazs Bence Sari Authored: Mon Sep 26 13:28:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 13:31:31 2016 +0200 -- .../8.0.0/configuration/microsoft-r-env.xml | 35 .../MICROSOFT_R/8.0.0/repos/repoinfo.xml| 6 ++-- .../src/main/resources/mpack.json | 10 +- 3 files changed, 4 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b0212c7/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml deleted file mode 100644 index 5bc4a31..000 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - -R Open Version -Version of R Open -Version of R Open -3.2.2 - -string -false - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/1b0212c7/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml index 4c82514..687643b 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml @@ -18,14 +18,14 @@ -http://104.196.87.250/msft-r/MICROSOFT_R-8.0/ +http://PLEASE_ENTER_REPO_URL MSFT_R-8.1 MSFT_R - + -http://104.196.87.250/msft-r/MICROSOFT_R-8.0/ +http://PLEASE_ENTER_REPO_URL MSFT_R-8.1 MSFT_R http://git-wip-us.apache.org/repos/asf/ambari/blob/1b0212c7/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json index f90ccce..52363d1 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json @@ -37,15 +37,7 @@ }, { "stack_name" : "HDP", - "stack_version" : "2.1" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.2" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.3" + "stack_version" : "2.0.6" } ] }
ambari git commit: AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 18ad001b3 -> 7d37453ec AMBARI-18430. Microsoft-R service should be supported on SLES11. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d37453e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d37453e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d37453e Branch: refs/heads/trunk Commit: 7d37453ec413361a2b9ab362f6d771d79384bf62 Parents: 18ad001 Author: Balazs Bence Sari Authored: Mon Sep 26 13:28:55 2016 +0200 Committer: Toader, Sebastian Committed: Mon Sep 26 13:28:55 2016 +0200 -- .../8.0.0/configuration/microsoft-r-env.xml | 35 .../MICROSOFT_R/8.0.0/repos/repoinfo.xml| 6 ++-- .../src/main/resources/mpack.json | 10 +- 3 files changed, 4 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d37453e/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml deleted file mode 100644 index 5bc4a31..000 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/configuration/microsoft-r-env.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - -R Open Version -Version of R Open -Version of R Open -3.2.2 - -string -false - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/7d37453e/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml index 4c82514..687643b 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/repos/repoinfo.xml @@ -18,14 +18,14 @@ -http://104.196.87.250/msft-r/MICROSOFT_R-8.0/ +http://PLEASE_ENTER_REPO_URL MSFT_R-8.1 MSFT_R - + -http://104.196.87.250/msft-r/MICROSOFT_R-8.0/ +http://PLEASE_ENTER_REPO_URL MSFT_R-8.1 MSFT_R http://git-wip-us.apache.org/repos/asf/ambari/blob/7d37453e/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json -- diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json index f90ccce..52363d1 100644 --- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json +++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json @@ -37,15 +37,7 @@ }, { "stack_name" : "HDP", - "stack_version" : "2.1" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.2" -}, -{ - "stack_name" : "HDP", - "stack_version" : "2.3" + "stack_version" : "2.0.6" } ] }