Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EFDF18F45 for ; Fri, 4 Mar 2016 17:50:52 +0000 (UTC) Received: (qmail 88964 invoked by uid 500); 4 Mar 2016 17:50:46 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 88877 invoked by uid 500); 4 Mar 2016 17:50:46 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 87348 invoked by uid 99); 4 Mar 2016 17:50:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2016 17:50:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B614CDFFAE; Fri, 4 Mar 2016 17:50:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: misty@apache.org To: commits@hbase.apache.org Date: Fri, 04 Mar 2016 17:51:19 -0000 Message-Id: <8a3bc6c5a2824629bf682a091e410165@git.apache.org> In-Reply-To: <7bc3db0fa68d49fe8703de8b2d00923c@git.apache.org> References: <7bc3db0fa68d49fe8703de8b2d00923c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [35/51] [partial] hbase-site git commit: Published site at 7dabcf23e8dd53f563981e1e03f82336fc0a44da. http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3e48e84d/devapidocs/org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html ---------------------------------------------------------------------- diff --git a/devapidocs/org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html b/devapidocs/org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html index 68bcec6..0ab9f9f 100644 --- a/devapidocs/org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html +++ b/devapidocs/org/apache/hadoop/hbase/io/hfile/HFileBlock.Writer.html @@ -99,7 +99,7 @@

-
public static class HFileBlock.Writer
+
static class HFileBlock.Writer
 extends Object
Unified version 2 HFile block writer. The intended usage pattern is as follows: @@ -107,7 +107,7 @@ extends HFileBlock.Writer, providing a compression algorithm.
  • Call startWriting(org.apache.hadoop.hbase.io.hfile.BlockType) and get a data stream to write to.
  • Write your data into the stream. -
  • Call writeHeaderAndData(FSDataOutputStream) as many times as you need to. +
  • Call Writer#writeHeaderAndData(FSDataOutputStream) as many times as you need to. store the serialized block into an external stream.
  • Repeat to write more blocks. @@ -271,7 +271,7 @@ extends Method and Description -int +(package private) int blockSizeWritten()
    Returns the number of bytes written into the current block so far, or zero if not writing the block at the moment.
    @@ -304,7 +304,7 @@ extends -HFileBlock +(package private) HFileBlock getBlockForCaching(CacheConfig cacheConf)
    Creates a new HFileBlock.
    @@ -360,7 +360,7 @@ extends -boolean +(package private) boolean isWriting()  @@ -374,25 +374,25 @@ extends -void +(package private) void release()
    Releases resources used by this writer.
    -DataOutputStream +(package private) DataOutputStream startWriting(BlockType newBlockType)
    Starts writing into the block.
    -void +(package private) void write(Cell cell)
    Writes the Cell to this block
    -void +(package private) void writeBlock(HFileBlock.BlockWritable bw, org.apache.hadoop.fs.FSDataOutputStream out)
    Takes the given HFileBlock.BlockWritable instance, creates a new block of @@ -401,7 +401,7 @@ extends -void +(package private) void writeHeaderAndData(org.apache.hadoop.fs.FSDataOutputStream out)
    Similar to writeHeaderAndData(FSDataOutputStream), but records the offset of this block so that it can be referenced in the next block @@ -436,7 +436,7 @@ extends
  • state

    -
    private HFileBlock.Writer.State state
    +
    private HFileBlock.Writer.State state
    Writer state. Used to ensure the correct usage protocol.
  • @@ -446,7 +446,7 @@ extends
  • dataBlockEncoder

    -
    private final HFileDataBlockEncoder dataBlockEncoder
    +
    private final HFileDataBlockEncoder dataBlockEncoder
    Data block encoder used for data blocks
  • @@ -456,7 +456,7 @@ extends
  • dataBlockEncodingCtx

    -
    private HFileBlockEncodingContext dataBlockEncodingCtx
    +
    private HFileBlockEncodingContext dataBlockEncodingCtx
  • @@ -465,7 +465,7 @@ extends
  • defaultBlockEncodingCtx

    -
    private HFileBlockDefaultEncodingContext defaultBlockEncodingCtx
    +
    private HFileBlockDefaultEncodingContext defaultBlockEncodingCtx
    block encoding context for non-data blocks
  • @@ -475,7 +475,7 @@ extends
  • baosInMemory

    -
    private ByteArrayOutputStream baosInMemory
    +
    private ByteArrayOutputStream baosInMemory
    The stream we use to accumulate data in uncompressed format for each block. We reset this stream at the end of each block and reuse it. The header is written as the first HConstants.HFILEBLOCK_HEADER_SIZE bytes into this @@ -488,7 +488,7 @@ extends
  • blockType

    -
    private BlockType blockType
    +
    private BlockType blockType
    Current block type. Set in startWriting(BlockType). Could be changed in finishBlock() from BlockType.DATA to BlockType.ENCODED_DATA.
    @@ -500,7 +500,7 @@ extends
  • userDataStream

    -
    private DataOutputStream userDataStream
    +
    private DataOutputStream userDataStream
    A stream that we write uncompressed bytes to, which compresses them and writes them to baosInMemory.
  • @@ -511,7 +511,7 @@ extends
  • unencodedDataSizeWritten

    -
    private int unencodedDataSizeWritten
    +
    private int unencodedDataSizeWritten
  • @@ -520,7 +520,7 @@ extends
  • onDiskBytesWithHeader

    -
    private byte[] onDiskBytesWithHeader
    +
    private byte[] onDiskBytesWithHeader
    Bytes to be written to the file system, including the header. Compressed if compression is turned on. It also includes the checksum data that immediately follows the block data. (header + data + checksums)
    @@ -532,7 +532,7 @@ extends
  • onDiskChecksum

    -
    private byte[] onDiskChecksum
    +
    private byte[] onDiskChecksum
    The size of the checksum data on disk. It is used only if data is not compressed. If data is compressed, then the checksums are already part of onDiskBytesWithHeader. If data is uncompressed, then this @@ -545,7 +545,7 @@ extends
  • uncompressedBytesWithHeader

    -
    private byte[] uncompressedBytesWithHeader
    +
    private byte[] uncompressedBytesWithHeader
    Valid in the READY state. Contains the header and the uncompressed (but potentially encoded, if this is a data block) bytes, so the length is HFileBlock.uncompressedSizeWithoutHeader + @@ -559,7 +559,7 @@ extends
  • startOffset

    -
    private long startOffset
    +
    private long startOffset
    Current block's start offset in the HFile. Set in writeHeaderAndData(FSDataOutputStream).
  • @@ -570,7 +570,7 @@ extends
  • prevOffsetByType

    -
    private long[] prevOffsetByType
    +
    private long[] prevOffsetByType
    Offset of previous block by block type. Updated when the next block is started.
  • @@ -581,7 +581,7 @@ extends
  • prevOffset

    -
    private long prevOffset
    +
    private long prevOffset
    The offset of the previous block of the same type
  • @@ -591,7 +591,7 @@ extends
  • fileContext

    -
    private HFileContext fileContext
    +
    private HFileContext fileContext
    Meta data that holds information about the hfileblock
  • @@ -609,7 +609,7 @@ extends
  • HFileBlock.Writer

    -
    public HFileBlock.Writer(HFileDataBlockEncoder dataBlockEncoder,
    +
    public HFileBlock.Writer(HFileDataBlockEncoder dataBlockEncoder,
                      HFileContext fileContext)
    Parameters:
    dataBlockEncoder - data block encoding algorithm to use
  • @@ -628,8 +628,8 @@ extends
  • startWriting

    -
    public DataOutputStream startWriting(BlockType newBlockType)
    -                              throws IOException
    +
    DataOutputStream startWriting(BlockType newBlockType)
    +                        throws IOException
    Starts writing into the block. The previous block's data is discarded.
    Returns:
    the stream the user can write their data into
    Throws:
    @@ -642,8 +642,8 @@ extends
  • write

    -
    public void write(Cell cell)
    -           throws IOException
    +
    void write(Cell cell)
    +     throws IOException
    Writes the Cell to this block
    Parameters:
    cell -
    Throws:
    @@ -656,7 +656,7 @@ extends
  • getUserDataStream

    -
    DataOutputStream getUserDataStream()
    +
    DataOutputStream getUserDataStream()
    Returns the stream for the user to write to. The block writer takes care of handling compression and buffering for caching on write. Can only be called in the "writing" state.
    @@ -669,7 +669,7 @@ extends
  • ensureBlockReady

    -
    void ensureBlockReady()
    +
    void ensureBlockReady()
                     throws IOException
    Transitions the block writer from the "writing" state to the "block ready" state. Does nothing if a block is already finished.
    @@ -683,7 +683,7 @@ extends
  • finishBlock

    -
    private void finishBlock()
    +
    private void finishBlock()
                       throws IOException
    An internal method that flushes the compressing stream (if using compression), serializes the header, and takes care of the separate @@ -699,7 +699,7 @@ extends
  • putHeader

    -
    private void putHeader(byte[] dest,
    +
    private void putHeader(byte[] dest,
                  int offset,
                  int onDiskSize,
                  int uncompressedSize,
    @@ -716,8 +716,8 @@ extends 
     
  • writeHeaderAndData

    -
    public void writeHeaderAndData(org.apache.hadoop.fs.FSDataOutputStream out)
    -                        throws IOException
    +
    void writeHeaderAndData(org.apache.hadoop.fs.FSDataOutputStream out)
    +                  throws IOException
    Similar to writeHeaderAndData(FSDataOutputStream), but records the offset of this block so that it can be referenced in the next block of the same type.
    @@ -732,7 +732,7 @@ extends
  • finishBlockAndWriteHeaderAndData

    -
    protected void finishBlockAndWriteHeaderAndData(DataOutputStream out)
    +
    protected void finishBlockAndWriteHeaderAndData(DataOutputStream out)
                                              throws IOException
    Writes the header and the compressed data of this block (or uncompressed data when not using compression) into the given stream. Can be called in @@ -749,7 +749,7 @@ extends
  • getHeaderAndDataForTest

    -
    byte[] getHeaderAndDataForTest()
    +
    byte[] getHeaderAndDataForTest()
                              throws IOException
    Returns the header or the compressed data (or uncompressed data when not using compression) as a byte array. Can be called in the "writing" state @@ -767,7 +767,7 @@ extends
  • release

    -
    public void release()
    +
    void release()
    Releases resources used by this writer.
  • @@ -777,7 +777,7 @@ extends
  • getOnDiskSizeWithoutHeader

    -
    int getOnDiskSizeWithoutHeader()
    +
    int getOnDiskSizeWithoutHeader()
    Returns the on-disk size of the data portion of the block. This is the compressed size if compression is enabled. Can only be called in the "block ready" state. Header is not compressed, and its size is not @@ -791,7 +791,7 @@ extends
  • getOnDiskSizeWithHeader

    -
    int getOnDiskSizeWithHeader()
    +
    int getOnDiskSizeWithHeader()
    Returns the on-disk size of the block. Can only be called in the "block ready" state.
    Returns:
    the on-disk size of the block ready to be written, including the @@ -804,7 +804,7 @@ extends
  • getUncompressedSizeWithoutHeader

    -
    int getUncompressedSizeWithoutHeader()
    +
    int getUncompressedSizeWithoutHeader()
    The uncompressed size of the block data. Does not include header size.
  • @@ -814,7 +814,7 @@ extends
  • getUncompressedSizeWithHeader

    -
    int getUncompressedSizeWithHeader()
    +
    int getUncompressedSizeWithHeader()
    The uncompressed size of the block data, including header size.
  • @@ -824,7 +824,7 @@ extends
  • isWriting

    -
    public boolean isWriting()
    +
    boolean isWriting()
    Returns:
    true if a block is being written
  • @@ -834,7 +834,7 @@ extends
  • blockSizeWritten

    -
    public int blockSizeWritten()
    +
    int blockSizeWritten()
    Returns the number of bytes written into the current block so far, or zero if not writing the block at the moment. Note that this will return zero in the "block ready" state as well.
    @@ -847,7 +847,7 @@ extends
  • getUncompressedBufferWithHeader

    -
    ByteBuffer getUncompressedBufferWithHeader()
    +
    ByteBuffer getUncompressedBufferWithHeader()
    Returns the header followed by the uncompressed data, even if using compression. This is needed for storing uncompressed blocks in the block cache. Can be called in the "writing" state or the "block ready" state. @@ -861,7 +861,7 @@ extends
  • getOnDiskBufferWithHeader

    -
    ByteBuffer getOnDiskBufferWithHeader()
    +
    ByteBuffer getOnDiskBufferWithHeader()
    Returns the header followed by the on-disk (compressed/encoded/encrypted) data. This is needed for storing packed blocks in the block cache. Expects calling semantics identical to getUncompressedBufferWithHeader(). Returns only the header and data, @@ -875,7 +875,7 @@ extends
  • expectState

    -
    private void expectState(HFileBlock.Writer.State expectedState)
    +
    private void expectState(HFileBlock.Writer.State expectedState)
  • @@ -884,9 +884,9 @@ extends
  • writeBlock

    -
    public void writeBlock(HFileBlock.BlockWritable bw,
    +
    void writeBlock(HFileBlock.BlockWritable bw,
                   org.apache.hadoop.fs.FSDataOutputStream out)
    -                throws IOException
    + throws IOException
    Takes the given HFileBlock.BlockWritable instance, creates a new block of its appropriate type, writes the writable into this block, and flushes the block into the output stream. The writer is instructed not to buffer @@ -902,7 +902,7 @@ extends
  • getBlockForCaching

    -
    public HFileBlock getBlockForCaching(CacheConfig cacheConf)
    +
    HFileBlock getBlockForCaching(CacheConfig cacheConf)
    Creates a new HFileBlock. Checksums have already been validated, so the byte buffer passed into the constructor of this newly created block does not have checksum data even though the header minor