Package org.apache.hadoop.chukwa.datacollection.writer

Examples of org.apache.hadoop.chukwa.datacollection.writer.PipelineStageWriter


    Configuration conf = new Configuration()
    conf.set("chukwaCollector.pipeline",
        SocketTeeWriter.class.getCanonicalName());
    conf.set("chukwaCollector.writerClass",
        PipelineStageWriter.class.getCanonicalName());   
    PipelineStageWriter psw = new PipelineStageWriter();
    try {
      psw.init(conf);
      // Send a client trace chunk
      ArrayList<Chunk> l = new ArrayList<Chunk>();
      String line = "2009-12-29 22:32:27,047 INFO org.apache.hadoop.hdfs.server.datanode.DataNode.clienttrace: src: /10.10.100.60:43707, dest: /10.10.100.60:50010, bytes: 7003141, op: HDFS_WRITE, cliID: DFSClient_-8389654, offset: 0, srvID: DS-2032680158-98.137.100.60-50010-1259976007324, blockid: blk_-2723720761101769540_705411, duration: 289013780000";     
      l.add(new ChunkImpl("ClientTrace", "name", 1, line.getBytes(), null));
      assertTrue(l.size()==1);
      psw.add(l);
      assertTrue(true);
    } catch (WriterException e) {
      fail(ExceptionUtil.getStackTrace(e));
    }
   
View Full Code Here


        SocketTeeWriter.class.getCanonicalName());
   
    conf.set("chukwaCollector.writerClass",
        PipelineStageWriter.class.getCanonicalName());
   
    PipelineStageWriter psw = new PipelineStageWriter();
    psw.init(conf);

    SocketDataLoader sdl = new SocketDataLoader("all");
   
    System.out.println("pipeline established; now pushing a chunk");
    ArrayList<Chunk> l = new ArrayList<Chunk>();
    l.add(new ChunkImpl("dt", "name", 1, new byte[] {'a'}, null));
    psw.add(l);
    //push a chunk through. SocketDataLoader should receive this chunk.
   
    try {
      Collection<Chunk> clist = sdl.read();
      for(Chunk c : clist) {
View Full Code Here

        SocketTeeWriter.class.getCanonicalName());
   
    conf.set("chukwaCollector.writerClass",
        PipelineStageWriter.class.getCanonicalName());
   
    PipelineStageWriter psw = new PipelineStageWriter();
    psw.init(conf);

    SocketDataLoader sdl = new SocketDataLoader("all");
   
    System.out.println("pipeline established; now pushing a chunk");
    ArrayList<Chunk> l = new ArrayList<Chunk>();
    l.add(new ChunkImpl("dt", "name", 1, new byte[] {'a'}, null));
    psw.add(l);
    //push a chunk through. SocketDataLoader should receive this chunk.
   
    try {
      Collection<Chunk> clist = sdl.read();
      for(Chunk c : clist) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.datacollection.writer.PipelineStageWriter

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.