Package org.apache.phoenix.metrics

Examples of org.apache.phoenix.metrics.MetricsWriter


        return new Pair<String, String>(new String(key), Integer.toString(Bytes.toInt(value)));
    }

    public static MetricsWriter initializeWriter(String clazz) {
        try {
            MetricsWriter writer =
                    Class.forName(clazz).asSubclass(MetricsWriter.class).newInstance();
            writer.initialize();
            return writer;
        } catch (InstantiationException e) {
            LOG.error("Failed to create metrics writer: " + clazz, e);
        } catch (IllegalAccessException e) {
            LOG.error("Failed to create metrics writer: " + clazz, e);
View Full Code Here


public class PhoenixMetricsWriterTest {

  @Test
  public void testTranslation() throws Exception {
    // hook up a sink we can test
    MetricsWriter mockSink = Mockito.mock(MetricsWriter.class);

    // writer that will translate to the sink (specific to hadoop version used)
    PhoenixMetricsSink writer = new PhoenixMetricsSink();
    writer.setWriterForTesting(mockSink);
View Full Code Here

TOP

Related Classes of org.apache.phoenix.metrics.MetricsWriter

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.