HBase
  1. HBase
  2. HBASE-7334

We should expire the zk session for crashed servers rather than deleting ephemeral znodes

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.95.2
    • Fix Version/s: None
    • Component/s: master, regionserver, Zookeeper
    • Labels:
      None

      Description

      For faster recovery HBASE-5844 and HBASE-5926 added logic to delete the ephemeral znodes for the master and region server from the hbase-daemon.sh script. However, the master and RSs have other ephemeral nodes that are not cleaned (for example region splitting, table lock)

      Instead of deleting the main znode, we can just invalidate the zookeeper session by doing smt like HBaseTestingUtility.expireSession().

      For this we need to keep the zk.getSessionId() and zk.getSessionPasswd() around(write to a local file), keep the file updated for reconnections, and once we know that the zk session is gone in ZNodeClearer, we can just create a new session with the same credentials, and close that one, effectively causing zk to delete all ephemeral nodes for the session.

        Issue Links

          Activity

          Hide
          Andrew Purtell added a comment -

          See also ZOOKEEPER-829.

          Show
          Andrew Purtell added a comment - See also ZOOKEEPER-829 .
          Hide
          Nicolas Liochon added a comment -

          Is there a security impact if we keep the password in a file? We can do some dissimulation, but it's will have to be readable, at least by the user account used to start/stop hbase.

          Show
          Nicolas Liochon added a comment - Is there a security impact if we keep the password in a file? We can do some dissimulation, but it's will have to be readable, at least by the user account used to start/stop hbase.
          Hide
          Enis Soztutar added a comment -

          Is there a security impact if we keep the password in a file? We can do some dissimulation, but it's will have to be readable, at least by the user account used to start/stop hbase.

          Good question. If we make that file only readable by the hbase user it should be fine I think, since he has access to the credentials anyway.

          Show
          Enis Soztutar added a comment - Is there a security impact if we keep the password in a file? We can do some dissimulation, but it's will have to be readable, at least by the user account used to start/stop hbase. Good question. If we make that file only readable by the hbase user it should be fine I think, since he has access to the credentials anyway.

            People

            • Assignee:
              Unassigned
              Reporter:
              Enis Soztutar
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development