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:
java.io.Closeable, java.io.DataOutput, java.io.Flushable
Enclosing class:
BCFile.Writer

public class BCFile.Writer.BlockAppender
extends java.io.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.
 
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 java.io.IOException
Get the raw size of the block.

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

getCompressedSize

public long getCompressedSize()
                       throws java.io.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:
java.io.IOException

flush

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

close

public void close()
           throws java.io.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 java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.