Package org.apache.hadoop.hbase.thrift

Examples of org.apache.hadoop.hbase.thrift.ThriftMetrics


    metricsHelper.assertCounter("put_num_ops", 1, metrics.getSource());
    metricsHelper.assertCounter( "exists_num_ops", 2, metrics.getSource());
  }

  private static ThriftMetrics getMetrics(Configuration conf) throws Exception {
    ThriftMetrics m = new ThriftMetrics(conf, ThriftMetrics.ThriftServerType.TWO);
    m.getSource().init(); //Clear all the metrics
    return m;
  }
View Full Code Here


    }

    boolean nonblocking = cmd.hasOption("nonblocking");
    boolean hsha = cmd.hasOption("hsha");

    ThriftMetrics metrics = new ThriftMetrics(conf, ThriftMetrics.ThriftServerType.TWO);

    String implType = "threadpool";
    if (nonblocking) {
      implType = "nonblocking";
    } else if (hsha) {
View Full Code Here

  }

  @Test
  public void testMetrics() throws Exception {
    Configuration conf = UTIL.getConfiguration();
    ThriftMetrics metrics = getMetrics(conf);
    THBaseService.Iface handler =
        ThriftHBaseServiceHandler.newInstance(conf, metrics);
    byte[] rowName = "testMetrics".getBytes();
    ByteBuffer table = ByteBuffer.wrap(tableAname);
View Full Code Here

    verifyMetrics(metrics, "exists_num_ops", 2);
  }
  private static ThriftMetrics getMetrics(Configuration conf) throws Exception {
    setupMetricsContext();
    return new ThriftMetrics(Integer.parseInt(ThriftServer.DEFAULT_LISTEN_PORT),
        conf, THBaseService.Iface.class);
  }
View Full Code Here

      boolean nonblocking = cmd.hasOption("nonblocking");
      boolean hsha = cmd.hasOption("hsha");

      Configuration conf = HBaseConfiguration.create();
      ThriftMetrics metrics = new ThriftMetrics(
          listenPort, conf, THBaseService.Iface.class);

      // Construct correct ProtocolFactory
      TProtocolFactory protocolFactory = getTProtocolFactory(cmd.hasOption("compact"));
      THBaseService.Iface handler =
View Full Code Here

      }

      boolean nonblocking = cmd.hasOption("nonblocking");
      boolean hsha = cmd.hasOption("hsha");

      ThriftMetrics metrics = new ThriftMetrics(
          listenPort, conf, THBaseService.Iface.class);

      String implType = "threadpool";
      if (nonblocking) {
        implType = "nonblocking";
View Full Code Here

  }

  @Test
  public void testMetrics() throws Exception {
    Configuration conf = UTIL.getConfiguration();
    ThriftMetrics metrics = getMetrics(conf);
    THBaseService.Iface handler =
        ThriftHBaseServiceHandler.newInstance(conf, metrics);
    byte[] rowName = "testMetrics".getBytes();
    ByteBuffer table = wrap(tableAname);
View Full Code Here

    assertTColumnValuesEqual(expectedColumnValues, returnedColumnValues);
  }

  private static ThriftMetrics getMetrics(Configuration conf) throws Exception {
    setupMetricsContext();
    return new ThriftMetrics(Integer.parseInt(ThriftServer.DEFAULT_LISTEN_PORT),
        conf, THBaseService.Iface.class);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.thrift.ThriftMetrics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.