Examples of adaptorCount()


Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

    //start timeout thread
    agent.processAddCommand("add fta = "+ FileTailingAdaptor.class.getCanonicalName()
        + " testdata " + testFile.getCanonicalPath() + " 0" );
   
   
    assertEquals(1, agent.adaptorCount());
    Chunk c1 = chunks.waitForAChunk();
    assertNotNull(c1);
    List<CommitListEntry> pendingAcks = new ArrayList<CommitListEntry>();
    pendingAcks.add(new DelayedCommit(c1.getInitiator(), c1.getSeqID(),
        c1.getData().length, "foo", c1.getSeqID(), agent.getAdaptorName(c1.getInitiator())));
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

      Configuration conf = new Configuration();
      conf.setInt("chukwaAgent.control.port", 0);
      ChukwaAgent agent = new ChukwaAgent(conf);
      ConsoleOutConnector conn = new ConsoleOutConnector(agent, true);
      conn.start();
      int count = agent.adaptorCount();
      for (int trial = 0; trial < 20; ++trial) {
        ArrayList<String> runningAdaptors = new ArrayList<String>();

        for (int i = 1; i < 7; ++i) {
          String l = agent
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

        }
        Thread.sleep(1000);
        for (String l : runningAdaptors)
          agent.stopAdaptor(l, false);
        Thread.sleep(5000);
        assertTrue(agent.adaptorCount() == count);
      }
      agent.shutdown();
      Thread.sleep(2000);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

  public void testOnce()  throws IOException,
  ChukwaAgent.AlreadyRunningException, InterruptedException {
   
    ChukwaAgent agent = new ChukwaAgent(conf);
   
    assertEquals(0, agent.adaptorCount());

    agent.processAddCommand("add test = FileAdaptor raw " +testFile.getCanonicalPath() + " 0");
    assertEquals(1, agent.adaptorCount());
    Chunk c = chunks.waitForAChunk(5000);
    assertNotNull(c);
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

    ChukwaAgent agent = new ChukwaAgent(conf);
   
    assertEquals(0, agent.adaptorCount());

    agent.processAddCommand("add test = FileAdaptor raw " +testFile.getCanonicalPath() + " 0");
    assertEquals(1, agent.adaptorCount());
    Chunk c = chunks.waitForAChunk(5000);
    assertNotNull(c);
    String dat = new String(c.getData());
    assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
    assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

    ChukwaAgent agent = new ChukwaAgent(conf);
    for(int i=0; i < tests; ++i) {
      if(i % 100 == 0)
        System.out.println("buzzed " + i + " times");
     
      assertEquals(0, agent.adaptorCount());
      agent.processAddCommand("add test = FileAdaptor raw " +testFile.getCanonicalPath() + " 0");
      assertEquals(1, agent.adaptorCount());
      Chunk c = chunks.waitForAChunk(5000);
      assertNotNull(c);
      String dat = new String(c.getData());
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

      if(i % 100 == 0)
        System.out.println("buzzed " + i + " times");
     
      assertEquals(0, agent.adaptorCount());
      agent.processAddCommand("add test = FileAdaptor raw " +testFile.getCanonicalPath() + " 0");
      assertEquals(1, agent.adaptorCount());
      Chunk c = chunks.waitForAChunk(5000);
      assertNotNull(c);
      String dat = new String(c.getData());
      assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
      assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

      assertNotNull(c);
      String dat = new String(c.getData());
      assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
      assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
      assertTrue(c.getDataType().equals("raw"));
      if(agent.adaptorCount() > 0)
        agent.stopAdaptor("test", false);
    }
    agent.shutdown();
  }
 
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

    conf.setBoolean("chukwaAgent.checkpoint.enabled", false);
    ChukwaAgent agent = new ChukwaAgent(conf);

    chunks = new ConsoleOutConnector(agent, false);
    chunks.start();
    assertEquals(0, agent.adaptorCount());
    String lsID = agent.processAddCommand(
      "add exec= org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Listing 100 /bin/sleep 1 0");
    Thread.sleep( 5*1000); //RAISE THIS to test longer
    System.out.println("stopped ok");
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent.adaptorCount()

    conf.setInt(AdaptorResetThread.TIMEOUT_OPT, ACK_TIMEOUT);

    ChukwaAgent agent = new ChukwaAgent(conf);
    ChunkCatcherConnector chunks = new ChunkCatcherConnector();
    chunks.start();
    assertEquals(0, agent.adaptorCount());
    File testFile = TestRawAdaptor.makeTestFile("testDA", 50);
    long len = testFile.length();
    System.out.println("wrote data to " + testFile);
    AdaptorResetThread restart = new AdaptorResetThread(conf, agent);
    //start timeout thread
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.