Examples of HostExtractor


Examples of org.apache.pig.piggybank.evaluation.util.apachelogparser.HostExtractor

    tests.put("dud", null);
  }

  @Test
  public void testInstantiation() {
    assertNotNull(new HostExtractor());
  }
View Full Code Here

Examples of org.apache.pig.piggybank.evaluation.util.apachelogparser.HostExtractor

    assertNotNull(new HostExtractor());
  }

  @Test
  public void testTests() throws Exception {
    HostExtractor hostExtractor = new HostExtractor();
    int testCount = 0;
    Tuple input=DefaultTupleFactory.getInstance().newTuple(1);
    for (String key : tests.keySet()) {
      input.set(0,key);
      String expected = tests.get(key);
      String output = hostExtractor.exec(input);
      assertEquals(expected, output);
      testCount++;
    }
    assertEquals(tests.size(), testCount);
  }
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.