Exemplo n.º 1
0
def show_regionserver(request, id):
  rs = dbutil.get_regionserver(id)
  cluster = rs.cluster

  read_requests_dist_by_rs, write_requests_dist_by_rs = dbutil.get_requests_distribution(rs);
  params = {
    'chart_id': 'read_requests_on_rs',
    'chart_title': 'read requests on region',
    'request_dist': read_requests_dist_by_rs,
  }

  read_requests_dist_by_rs_chart = loader.get_template('monitor/requests_dist_column_chart.tpl').render(Context(params))

  params = {
    'chart_id': 'write_requests_on_rs',
    'chart_title': 'write requests on region',
    'request_dist': write_requests_dist_by_rs,
  }
  write_requests_dist_by_rs_chart = loader.get_template('monitor/requests_dist_column_chart.tpl').render(
    Context(params))

  group = str(rs)
  tsdb_read_query = [metric_helper.make_metric_query(cluster.name, group, 'readRequestsCountPerSec')]
  tsdb_write_query = [metric_helper.make_metric_query(cluster.name, group, 'writeRequestsCountPerSec')]

  params = {
    'cluster': cluster,
    'regionserver': rs,
    'read_requests_dist_by_rs_chart': read_requests_dist_by_rs_chart,
    'write_requests_dist_by_rs_chart': write_requests_dist_by_rs_chart,
    'tsdb_read_query': tsdb_read_query,
    'tsdb_write_query': tsdb_write_query,
  }
  return respond(request, 'monitor/hbase_regionserver.html', params)
Exemplo n.º 2
0
def show_regionserver(request, id):
  rs = dbutil.get_regionserver(id)
  cluster = rs.cluster

  read_requests_dist_by_rs, write_requests_dist_by_rs = dbutil.get_requests_distribution(rs);
  params = {
    'chart_id': 'read_requests_on_rs',
    'chart_title': 'read requests on region',
    'request_dist': read_requests_dist_by_rs,
  }

  read_requests_dist_by_rs_chart = loader.get_template('monitor/requests_dist_column_chart.tpl').render(Context(params))

  params = {
    'chart_id': 'write_requests_on_rs',
    'chart_title': 'write requests on region',
    'request_dist': write_requests_dist_by_rs,
  }
  write_requests_dist_by_rs_chart = loader.get_template('monitor/requests_dist_column_chart.tpl').render(
    Context(params))

  group = str(rs)
  tsdb_read_query = [metric_helper.make_metric_query(cluster.name, group, 'readRequestsCountPerSec')]
  tsdb_write_query = [metric_helper.make_metric_query(cluster.name, group, 'writeRequestsCountPerSec')]

  params = {
    'cluster': cluster,
    'regionserver': rs,
    'read_requests_dist_by_rs_chart': read_requests_dist_by_rs_chart,
    'write_requests_dist_by_rs_chart': write_requests_dist_by_rs_chart,
    'tsdb_read_query': tsdb_read_query,
    'tsdb_write_query': tsdb_write_query,
  }
  return respond(request, 'monitor/hbase_regionserver.html', params)
Exemplo n.º 3
0
def show_regionserver_operation(request, id):
  regionserver = dbutil.get_regionserver(id)
  cluster = regionserver.cluster
  endpoint = dbutil.map_cluster_to_endpoint(cluster.name)
  params = {
    'cluster' : cluster,
    'regionserver' : regionserver,
    'tsdb_metrics' : metric_helper.generate_operation_metric_for_regionserver(regionserver),
    'endpoint' : endpoint
  }
  return respond(request, 'monitor/hbase_regionserver_operation.html', params)
Exemplo n.º 4
0
def show_regionserver_operation(request, id):
  regionserver = dbutil.get_regionserver(id)
  cluster = regionserver.cluster
  endpoint = dbutil.map_cluster_to_endpoint(cluster.name)
  params = {
    'cluster' : cluster,
    'regionserver' : regionserver,
    'tsdb_metrics' : metric_helper.generate_operation_metric_for_regionserver(regionserver),
    'endpoint' : endpoint
  }
  return respond(request, 'monitor/hbase_regionserver_operation.html', params)
Exemplo n.º 5
0
def show_regionserver_operation(request, id):
    regionserver = dbutil.get_regionserver(id)
    cluster = regionserver.cluster
    endpoint = dbutil.map_cluster_to_endpoint(cluster.name)
    params = {
        "cluster": cluster,
        "regionserver": regionserver,
        "tsdb_metrics": metric_helper.generate_operation_metric_for_regionserver(regionserver),
        "endpoint": endpoint,
    }
    return respond(request, "monitor/hbase_regionserver_operation.html", params)
Exemplo n.º 6
0
def show_regionserver_operation(request, id):
  regionserver = dbutil.get_regionserver(id)
  cluster = regionserver.cluster
  endpoint = metric_helper.form_perf_counter_endpoint_name(regionserver.task)
  params = {
    'cluster' : cluster,
    'regionserver' : regionserver,
    'metrics' : metric_helper.generate_operation_metric_for_regionserver(regionserver),
    'endpoint' : endpoint
  }
  return respond(request, 'monitor/hbase_regionserver_operation.html', params)
Exemplo n.º 7
0
def show_regionserver(request, id):
    rs = dbutil.get_regionserver(id)
    cluster = rs.cluster

    read_requests_dist_by_rs, write_requests_dist_by_rs = dbutil.get_requests_distribution(rs)
    params = {
        "chart_id": "read_requests_on_rs",
        "chart_title": "read requests on region",
        "request_dist": read_requests_dist_by_rs,
    }

    read_requests_dist_by_rs_chart = loader.get_template("monitor/requests_dist_column_chart.tpl").render(
        Context(params)
    )

    params = {
        "chart_id": "write_requests_on_rs",
        "chart_title": "write requests on region",
        "request_dist": write_requests_dist_by_rs,
    }
    write_requests_dist_by_rs_chart = loader.get_template("monitor/requests_dist_column_chart.tpl").render(
        Context(params)
    )

    group = str(rs)
    tsdb_read_query = [metric_helper.make_metric_query(cluster.name, group, "readRequestsCountPerSec")]
    tsdb_write_query = [metric_helper.make_metric_query(cluster.name, group, "writeRequestsCountPerSec")]

    params = {
        "cluster": cluster,
        "regionserver": rs,
        "read_requests_dist_by_rs_chart": read_requests_dist_by_rs_chart,
        "write_requests_dist_by_rs_chart": write_requests_dist_by_rs_chart,
        "tsdb_read_query": tsdb_read_query,
        "tsdb_write_query": tsdb_write_query,
    }
    return respond(request, "monitor/hbase_regionserver.html", params)