예제 #1
0
def cleanup(args):
    get_zk_service_config(args)

    cleanup_token = deploy_utils.confirm_cleanup(args, "zookeeper", args.zookeeper_config)

    hosts = args.zookeeper_config.jobs["zookeeper"].hosts
    for id, host in hosts.iteritems():
        deploy_utils.cleanup_job("zookeeper", args.zookeeper_config, hosts[id], "zookeeper", cleanup_token)
예제 #2
0
def cleanup(args):
  _get_kafka_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "kafka", args.kafka_config)
  for job_name in args.job or ALL_JOBS:
    hosts = args.kafka_config.jobs[job_name].hosts
    task_list = deploy_utils.schedule_task_for_threads(args, hosts, job_name,
      'cleanup', cleanup_token=cleanup_token)
    parallel_deploy.start_deploy_threads(cleanup_job, task_list)
예제 #3
0
def cleanup(args):
  get_zk_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "zookeeper", args.zookeeper_config)

  hosts = args.zookeeper_config.jobs["zookeeper"].hosts
  for id, host in hosts.iteritems():
    deploy_utils.cleanup_job("zookeeper", args.zookeeper_config,
        hosts[id], "zookeeper", cleanup_token)
예제 #4
0
def cleanup(args):
  get_impala_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "impala", args.impala_config)
  for job_name in args.job or ALL_JOBS:
    hosts = args.impala_config.jobs[job_name].hosts
    for id in args.task or hosts.iterkeys():
      deploy_utils.cleanup_job("impala", args.impala_config,
          hosts[id], job_name, cleanup_token)
예제 #5
0
def cleanup(args):
  _get_storm_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "storm", args.storm_config)
  for job_name in args.job or ALL_JOBS:
    hosts = args.storm_config.jobs[job_name].hosts
    task_list = deploy_utils.schedule_task_for_threads(args, hosts, job_name,
      'cleanup', cleanup_token=cleanup_token)
    parallel_deploy.start_deploy_threads(cleanup_job, task_list)
def cleanup(args):
  get_zk_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "zookeeper", args.zookeeper_config)

  hosts = args.zookeeper_config.jobs["zookeeper"].hosts
  for host_id in hosts.keys():
    for instance_id in range(hosts[host_id].instance_num):
      instance_id = -1 if not deploy_utils.is_multiple_instances(host_id, hosts) else instance_id
      deploy_utils.cleanup_job("zookeeper", args.zookeeper_config,
        hosts[host_id].ip, "zookeeper", instance_id, cleanup_token)
예제 #7
0
def cleanup(args):
  get_zk_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "zookeeper", args.zookeeper_config)

  hosts = args.zookeeper_config.jobs["zookeeper"].hosts
  for host_id in hosts.keys():
    for instance_id in range(hosts[host_id].instance_num):
      instance_id = -1 if not deploy_utils.is_multiple_instances(host_id, hosts) else instance_id
      deploy_utils.cleanup_job("zookeeper", args.zookeeper_config,
        hosts[host_id].ip, "zookeeper", instance_id, cleanup_token)
예제 #8
0
def cleanup(args):
  _get_kafka_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "kafka", args.kafka_config)
  for job_name in args.job or ALL_JOBS:
    hosts = args.kafka_config.jobs[job_name].hosts
    args.task_map = deploy_utils.parse_args_host_and_task(args, hosts)
    for host_id in args.task_map.keys() or hosts.keys():
      for instance_id in args.task_map.get(host_id) or range(hosts[host_id].instance_num):
        instance_id = -1 if not deploy_utils.is_multiple_instances(host_id, hosts) else instance_id
        deploy_utils.cleanup_job("kafka", args.kafka_config,
          hosts[host_id].ip, job_name, instance_id, cleanup_token)
예제 #9
0
def cleanup(args):
    get_hdfs_service_config(args)

    cleanup_token = deploy_utils.confirm_cleanup(args, "hdfs",
                                                 args.hdfs_config)

    first = True
    for job_name in args.job or ALL_JOBS:
        hosts = args.hdfs_config.jobs[job_name].hosts
        for id in args.task or hosts.iterkeys():
            cleanup_job(args, hosts[id], job_name, first, cleanup_token)
            if job_name == "zkfc":
                first = False
예제 #10
0
def cleanup(args):
  get_hdfs_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "hdfs", args.hdfs_config)

  first = True
  for job_name in args.job or ALL_JOBS:
    hosts = args.hdfs_config.jobs[job_name].hosts
    for id in args.task or hosts.iterkeys():
      cleanup_job(args, hosts[id], job_name, first, cleanup_token)
      if job_name == "zkfc":
        first = False
예제 #11
0
def cleanup(args):
  get_yarn_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "yarn", args.yarn_config)

  for job_name in args.job or ALL_JOBS:
    hosts = args.yarn_config.jobs[job_name].hosts
    args.task_map = deploy_utils.parse_args_host_and_task(args, hosts)
    for host_id in args.task_map.keys() or hosts.keys():
      for instance_id in args.task_map.get(host_id) or range(hosts[host_id].instance_num):
        instance_id = -1 if not deploy_utils.is_multiple_instances(host_id, hosts) else instance_id
        deploy_utils.cleanup_job("yarn", args.yarn_config,
          hosts[host_id].ip, job_name, instance_id, cleanup_token)
예제 #12
0
def cleanup(args):
  get_hdfs_service_config(args)

  cleanup_token = deploy_utils.confirm_cleanup(args,
      "hdfs", args.hdfs_config)

  first = True
  for job_name in args.job or ALL_JOBS:
    hosts = args.hdfs_config.jobs[job_name].hosts

    args.task_map = deploy_utils.parse_args_host_and_task(args, hosts)
    for host_id in args.task_map.keys() or hosts.keys():
      for instance_id in args.task_map.get(host_id) or range(hosts[host_id].instance_num):
        instance_id = -1 if not deploy_utils.is_multiple_instances(host_id, hosts) else instance_id
        cleanup_job(args, hosts[host_id].ip, job_name, host_id, instance_id, first, cleanup_token)
        if job_name == "zkfc":
          first = False
예제 #13
0
def cleanup(args):
    get_hdfs_service_config(args)

    cleanup_token = deploy_utils.confirm_cleanup(args, "hdfs",
                                                 args.hdfs_config)

    first = True
    for job_name in args.job or ALL_JOBS:
        hosts = args.hdfs_config.jobs[job_name].hosts

        args.task_map = deploy_utils.parse_args_host_and_task(args, hosts)
        for host_id in args.task_map.keys() or hosts.keys():
            for instance_id in args.task_map.get(host_id) or range(
                    hosts[host_id].instance_num):
                instance_id = -1 if not deploy_utils.is_multiple_instances(
                    host_id, hosts) else instance_id
                cleanup_job(args, hosts[host_id].ip, job_name, host_id,
                            instance_id, first, cleanup_token)
                if job_name == "zkfc":
                    first = False