コード例 #1
0
ファイル: main.py プロジェクト: twitter/heron
def run(command, *args):
    """ run command """
    # show all clusters
    if command == "clusters":
        return clusters.run(command, *args)

    # show topologies
    elif command == "topologies":
        return topologies.run(command, *args)

    # physical plan
    elif command == "containers":
        return physicalplan.run_containers(command, *args)
    elif command == "metrics":
        return physicalplan.run_metrics(command, *args)

    # logical plan
    elif command == "components":
        return logicalplan.run_components(command, *args)
    elif command == "spouts":
        return logicalplan.run_spouts(command, *args)
    elif command == "bolts":
        return logicalplan.run_bolts(command, *args)

    # help
    elif command == "help":
        return help.run(command, *args)

    # version
    elif command == "version":
        return version.run(command, *args)

    return 1
コード例 #2
0
ファイル: main.py プロジェクト: kennylbj/heron
def run(command, *args):
  """ run command """
  # show all clusters
  if command == 'clusters':
    return clusters.run(command, *args)

  # show topologies
  elif command == 'topologies':
    return topologies.run(command, *args)

  # physical plan
  elif command == 'containers':
    return physicalplan.run_containers(command, *args)
  elif command == 'metrics':
    return physicalplan.run_metrics(command, *args)

  # logical plan
  elif command == 'components':
    return logicalplan.run_components(command, *args)
  elif command == 'spouts':
    return logicalplan.run_spouts(command, *args)
  elif command == 'bolts':
    return logicalplan.run_bolts(command, *args)

  # help
  elif command == 'help':
    return help.run(command, *args)

  # version
  elif command == 'version':
    return version.run(command, *args)

  return 1
コード例 #3
0
ファイル: main.py プロジェクト: huijunwu/heron
def run(command, *args):
  """ run command """
  # show all clusters
  if command == 'clusters':
    return clusters.run(command, *args)

  # show topologies
  if command == 'topologies':
    return topologies.run(command, *args)

  # physical plan
  if command == 'containers':
    return physicalplan.run_containers(command, *args)
  if command == 'metrics':
    return physicalplan.run_metrics(command, *args)

  # logical plan
  if command == 'components':
    return logicalplan.run_components(command, *args)
  if command == 'spouts':
    return logicalplan.run_spouts(command, *args)
  if command == 'bolts':
    return logicalplan.run_bolts(command, *args)

  # help
  if command == 'help':
    return help.run(command, *args)

  # version
  if command == 'version':
    return version.run(command, *args)

  return 1