org.apache.hadoop.chukwa.datacollection.writer
Class InMemoryWriter

java.lang.Object
  extended by org.apache.hadoop.chukwa.datacollection.writer.InMemoryWriter
All Implemented Interfaces:
ChukwaWriter

public class InMemoryWriter
extends Object
implements ChukwaWriter


Constructor Summary
InMemoryWriter()
           
 
Method Summary
 void add(Chunk data)
           
 void add(List<Chunk> chunks)
           
 void close()
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
 Chunk readOutChunk(int bytes, int ms)
          Try to read bytes, waiting up to ms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryWriter

public InMemoryWriter()
Method Detail

close

public void close()
Specified by:
close in interface ChukwaWriter

init

public void init(org.apache.hadoop.conf.Configuration conf)
          throws WriterException
Specified by:
init in interface ChukwaWriter
Throws:
WriterException

add

public void add(Chunk data)
         throws WriterException
Throws:
WriterException

add

public void add(List<Chunk> chunks)
         throws WriterException
Specified by:
add in interface ChukwaWriter
Throws:
WriterException

readOutChunk

public Chunk readOutChunk(int bytes,
                          int ms)
                   throws IOException
Try to read bytes, waiting up to ms

Parameters:
bytes - amount to try to read
ms - time to wait
Returns:
a newly read-in chunk
Throws:
IOException


Copyright © ${year} The Apache Software Foundation