Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19673

Backport " Periodically ensure records are not buffered too long by BufferedMutator" to branch-1

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • Client
    • None
    • Reviewed
    • Hide
      The BufferedMutator now supports two settings that are used to ensure records do not stay too long in the buffer of a BufferedMutator. For periodically flushing the BufferedMutator there is now a "Timeout": "How old may the oldest record in the buffer be before we force a flush" and a "TimerTick": How often do we check if the timeout has been exceeded. Using these settings you can make the BufferedMutator automatically flush the write buffer if after the specified number of milliseconds no flush has occurred.

      This is mainly useful in streaming scenarios (i.e. writing data into HBase using Apache Flink/Beam/Storm) where it is common (especially in a test/development situation) to see small unpredictable bursts of data that need to be written into HBase. When using the BufferedMutator till now the effect was that records would remain in the write buffer until the buffer was full or an explicit flush was triggered. In practice this would mean that the 'last few records' of a burst would remain in the write buffer until the next burst arrives filling the buffer to capacity and thus triggering a flush.
      Show
      The BufferedMutator now supports two settings that are used to ensure records do not stay too long in the buffer of a BufferedMutator. For periodically flushing the BufferedMutator there is now a "Timeout": "How old may the oldest record in the buffer be before we force a flush" and a "TimerTick": How often do we check if the timeout has been exceeded. Using these settings you can make the BufferedMutator automatically flush the write buffer if after the specified number of milliseconds no flush has occurred. This is mainly useful in streaming scenarios (i.e. writing data into HBase using Apache Flink/Beam/Storm) where it is common (especially in a test/development situation) to see small unpredictable bursts of data that need to be written into HBase. When using the BufferedMutator till now the effect was that records would remain in the write buffer until the buffer was full or an explicit flush was triggered. In practice this would mean that the 'last few records' of a burst would remain in the write buffer until the next burst arrives filling the buffer to capacity and thus triggering a flush.

    Description

      In HBASE-19486 the feature was built to periodically flush the BufferedMutator.
      Because backwards compatibility is important in the 1.x branch some refactoring is needed to make this work.

      As requested by chia7712 this separate issue was created

      Attachments

        1. HBASE-19673.20171230-130631.branch-1.patch
          33 kB
          Niels Basjes
        2. HBASE-19673.20171230-131955.branch-1.patch
          33 kB
          Niels Basjes
        3. HBASE-19673.20171231-112539.branch-1.patch
          34 kB
          Niels Basjes
        4. HBASE-19673.20180102-082937.branch-1.patch
          34 kB
          Niels Basjes
        5. HBASE-19673.20180102-155006.branch-1.patch
          33 kB
          Niels Basjes
        6. HBASE-19673.20180103-084857.branch-1.patch
          30 kB
          Niels Basjes
        7. HBASE-19673.branch-1.20180103-170905.patch
          33 kB
          Niels Basjes
        8. HBASE-19673.branch-1.20180105-092230.patch
          30 kB
          Niels Basjes

        Issue Links

          Activity

            People

              nielsbasjes Niels Basjes
              nielsbasjes Niels Basjes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: