示例#1
0
def handleBoth(args, config, command):
    zkManager = ZookeeperManager(config)
    solrManager = SolrManager(config)

    if "status" == command:
        zkManager.status()
        print
        solrManager.status()
    elif "stop" == command:
        solrManager.stop()
        zkManager.stop()
    elif "start" == command:
        zkManager.start()
        solrManager.start()
示例#2
0
def handleZookeeper(args, config):
  manager = ZookeeperManager(config)

  if 'install' == args.subcommand:
    manager.uninstall()
    if manager.install():
      print "Zookeeper Installed"

  elif 'uninstall' == args.subcommand:
    if manager.uninstall():
      print "Zookeeper uninstalled"

  elif 'start' == args.subcommand:
    if manager.start():
      print "Zookeeper started"

  elif 'stop' == args.subcommand:
    if manager.stop():
      print "Zookeeper stopped"

  elif 'status' == args.subcommand:
    manager.status()
示例#3
0
def handleZookeeper(args, config):
    manager = ZookeeperManager(config)

    if "install" == args.subcommand:
        manager.uninstall()
        if manager.install():
            print "Zookeeper Installed"

    elif "remove" == args.subcommand:
        if manager.uninstall():
            print "Zookeeper removed"

    elif "start" == args.subcommand:
        if manager.start():
            print "Zookeeper started"

    elif "stop" == args.subcommand:
        if manager.stop():
            print "Zookeeper stopped"

    elif "status" == args.subcommand:
        manager.status()
示例#4
0
def handleBoth(args, config, command):
  zkManager = ZookeeperManager(config)
  solrManager = SolrManager(config)

  if 'install' == command:
    zkManager.install()
    solrManager.install()
  elif 'uninstall' == command:
    zkManager.uninstall()
    solrManager.uninstall()
  elif 'start' == command:
    zkManager.start()
    solrManager.start()
  elif 'stop' == command:
    solrManager.stop()
    zkManager.stop()
  elif 'status' == command:
    zkManager.status()
    print
    solrManager.status()