You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by dm...@apache.org on 2019/11/01 14:26:41 UTC

[hive] branch master updated: HIVE-22421: Improve Logging If Configuration File Not Found (David Mollitor, reviewed by Peter Vary)

This is an automated email from the ASF dual-hosted git repository.

dmollitor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c2b7fa  HIVE-22421: Improve Logging If Configuration File Not Found (David Mollitor, reviewed by Peter Vary)
1c2b7fa is described below

commit 1c2b7fa1b31f9228812b66a21ad4bd45ae5b7c50
Author: David Mollitor <dm...@apache.org>
AuthorDate: Fri Nov 1 10:25:52 2019 -0400

    HIVE-22421: Improve Logging If Configuration File Not Found (David Mollitor, reviewed by Peter Vary)
---
 .../org/apache/hadoop/hive/metastore/conf/MetastoreConf.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
index a496a59..84462af 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
@@ -1565,16 +1565,18 @@ public class MetastoreConf {
                 LOG.warn("Cannot get jar URI", e);
               }
               result = seeIfConfAtThisLocation(new File(jarUri).getParent(), name, true);
-              // At this point if we haven't found it, screw it, we don't know where it is
-              if (result == null) {
-                LOG.info("Unable to find config file " + name);
-              }
             }
           }
         }
       }
     }
-    LOG.info("Found configuration file " + result);
+
+    if (result == null) {
+      LOG.info("Unable to find config file: " + name);
+    } else {
+      LOG.info("Found configuration file: " + result);
+    }
+
     return result;
   }