예제 #1
0
def _get_overview(cluster):
    stats = {}
    for s in cluster['hostport'].split(','):
        host, port = map(str.strip, s.split(':'))

        zks = ZooKeeperStats(host, port)
        stats[s] = zks.get_stats() or {}

    cluster['stats'] = stats
    return cluster
예제 #2
0
파일: views.py 프로젝트: 10fish/datafari
def _get_overview(cluster):
  stats = {}
  for s in cluster['hostport'].split(','):
    host, port = map(str.strip, s.split(':'))

    zks = ZooKeeperStats(host, port)
    stats[s] = zks.get_stats() or {}

  cluster['stats'] = stats
  return cluster
예제 #3
0
def clients(request, host):
    parts = host.split(':')
    if len(parts) != 2:
        raise Http404

    host, port = parts
    zks = ZooKeeperStats(host, port)
    clients = zks.get_clients()

    return render('clients.mako', request,
                  dict(host=host, port=port, clients=clients))
예제 #4
0
파일: views.py 프로젝트: 10fish/datafari
def clients(request, host):
  parts = host.split(':')  
  if len(parts) != 2:
    raise Http404

  host, port = parts
  zks = ZooKeeperStats(host, port)
  clients = zks.get_clients()

  return render('clients.mako', request,
    dict(host=host, port=port, clients=clients))