示例#1
0
 def test_start_processes_both(self, check_cluster_exists):
     processes = ['datanode', 'nodemanager']
     rs._start_processes(self.instance, processes)
     cmd_1 = 'sudo su - -c "hadoop-daemon.sh start datanode" hadoop'
     cmd_2 = 'sudo su - -c  "yarn-daemon.sh start nodemanager" hadoop'
     calls = [mock.call(cmd_1), mock.call(cmd_2)]
     self.r.execute_command.assert_has_calls(calls, any_order=True)
示例#2
0
 def test_start_processes_nodemanager(self, check_cluster_exists):
     processes = ['nodemanager']
     rs._start_processes(self.instance, processes)
     self.r.execute_command.assert_called_once_with(
         'sudo su - -c  "yarn-daemon.sh start nodemanager" hadoop')
示例#3
0
 def test_start_processes_datanode(self, check_cluster_exists):
     processes = ['datanode']
     rs._start_processes(self.instance, processes)
     self.r.execute_command.assert_called_once_with(
         'sudo su - -c "hadoop-daemon.sh start datanode" hadoop')