Package org.apache.hadoop.chukwa.conf

Examples of org.apache.hadoop.chukwa.conf.ChukwaConfiguration


    }
  }

  public static void extractRawLogFromdataSink(String directory, String fileName)
      throws Exception {
    ChukwaConfiguration conf = new ChukwaConfiguration();
    String fsName = conf.get("writer.hdfs.filesystem");
    FileSystem fs = FileSystem.get(new URI(fsName), conf);

    SequenceFile.Reader r = new SequenceFile.Reader(fs, new Path(directory
        + fileName + ".done"), conf);
View Full Code Here


  public void testLogRotate() throws IOException, InterruptedException,
      ChukwaAgent.AlreadyRunningException {
    ChukwaAgent agent = new ChukwaAgent();
    // Remove any adaptor left over from previous run
    ChukwaConfiguration cc = new ChukwaConfiguration();
    int portno = cc.getInt("chukwaAgent.control.port", 9093);
    ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
    cli.removeAll();
    // sleep for some time to make sure we don't get chunk from existing streams
    Thread.sleep(5000);
    File testFile = makeTestFile("chukwaLogRotateTest", 80);
View Full Code Here

  public void testExpiration() {
    ChukwaAgent agent = null;

    try {
      Configuration conf = new ChukwaConfiguration();
      conf.set("chukwaAgent.control.port", "0");
      agent = new ChukwaAgent(conf);

      FileTailingAdaptor.GRACEFUL_PERIOD = 30 * 1000;

      String adaptorId = agent
View Full Code Here

        tempDir.mkdirs();
      }
      String logFile = tempDir.getPath() + "/chukwatestExpiration.txt";
      testFile = makeTestFile(logFile, 8000);

      Configuration conf = new ChukwaConfiguration();
      conf.set("chukwaAgent.control.port", "0");
      agent = new ChukwaAgent(conf);
      // Remove any adaptor left over from previous run

      ChukwaAgentController cli = new ChukwaAgentController("localhost", agent.getControllerPort());
      cli.removeAll();
View Full Code Here

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

      // Remove any adaptor left over from previous run
      ChukwaConfiguration cc = new ChukwaConfiguration();
      cc.set("chukwaAgent.control.port", "0");
      cc.setInt("chukwaAgent.fileTailingAdaptor.maxReadSize", 55);
      ChukwaAgent agent = new ChukwaAgent(cc);
      int portno = agent.getControllerPort();
      while (portno == -1) {
        Thread.sleep(1000);
        portno = agent.getControllerPort();
View Full Code Here

   * @throws IOException
   */
  public static void main(String[] args) throws IOException, URISyntaxException {
    System.out.println("Input file:" + args[0]);

    ChukwaConfiguration conf = new ChukwaConfiguration();
    String fsName = conf.get("writer.hdfs.filesystem");
    FileSystem fs = FileSystem.get(new URI(fsName), conf);

    SequenceFile.Reader r = new SequenceFile.Reader(fs, new Path(args[0]), conf);

    ChukwaRecordKey key = new ChukwaRecordKey();
View Full Code Here

  /**
   * @param args
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    conf = new ChukwaConfiguration();
    String fsName = conf.get("writer.hdfs.filesystem");
    fs = FileSystem.get(new URI(fsName), conf);

    Path srcDir = new Path(args[0]);
    String destDir = args[1];
View Full Code Here

  @Override
  public void run() {
    System.out.println("\t Running Merge! : output [" + mergeArgs[1] + "]");
    int res;
    try {
      res = ToolRunner.run(new ChukwaConfiguration(),
          new MoveOrMergeRecordFile(), mergeArgs);
      System.out.println("MR exit status: " + res);
      if (res == 0) {
        System.out.println("\t Moving output file : to [" + destFilePath + "]");
        FileUtil.copy(fs, new Path(mergeArgs[1] + "/part-00000"), fs,
View Full Code Here

    String machine = args[1];
    String adaptorName = args[2];
    String recordType = args[3];
    String logFile = args[4];

    BackfillingLoader loader = new BackfillingLoader(new ChukwaConfiguration(),cluster,machine,adaptorName,recordType,logFile);
    loader.process();
  }
View Full Code Here

    System.out.println("command ["
        + ((command == ChukwaAgentToCollectorValidator.ADD) ? "ADD"
            : "VALIDATE") + "]");
    System.out.println("fileName [" + inputFile + "]");

    ChukwaConfiguration conf = new ChukwaConfiguration(true);
    String collectorOutputDir = conf.get("chukwaCollector.outputDir");

    prepareAndSendData(chukwaTestDirectory + outputDir, inputFile,
        collectorOutputDir);
    extractRawLog(chukwaTestDirectory + outputDir, name, collectorOutputDir);
    boolean rawLogTestResult = validateRawLogs(chukwaTestDirectory + outputDir,
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.conf.ChukwaConfiguration

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.