Examples of doUpdates()


Examples of org.apache.hadoop.hbase.rest.metrics.RESTMetrics.doUpdates()

    int incrementFailedGetRequests = 100;
    int incrementFailedDeleteRequests = 30;
    int incrementFailedPutRequests = 2;

    long start1 = System.currentTimeMillis();
    test.doUpdates(null);

    // started value
    assertEquals(0, test.getRequests(), 0.01);
    assertEquals(0, test.getSucessfulDeleteCount(), 0.01);
    assertEquals(0, test.getSucessfulPutCount(), 0.01);
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.metrics.RESTMetrics.doUpdates()

    test.incrementSucessfulPutRequests(incrementSucessfulPut);
    test.incrementFailedGetRequests(incrementFailedGetRequests);
    test.incrementFailedDeleteRequests(incrementFailedDeleteRequests);
    test.incrementFailedPutRequests(incrementFailedPutRequests);

    test.doUpdates(null);

    // The maximum time for stability test
    long tmax = System.currentTimeMillis() - start1;

    testData(tmax, timeout, test.getRequests(), incrementRequest);
View Full Code Here

Examples of org.apache.hadoop.hdfs.metrics.DFSClientMetrics.doUpdates()

    privateStringMethod.setAccessible(true);

    long returnValue = (Long) privateStringMethod.invoke(metrics);
    assertEquals(THREAD_COUNT * OPERATIONS_PER_THREAD, returnValue);

    metrics.doUpdates(null);
   
    assertEquals(THREAD_COUNT * OPERATIONS_PER_THREAD,
        metrics.numCreateDirOps.getPreviousIntervalValue());
    assertEquals(THREAD_COUNT * OPERATIONS_PER_THREAD,
        metrics.numCreateFileOps.getPreviousIntervalValue());
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    IOException ie = new IOException("EOFException");
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);

    MetricsContext context = factory.getContext("mapred");
    shuffleMetrics.doUpdates(context);
    Map<String, Collection<OutputRecord>> records = context.getAllRecords();
    Collection<OutputRecord> col = records.get("shuffleOutput");
    OutputRecord outputRecord = col.iterator().next();
    assertEquals(0, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    // test with only MsgRegex set that does match
    ie = new IOException("Broken pipe");
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);

    shuffleMetrics.doUpdates(context);
    assertEquals(1, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with neither set, make sure incremented
    exceptionStackRegex = null;
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    // test with neither set, make sure incremented
    exceptionStackRegex = null;
    exceptionMsgRegex = null;
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);
    shuffleMetrics.doUpdates(context);
    assertEquals(2, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with only StackRegex set doesn't match
    exceptionStackRegex = ".*\\.doesnt\\$SelectSet\\.wakeup.*";
 
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    exceptionStackRegex = ".*\\.doesnt\\$SelectSet\\.wakeup.*";
    exceptionMsgRegex = null;
    ie.setStackTrace(constructStackTrace());
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);
    shuffleMetrics.doUpdates(context);
    assertEquals(2, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with only StackRegex set does match
    exceptionStackRegex = ".*\\.SelectorManager\\$SelectSet\\.wakeup.*";
 
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    // test with only StackRegex set does match
    exceptionStackRegex = ".*\\.SelectorManager\\$SelectSet\\.wakeup.*";
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);
    shuffleMetrics.doUpdates(context);
    assertEquals(3, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with both regex set and matches
    exceptionMsgRegex = "Broken pipe";
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    // test with both regex set and matches
    exceptionMsgRegex = "Broken pipe";
    ie.setStackTrace(constructStackTraceTwo());
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);
    shuffleMetrics.doUpdates(context);
    assertEquals(4, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with both regex set and only msg matches
    exceptionStackRegex = ".*[1-9]+BOGUSREGEX";
 
View Full Code Here

Examples of org.apache.hadoop.mapred.TaskTracker.ShuffleServerMetrics.doUpdates()

    // test with both regex set and only msg matches
    exceptionStackRegex = ".*[1-9]+BOGUSREGEX";
    testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
        shuffleMetrics);
    shuffleMetrics.doUpdates(context);
    assertEquals(4, outputRecord.getMetric("shuffle_exceptions_caught")
        .intValue());

    // test with both regex set and only stack matches
    exceptionStackRegex = ".*\\.SelectorManager\\$SelectSet\\.wakeup.*";
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.