コード例 #1
0
ファイル: amhm_service.py プロジェクト: fanzhidongyzby/ambari
def start(options):
  AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler)

  if options.is_process:
    #Run as a normal process. Invoke the ServiceMain directly.
    stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop)
    bind_signal_handlers(stopHandler)
    server_process_main(stopHandler)
  else:
    AMHostMonitoringService.Start()
コード例 #2
0
def start(options):
    AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler)

    if options.is_process:
        #Run as a normal process. Invoke the ServiceMain directly.
        stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop)
        bind_signal_handlers(stopHandler)
        server_process_main(stopHandler)
    else:
        AMHostMonitoringService.Start()
コード例 #3
0
ファイル: amhm_service.py プロジェクト: fanzhidongyzby/ambari
  def SvcDoRun(self):
    scmStatus = SvcStatusCallback(self)

    self.redirect_output_streams()

    stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop)
    bind_signal_handlers(stopHandler)

    AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler)

    server_process_main(stopHandler, scmStatus)
    pass
コード例 #4
0
    def SvcDoRun(self):
        scmStatus = SvcStatusCallback(self)

        self.redirect_output_streams()

        stopHandler = StopHandler(AMHostMonitoringService._heventSvcStop)
        bind_signal_handlers(stopHandler)

        AMHostMonitoringService.set_ctrl_c_handler(ctrlHandler)

        server_process_main(stopHandler, scmStatus)
        pass
コード例 #5
0
ファイル: amc_service.py プロジェクト: soener/ambari
def start(options):
    AMCollectorService.set_ctrl_c_handler(ctrlHandler)

    if options.is_process:
        #Run as a normal process. Invoke the ServiceMain directly.
        childProc = server_process_main(options)

        childProc.wait()

        remove_file(PID_OUT_FILE)
    else:
        AMCollectorService.Start()
コード例 #6
0
def start(options):
  AMCollectorService.set_ctrl_c_handler(ctrlHandler)

  if options.is_process:
    #Run as a normal process. Invoke the ServiceMain directly.
    childProc = server_process_main(options)

    childProc.wait()

    remove_file(PID_OUT_FILE)
  else:
    AMCollectorService.Start()
コード例 #7
0
  def SvcDoRun(self):
    scmStatus = SvcStatusCallback(self)

    properties = get_properties()
    self.options.debug = get_value_from_properties(properties, DEBUG_MODE_KEY, self.options.debug)
    self.options.suspend_start = get_value_from_properties(properties, SUSPEND_START_MODE_KEY, self.options.suspend_start)

    self.redirect_output_streams()

    childProc = server_process_main(self.options, scmStatus)

    if not self._StopOrWaitForChildProcessToFinish(childProc):
      return

    remove_file(PID_OUT_FILE)
    pass
コード例 #8
0
ファイル: amc_service.py プロジェクト: soener/ambari
    def SvcDoRun(self):
        scmStatus = SvcStatusCallback(self)

        properties = get_properties()
        self.options.debug = get_value_from_properties(properties,
                                                       DEBUG_MODE_KEY,
                                                       self.options.debug)
        self.options.suspend_start = get_value_from_properties(
            properties, SUSPEND_START_MODE_KEY, self.options.suspend_start)

        self.redirect_output_streams()

        childProc = server_process_main(self.options, scmStatus)

        if not self._StopOrWaitForChildProcessToFinish(childProc):
            return

        remove_file(PID_OUT_FILE)
        pass