Esempio n. 1
0
def _ensure_services_created(hadoop_password):
  resource_dir_hdfs = os.path.join(os.environ["HADOOP_HDFS_HOME"], "bin")
  service_cmd_hdfs = os.path.join(os.environ["HADOOP_HDFS_HOME"], "bin", "hdfs.cmd")
  if not check_windows_service_exists("journalnode"):
    Execute(CREATE_SERVICE_CMD.format(script=CREATE_SERVICE_SCRIPT, password=hadoop_password, servicename="journalnode",
                                      resourcedir=resource_dir_hdfs, servicecmd=service_cmd_hdfs), logoutput=True)
  if not check_windows_service_exists("zkfc"):
    Execute(CREATE_SERVICE_CMD.format(script=CREATE_SERVICE_SCRIPT, password=hadoop_password, servicename="zkfc",
                                      resourcedir=resource_dir_hdfs, servicecmd=service_cmd_hdfs), logoutput=True)
Esempio n. 2
0
def _ensure_services_created(hadoop_user, hadoop_password):
  resource_dir_hdfs = os.path.join(os.environ["HADOOP_HDFS_HOME"], "bin")
  service_cmd_hdfs = os.path.join(os.environ["HADOOP_HDFS_HOME"], "bin", "hdfs.cmd")
  if not check_windows_service_exists("journalnode"):
    Execute(CREATE_SERVICE_CMD.format(script=CREATE_SERVICE_SCRIPT, username=hadoop_user, password=hadoop_password, servicename="journalnode",
                                      resourcedir=resource_dir_hdfs, servicecmd=service_cmd_hdfs), logoutput=True)
  if not check_windows_service_exists("zkfc"):
    Execute(CREATE_SERVICE_CMD.format(script=CREATE_SERVICE_SCRIPT, username=hadoop_user, password=hadoop_password, servicename="zkfc",
                                      resourcedir=resource_dir_hdfs, servicecmd=service_cmd_hdfs), logoutput=True)
Esempio n. 3
0
  def service_check(self, env):
    from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists
    import params

    env.set_params(params)

    #Just check that the services were correctly installed
    #Check the monitor on all hosts
    Logger.info("Metrics Monitor service check was started.")
    if not check_windows_service_exists(params.ams_monitor_win_service_name):
      raise Fail("Metrics Monitor service was not properly installed. Check the logs and retry the installation.")
    #Check the collector only where installed
    if params.ams_collector_home_dir and os.path.isdir(params.ams_collector_home_dir):
      Logger.info("Metrics Collector service check was started.")
      if not check_windows_service_exists(params.ams_collector_win_service_name):
        raise Fail("Metrics Collector service was not properly installed. Check the logs and retry the installation.")
  def service_check(self, env):
    from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists
    import params

    env.set_params(params)

    #Just check that the services were correctly installed
    #Check the monitor on all hosts
    Logger.info("Metrics Monitor service check was started.")
    if not check_windows_service_exists(params.ams_monitor_win_service_name):
      raise Fail("Metrics Monitor service was not properly installed. Check the logs and retry the installation.")
    #Check the collector only where installed
    if params.ams_collector_home_dir and os.path.isdir(params.ams_collector_home_dir):
      Logger.info("Metrics Collector service check was started.")
      if not check_windows_service_exists(params.ams_collector_win_service_name):
        raise Fail("Metrics Collector service was not properly installed. Check the logs and retry the installation.")
Esempio n. 5
0
def _write_marker():
  if check_windows_service_exists("namenode"):
    open(os.path.join(_working_dir, INSTALL_MARKER_OK), "w").close()
  else:
    open(os.path.join(_working_dir, INSTALL_MARKER_FAILED), "w").close()
Esempio n. 6
0
def _is_msi_installed():
  return os.path.exists(os.path.join(_working_dir, INSTALL_MARKER_OK)) and check_windows_service_exists("namenode")
Esempio n. 7
0
 def install(self, env):
   from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists
   if not check_windows_service_exists(service_mapping.flume_win_service_name):
     self.install_packages(env)
   self.configure(env)
  def install(self, env):
    import params
    from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists

    if not check_windows_service_exists(params.falcon_win_service_name):
      self.install_packages(env)
Esempio n. 9
0
    def install(self, env):
        import params
        from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists

        if not check_windows_service_exists(params.falcon_win_service_name):
            self.install_packages(env)
Esempio n. 10
0
def _write_marker():
    if check_windows_service_exists("namenode"):
        open(os.path.join(_working_dir, INSTALL_MARKER_OK), "w").close()
    else:
        open(os.path.join(_working_dir, INSTALL_MARKER_FAILED), "w").close()
Esempio n. 11
0
def _is_msi_installed():
    return os.path.exists(os.path.join(
        _working_dir,
        INSTALL_MARKER_OK)) and check_windows_service_exists("namenode")
 def install(self, env):
   from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists
   import params
   if not check_windows_service_exists(params.zookeeper_win_service_name):
     self.install_packages(env)
   self.configure(env)