FAQ
Repository: hive
Updated Branches:
   refs/heads/master db5fbe913 -> db4216d6c


HIVE-13160: HS2 unable to load UDFs on startup when HMS is not ready (Reviewed by Yongzhi Chen, Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/db4216d6
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/db4216d6
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/db4216d6

Branch: refs/heads/master
Commit: db4216d6c1e019d43c94a46fba8f75ce2c78d097
Parents: db5fbe9
Author: Aihua Xu <aihuaxu@apache.org>
Authored: Fri Feb 26 14:34:46 2016 -0500
Committer: Aihua Xu <aihuaxu@apache.org>
Committed: Tue Mar 1 09:28:42 2016 -0500

----------------------------------------------------------------------
  ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/db4216d6/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index aa1c925..fdc7956 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -175,7 +175,7 @@ public class Hive {
    private final static int REG_FUNCS_NO = 0, REG_FUNCS_DONE = 2, REG_FUNCS_PENDING = 1;

    // register all permanent functions. need improvement
- private void registerAllFunctionsOnce() {
+ private void registerAllFunctionsOnce() throws HiveException {
      boolean breakLoop = false;
      while (!breakLoop) {
        int val = didRegisterAllFuncs.get();
@@ -204,11 +204,12 @@ public class Hive {
      }
      try {
        reloadFunctions();
+ didRegisterAllFuncs.compareAndSet(REG_FUNCS_PENDING, REG_FUNCS_DONE);
      } catch (Exception e) {
        LOG.warn("Failed to register all functions.", e);
+ didRegisterAllFuncs.compareAndSet(REG_FUNCS_PENDING, REG_FUNCS_NO);
+ throw new HiveException(e);
      } finally {
- boolean result = didRegisterAllFuncs.compareAndSet(REG_FUNCS_PENDING, REG_FUNCS_DONE);
- assert result;
        synchronized (didRegisterAllFuncs) {
          didRegisterAllFuncs.notifyAll();
        }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedMar 1, '16 at 2:29p
activeMar 1, '16 at 2:29p
posts1
users1
websitehive.apache.org

1 user in discussion

Aihuaxu: 1 post

People

Translate

site design / logo © 2021 Grokbase