Package org.apache.hadoop.metrics2

Examples of org.apache.hadoop.metrics2.MetricsFilter.accepts()


    final MetricsFilter globFilter = newGlobFilter(conf);
    final MetricsFilter regexFilter = newRegexFilter(conf);
   
    // Test acceptance of the tag list: 
    assertEquals("accepts "+ tags, expectAcceptList, globFilter.accepts(tags));
    assertEquals("accepts "+ tags, expectAcceptList, regexFilter.accepts(tags));
   
    // Test results on each of the individual tags:
    int acceptedCount = 0;
    for (int i=0; i<tags.size(); i++) {
      MetricsTag tag = tags.get(i);
View Full Code Here


    // Test results on each of the individual tags:
    int acceptedCount = 0;
    for (int i=0; i<tags.size(); i++) {
      MetricsTag tag = tags.get(i);
      boolean actGlob = globFilter.accepts(tag);
      boolean actRegex = regexFilter.accepts(tag);
      assertEquals("accepts "+tag, expectedAcceptedSpec[i], actGlob);
      // Both the filters should give the same result:
      assertEquals(actGlob, actRegex);
      if (actGlob) {
        acceptedCount++;
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.