Package org.apache.hadoop.chukwa.datacollection.agent

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


      assertTrue(record.equals((rec + 1) + " abcdefghijklmnopqrstuvwxyz\n"));
      recStart = c.getRecordOffsets()[rec] + 1;
    }
    assertTrue(c.getDataType().equals("lines"));
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
  }

  private File makeTestFile() throws IOException {
    return org.apache.hadoop.chukwa.util.TempFileUtil.makeTestFile();
  }
View Full Code Here


      assertTrue(record.equals(rec + " abcdefghijklmnopqrstuvwxyz\n"));
      recStart = c.getRecordOffsets()[rec] + 1;
    }
    assertTrue(c.getDataType().equals("lines"));
    agent.stopAdaptor(adaptorId, false);
    agent.shutdown();
    Thread.sleep(2000);
  }

 
View Full Code Here

    c = chunks.waitForAChunk(2000);
    assertNotNull(c);
    System.out.println("got " + new String(c.getData()));
    assertTrue("Fifth\n".equals(new String(c.getData())));

    agent.shutdown();
    Thread.sleep(2000);
  }
 
 
  public void testContinuously() throws Exception {
View Full Code Here

            "org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.CharFileTailingAdaptorUTF8NewLineEscaped",
            "AutomatedTestType", "0 " + inputFile, 0);

    cli.remove(adaptor);
    System.out.println("Adaptor removed");
    agent.shutdown();
    System.out.println("Shutting down agent");
    CollectorStub.jettyServer.stop();
    System.out.println("Shutting down collector");
    Thread.sleep(2000);
  }
View Full Code Here

    SeqFileWriter.ENABLE_ROTATION_ON_CLOSE = true;

    String[] stat = agent.getAdaptorList().get("adaptor_constSend").split(" ");
    long bytesCommitted = Long.valueOf(stat[stat.length -1]);
    assertTrue(bytesCommitted > 0);
    agent.shutdown();
    conn.shutdown();
    Thread.sleep(2000); //for collectors to shut down
    collector2_s.stop();
    Thread.sleep(2000); //for collectors to shut down
   
View Full Code Here

    assertTrue(report.contains("Agent: test"));
    assertTrue(report.contains("Label: label"));
    System.out.println(report);

    System.out.println("OK");
    agent.shutdown();
  }

}
View Full Code Here

    assertNotNull(c);
    String dat = new String(c.getData());
    assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
    assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
    assertTrue(c.getDataType().equals("raw"));
    agent.shutdown();
  }
 
  public void testRepeatedly() throws IOException,
  ChukwaAgent.AlreadyRunningException, InterruptedException {
    int tests = 10; //SHOULD SET HIGHER AND WATCH WITH lsof to find leaks
View Full Code Here

      while(agent.adaptorCount() > 0) {
        agent.stopAdaptor("adaptor_test", false);
        Thread.sleep(1000);
      }
    }
    agent.shutdown();
  }
 
}
View Full Code Here

    String psAgentID = agent.processAddCommand(
        "add exec= org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor ps 500 ps aux 0");
    Chunk c = chunks.waitForAChunk();
    System.out.println(new String(c.getData()));
    assertNotNull(psAgentID);
    agent.shutdown();
  }
 
  /*
   * Buzz in a loop, starting ls every 100 ms.
   * Length of loop controlled by sleep statement near bottom of function
View Full Code Here

    assertEquals(buf.length + STR.length(), c.getSeqID());
   
    agent.stopAdaptor(name, true);
    assertEquals(0, agent.adaptorCount());
    Thread.sleep(500);//before re-binding
    agent.shutdown();
  }
}
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.