You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2019/01/17 21:00:58 UTC
hive git commit: HIVE-18884 Simplify Logging in Hive Metastore Client
(Mani M via Alan Gates)
Repository: hive
Updated Branches:
refs/heads/master f09db52fd -> 67284b0ce
HIVE-18884 Simplify Logging in Hive Metastore Client (Mani M via Alan Gates)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/67284b0c
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/67284b0c
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/67284b0c
Branch: refs/heads/master
Commit: 67284b0cee30c28c6d80099769192dff08e4fc63
Parents: f09db52
Author: Alan Gates <ga...@hortonworks.com>
Authored: Thu Jan 17 12:58:54 2019 -0800
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Thu Jan 17 12:58:54 2019 -0800
----------------------------------------------------------------------
.../hive/metastore/HiveMetaStoreClient.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/67284b0c/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index 3c81f93..19bd9ba 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -363,7 +363,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
if (uriResolverClassName.equals("")) {
return null;
} else {
- LOG.info("Loading uri resolver" + uriResolverClassName);
+ LOG.info("Loading uri resolver : " + uriResolverClassName);
try {
Class<?> uriResolverClass = Class.forName(uriResolverClassName, true,
JavaUtils.getClassLoader());
@@ -533,7 +533,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
for (int attempt = 0; !isConnected && attempt < retries; ++attempt) {
for (URI store : metastoreUris) {
- LOG.info("Trying to connect to metastore with URI " + store);
+ LOG.info("Trying to connect to metastore with URI (" + store + ")");
try {
if (useSSL) {
@@ -549,7 +549,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
// Create an SSL socket and connect
transport = SecurityUtils.getSSLSocket(store.getHost(), store.getPort(), clientSocketTimeout,
trustStorePath, trustStorePassword );
- LOG.info("Opened an SSL connection to metastore, current connections: " + connCount.incrementAndGet());
+ LOG.debug("Opened an SSL connection to metastore, current connections: " + connCount.incrementAndGet());
if (LOG.isTraceEnabled()) {
LOG.trace("", new LogUtils.StackTraceLogger("METASTORE SSL CONNECTION TRACE - open - " +
System.identityHashCode(this)));
@@ -580,13 +580,13 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
tokenStrForm = SecurityUtils.getTokenStrForm(tokenSig);
if(tokenStrForm != null) {
- LOG.info("HMSC::open(): Found delegation token. Creating DIGEST-based thrift connection.");
+ LOG.debug("HMSC::open(): Found delegation token. Creating DIGEST-based thrift connection.");
// authenticate using delegation tokens via the "DIGEST" mechanism
transport = authBridge.createClientTransport(null, store.getHost(),
"DIGEST", tokenStrForm, transport,
MetaStoreUtils.getMetaStoreSaslProperties(conf, useSSL));
} else {
- LOG.info("HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.");
+ LOG.debug("HMSC::open(): Could not find delegation token. Creating KERBEROS-based thrift connection.");
String principalConfig =
MetastoreConf.getVar(conf, ConfVars.KERBEROS_PRINCIPAL);
transport = authBridge.createClientTransport(
@@ -613,7 +613,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
try {
if (!transport.isOpen()) {
transport.open();
- LOG.info("Opened a connection to metastore, current connections: " + connCount.incrementAndGet());
+ LOG.info("Opened a connection to metastore, URI (" + store + ") current connections: " + connCount.incrementAndGet());
if (LOG.isTraceEnabled()) {
LOG.trace("", new LogUtils.StackTraceLogger("METASTORE CONNECTION TRACE - open - " +
System.identityHashCode(this)));
@@ -623,10 +623,10 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
} catch (TTransportException e) {
tte = e;
if (LOG.isDebugEnabled()) {
- LOG.warn("Failed to connect to the MetaStore Server...", e);
+ LOG.warn("Failed to connect to the MetaStore Server URI (" + store + ")", e);
} else {
// Don't print full exception trace if DEBUG is not on.
- LOG.warn("Failed to connect to the MetaStore Server...");
+ LOG.warn("Failed to connect to the MetaStore Server URI (" + store + ")");
}
}
@@ -647,8 +647,8 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
}
}
} catch (MetaException e) {
- LOG.error("Unable to connect to metastore with URI " + store
- + " in attempt " + attempt, e);
+ LOG.error("Failed to connect to metastore with URI (" + store
+ + ") in attempt " + attempt, e);
}
if (isConnected) {
break;