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

Support to drain RS nodes through ZK

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.90.4
    • 0.92.0
    • master
    • all

    • Reviewed
    • Hide
      Just as HDFS currently has a way to exclude certain datanodes and prevent them from getting new blocks, this feature adds marking regionservers so they will not get new regions if you add a regionserver to the draining nodes directory in zk. These draining znodes look exactly the same as the corresponding nodes in /rs, except they live under /draining. This patch adds watching of /draining and the blocking of region assignment to draining nodes; it does not provide means of writing the draining znode (use zkcli).
      Show
      Just as HDFS currently has a way to exclude certain datanodes and prevent them from getting new blocks, this feature adds marking regionservers so they will not get new regions if you add a regionserver to the draining nodes directory in zk. These draining znodes look exactly the same as the corresponding nodes in /rs, except they live under /draining. This patch adds watching of /draining and the blocking of region assignment to draining nodes; it does not provide means of writing the draining znode (use zkcli).

    Description

      HDFS currently has a way to exclude certain datanodes and prevent them from getting new blocks. HDFS goes one step further and even drains these nodes for you. This enhancement is a step in that direction.

      The idea is that we mark nodes in zookeeper as draining nodes. This means that they don't get any more new regions. These draining nodes look exactly the same as the corresponding nodes in /rs, except they live under /draining.

      Eventually, support for draining them can be added. I am submitting two patches for review - one for the 0.90 branch and one for trunk (in git).

      Here are the two patches
      0.90 - https://github.com/aravind/hbase/commit/181041e72e7ffe6a4da6d82b431ef7f8c99e62d2

      trunk - https://github.com/aravind/hbase/commit/e127b25ae3b4034103b185d8380f3b7267bc67d5

      I have tested both these patches and they work as advertised.

      Attachments

        1. trunk_with_test.txt
          22 kB
          Aravind Gottipati
        2. 4298-trunk-v3.txt
          22 kB
          Michael Stack
        3. drainingservertest-v2.txt
          5 kB
          Michael Stack
        4. drainingservertest.txt
          5 kB
          Michael Stack
        5. 4298-trunk-v2.txt
          14 kB
          Michael Stack
        6. trunk_hbase.patch
          14 kB
          Aravind Gottipati
        7. 90_hbase.patch
          13 kB
          Aravind Gottipati

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aravindg Aravind Gottipati
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: