Package org.apache.hadoop.chukwa.datacollection.controller

Examples of org.apache.hadoop.chukwa.datacollection.controller.ChukwaAgentController.addFile()


      int portno = cc.getInt("chukwaAgent.control.port", 9093);
      ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);

      File tmpOutput = TempFileUtil.makeBinary(2000);

      cli.addFile("unknown", tmpOutput.getAbsolutePath());
      System.out.println("have " + agent.adaptorCount() + " running adaptors");
      cli.removeFile("unknown", tmpOutput.getAbsolutePath());

      tmpOutput.delete();
      assertFalse(failed);
View Full Code Here


      for (int i = 0; i < FILES_TO_USE; ++i) {
        File newTestF = new File("/tmp/stresstest/" + i);

        newTestF.deleteOnExit();
        (new OccasionalWriterThread(newTestF)).start();
        cli.addFile("test-lines", newTestF.getAbsolutePath());
      }

      Thread.sleep(60 * 1000);
      System.out.println("cleaning up");
      workdir.delete();
View Full Code Here

      randomData[1999] = '\n';//need data to end with \n since default tailer uses that
      fos.write(randomData);
      fos.flush();
      fos.close();
     
      cli.addFile("unknown", tmpOutput.getAbsolutePath());
      assertEquals(1, agent.adaptorCount());
      cli.removeFile("unknown", tmpOutput.getAbsolutePath());
      assertEquals(0, agent.adaptorCount());
      org.apache.hadoop.chukwa.Chunk readIn = readInData.readOutChunk(randomData.length, 5000);
      byte[] readInBytes = readIn.getData();
View Full Code Here

      int portno = cc.getInt("chukwaAgent.control.port", 9093);
      ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
     
      File tmpOutput = TempFileUtil.makeBinary(2000);
     
      cli.addFile("unknown", tmpOutput.getAbsolutePath());
      System.out.println("have " + agent.adaptorCount() + " running adaptors");
      cli.removeFile("unknown", tmpOutput.getAbsolutePath());
   
     
      tmpOutput.delete();
View Full Code Here

      for(int i = 0; i < FILES_TO_USE; ++i) {
        File newTestF = new File( "/tmp/stresstest/" + i);
       
        newTestF.deleteOnExit();
        (new OccasionalWriterThread(newTestF)).start();
        cli.addFile("test-lines", newTestF.getAbsolutePath());
      }

      Thread.sleep(60 * 1000);
      System.out.println("cleaning up");
      workdir.delete();
View Full Code Here

      for (int i = 0; i < FILES_TO_USE; ++i) {
        File newTestF = new File("/tmp/stresstest/" + i);

        newTestF.deleteOnExit();
        (new OccasionalWriterThread(newTestF)).start();
        cli.addFile("test-lines", newTestF.getAbsolutePath());
      }

      Thread.sleep(60 * 1000);
      System.out.println("cleaning up");
      workdir.delete();
View Full Code Here

      int portno = cc.getInt("chukwaAgent.control.port", 9093);
      ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);

      File tmpOutput = TempFileUtil.makeBinary(2000);

      cli.addFile("unknown", tmpOutput.getAbsolutePath());
      System.out.println("have " + agent.adaptorCount() + " running adaptors");
      cli.removeFile("unknown", tmpOutput.getAbsolutePath());

      tmpOutput.delete();
      assertFalse(failed);
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.