Examples of ChunkCatcherConnector


Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

public class TestStartAtOffset extends TestCase {

  ChunkCatcherConnector chunks;

  public TestStartAtOffset() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

public class TestRawAdaptor extends TestCase {
  ChunkCatcherConnector chunks;

  public TestRawAdaptor() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

public class TestCharFileTailingAdaptorUTF8 extends TestCase {
  ChunkCatcherConnector chunks;

  public TestCharFileTailingAdaptorUTF8() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

public class TestLogRotate extends TestCase {
  ChunkCatcherConnector chunks;

  public TestLogRotate() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

   * @throws Exception
   */
  @Before
  public void setUp() throws Exception {
    agent = new ChukwaAgent(conf);
    chunks = new ChunkCatcherConnector();
    chunks.start();

    adaptorId = agent.processAddCommand("add adaptor_test =" + "filetailer."
        + adaptorToTest + " TestFileTailingAdaptorPreserveLines "
        + testFile.getCanonicalPath() + " 0");
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

  ChunkCatcherConnector chunks;
  Configuration conf = new Configuration();
  File baseDir, testFile;
 
  public TestFileTailingAdaptors() throws IOException {
    chunks = new ChunkCatcherConnector();
    chunks.start();
    baseDir = new File(System.getProperty("test.build.data", "/tmp"));
    conf.set("chukwaAgent.checkpoint.dir", baseDir.getCanonicalPath());
    conf.setBoolean("chukwaAgent.checkpoint.enabled", false);
    conf.setInt("chukwaAgent.adaptor.context.switch.time", 100);
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

    ChukwaConfiguration cc = new ChukwaConfiguration();
    cc.setInt("chukwaAgent.fileTailingAdaptor.maxReadSize", 18); // small in order to have hasMoreData=true
                                   // (with 26 letters we should have 2 chunks)
    agent = new ChukwaAgent(cc);
   
    ChunkCatcherConnector chunks = new ChunkCatcherConnector();
      chunks.start();

      File baseDir = new File(System.getProperty("test.build.data", "/tmp"));
    testFile = makeTestFile("testDontSleepIfHasMoreData", 1, baseDir); // insert 26 letters on file
    long startTime = System.currentTimeMillis();
    adaptorId = agent.processAddCommand("add adaptor_test ="
        + "filetailer.FileTailingAdaptor testDontSleepIfHasMoreData "
        + testFile.getCanonicalPath() + " 0");

    chunks.waitForAChunk();
    chunks.waitForAChunk();
   
    long endTime = System.currentTimeMillis();
    assertTrue( endTime - startTime < 300 ); // ensure that everything finishes very fast
                         // faster than SAMPLE_PERIOD_MS (ie: we don't sleep)
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

    conf.setBoolean("chukwaAgent.checkpoint.enabled", false);
    conf.setInt("chukwaAgent.adaptor.fileadaptor.timeoutperiod", 100);
    conf.setInt("chukwaAgent.adaptor.context.switch.time", 100);
    testFile = makeTestFile("test", 10, baseDir);

    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
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.