Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14790 Implement a new DFSOutputStream for logging WAL only
  3. HBASE-16891

Try copying to the Netty ByteBuf directly from the WALEdit

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • wal
    • None
    • Reviewed

    Description

      -> The FanOutOneBlockAsyncDFSOutput is a much sophisticated dfs client model that works with Netty ByteBuf. Here we hold on connection to the datanodes using
      Netty Channels. And the idea is to write data direclty to these channels.
      AsyncHLog gets an append call. The AysncWAL uses the HBase's ByteArrayOutputSTream and so the content of the cell is written to this BAOS and that is again
      copied to the netty Bytebuf in the FanOutOneBlockAsyncDFSOutput.
      So when the sync call happens this FanoutDFSoutput does the checksum calcualtion itself and then writes the content of this buffer direclty to the DN channel.

      -> In case of FSHLOg this is different. When an append call comes we direclty write the content to the FSDataOutputStream (it is copied to this stream).
      Then here internally there is a checkSum calculation that happens. when a sync call happens there is noth ing to do except to notify the NN to flush the latest
      data.

      AS we can see from the above that there are two copies in AsyncWAL

      -> From the Cell to the BAOS
      -> From the BAOS to the Netty byte buf
      -> On sync() call, do check sum and finally flush the netty byte buf to the DN channel

      In case of FSHLog
      -> From cell to the FSDataoutputstream. data is copied. Check sum happens here.
      -> Sync call just tries to notify the NN.

      Attachments

        1. HBASE-16891-v3.patch
          17 kB
          Duo Zhang
        2. HBASE-16891-v2.patch
          13 kB
          Duo Zhang
        3. HBASE-16891-v1.patch
          6 kB
          Duo Zhang
        4. HBASE-16891.patch
          7 kB
          ramkrishna.s.vasudevan

        Activity

          People

            zhangduo Duo Zhang
            ram_krish ramkrishna.s.vasudevan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: