Package org.apache.hadoop.chukwa.datacollection.connector

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


 
  public void testChukwaAppender() {
    try {
   
    ChukwaAgent agent = new ChukwaAgent();
    ChunkCatcherConnector chunks = new ChunkCatcherConnector();
    chunks.start();
    Logger myLogger = Logger.getLogger(TestChukwaAppender.class);
    File out = new File("/tmp/chukwa_test_out");
    out.delete();
    ChukwaDailyRollingFileAppender app = new ChukwaDailyRollingFileAppender(
        new SimpleLayout(), out.getAbsolutePath(), "yyyy-MM-dd");
    app.append(new LoggingEvent("foo", myLogger,  System.currentTimeMillis(),Priority.INFO, "foo", null));
    assertEquals(1, agent.adaptorCount());
    Chunk c = chunks.waitForAChunk();
    System.out.println("read a chunk OK");
    String logLine = new String(c.getData());
    assertTrue(logLine.equals("INFO - foo\n"));
    System.out.println(new String(c.getData()));
    //
View Full Code Here


public class TestExecAdaptor extends TestCase {
 
  ChunkCatcherConnector chunks;
  public TestExecAdaptor() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

import org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector;

public class TestFileTailingAdaptors extends TestCase {
  ChunkCatcherConnector chunks;
  public TestFileTailingAdaptors() {
    chunks = new ChunkCatcherConnector();
    chunks.start();
  }
View Full Code Here

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

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

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

public class TestCharFileTailingAdaptorUTF8 extends TestCase {
  ChunkCatcherConnector chunks;

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

  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

public class TestExecAdaptor extends TestCase {

  ChunkCatcherConnector chunks;

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

public class TestFileTailingAdaptors extends TestCase {
  ChunkCatcherConnector chunks;

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

        tempDir.mkdirs();
      }
      String logFile = tempDir.getPath() + "/Chukwa-bigRecord.txt";
      f = makeTestFile(logFile);

      chunks = new ChunkCatcherConnector();
      chunks.start();

      // Remove any adaptor left over from previous run
      ChukwaConfiguration cc = new ChukwaConfiguration();
      cc.set("chukwaAgent.control.port", "0");
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.datacollection.connector.ChunkCatcherConnector

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.