Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19106

Hive ZooKeeper Locking - Throw and Log

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.3.2, 3.0.0
    • 4.0.0-alpha-1
    • Locking

    Description

      ...
            } catch (Exception e) {
              if (tryNum >= numRetriesForUnLock) {
                String name = ((ZooKeeperHiveLock)hiveLock).getPath();
                LOG.error("Node " + name + " can not be deleted after " + numRetriesForUnLock + " attempts.");
                throw new LockException(e);
              }
            }
      

      Do not log and throw. Only throw and move the message into the LockException. There is already error level logging up the stack.

      https://github.com/apache/hive/blob/6d890faf22fd1ede3658a5eed097476eab3c67e9/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java#L492-L495

      Attachments

        1. HIVE-19106.03.patch
          1.0 kB
          Igor Kryvenko
        2. HIVE-19106.02.patch
          1.0 kB
          Igor Kryvenko
        3. HIVE-19106.01.patch
          1 kB
          Igor Kryvenko

        Issue Links

          Activity

            People

              ikryvenko Igor Kryvenko
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: