org.apache.accumulo.core.file.rfile.bcfile
Class BCFile.Writer.BlockAppender

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.DataOutputStream
              extended by org.apache.accumulo.core.file.rfile.bcfile.BCFile.Writer.BlockAppender
All Implemented Interfaces:
Closeable, DataOutput, Flushable
Enclosing class:
BCFile.Writer

public class BCFile.Writer.BlockAppender
extends DataOutputStream

Access point to stuff data into a block.


Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Method Summary
 void close()
          Signaling the end of write to the block.
 void flush()
           
 long getCompressedSize()
          Get the compressed size of the block in progress.
 long getRawSize()
          Get the raw size of the block.
 long getStartPos()
           
 
Methods inherited from class java.io.DataOutputStream
size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Method Detail

getRawSize

public long getRawSize()
                throws IOException
Get the raw size of the block.

Returns:
the number of uncompressed bytes written through the BlockAppender so far.
Throws:
IOException

getCompressedSize

public long getCompressedSize()
                       throws IOException
Get the compressed size of the block in progress.

Returns:
the number of compressed bytes written to the underlying FS file. The size may be smaller than actual need to compress the all data written due to internal buffering inside the compressor.
Throws:
IOException

getStartPos

public long getStartPos()

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class DataOutputStream

close

public void close()
           throws IOException
Signaling the end of write to the block. The block register will be called for registering the finished block.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.