You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ek...@apache.org on 2016/12/01 01:17:23 UTC
[8/8] hive git commit: HIVE-15309 Miscellaneous logging clean up
(Eugene Koifman, reviewed by Wei Zheng)
HIVE-15309 Miscellaneous logging clean up (Eugene Koifman, reviewed by Wei Zheng)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/54b3abf5
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/54b3abf5
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/54b3abf5
Branch: refs/heads/master
Commit: 54b3abf5246765e9b173033bc9b16aec9965b00d
Parents: 185026a
Author: Eugene Koifman <ek...@hortonworks.com>
Authored: Wed Nov 30 16:27:00 2016 -0800
Committer: Eugene Koifman <ek...@hortonworks.com>
Committed: Wed Nov 30 16:27:00 2016 -0800
----------------------------------------------------------------------
.../apache/hadoop/hive/metastore/txn/TxnHandler.java | 12 ++++++------
orc/src/java/org/apache/orc/impl/OrcAcidUtils.java | 3 +++
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/54b3abf5/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
index f2b1048..b0fa836 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
@@ -2824,9 +2824,9 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
deletedLocks += stmt.executeUpdate(query);
}
if(deletedLocks > 0) {
- Collections.sort(extLockIDs);////easier to read logs
- LOG.info("Deleted " + deletedLocks + " ext locks from HIVE_LOCKS due to timeout (vs. " +
- extLockIDs.size() + " found. List: " + extLockIDs + ") maxHeartbeatTime=" + maxHeartbeatTime);
+ Collections.sort(extLockIDs);//easier to read logs
+ LOG.info("Deleted " + deletedLocks + " int locks from HIVE_LOCKS due to timeout (" +
+ "HL_LOCK_EXT_ID list: " + extLockIDs + ") maxHeartbeatTime=" + maxHeartbeatTime);
}
LOG.debug("Going to commit");
dbConn.commit();
@@ -3236,7 +3236,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
* production code as possible.
* In particular, with Derby we always run in a single process with a single metastore and
* the absence of For Update is handled via a Semaphore. The later would strictly speaking
- * make the SQL statments below unnecessary (for Derby), but then they would not be tested.
+ * make the SQL statements below unnecessary (for Derby), but then they would not be tested.
*/
Connection dbConn = null;
Statement stmt = null;
@@ -3277,7 +3277,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
derbySemaphore = derbyKey2Lock.get(key);
derbySemaphore.acquire();
}
- LOG.info(quoteString(key) + " locked by " + quoteString(TxnHandler.hostname));
+ LOG.debug(quoteString(key) + " locked by " + quoteString(TxnHandler.hostname));
//OK, so now we have a lock
return new LockHandleImpl(dbConn, stmt, rs, key, derbySemaphore);
} catch (SQLException ex) {
@@ -3334,7 +3334,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
derbySemaphore.release();
}
for(String key : keys) {
- LOG.info(quoteString(key) + " unlocked by " + quoteString(TxnHandler.hostname));
+ LOG.debug(quoteString(key) + " unlocked by " + quoteString(TxnHandler.hostname));
}
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/54b3abf5/orc/src/java/org/apache/orc/impl/OrcAcidUtils.java
----------------------------------------------------------------------
diff --git a/orc/src/java/org/apache/orc/impl/OrcAcidUtils.java b/orc/src/java/org/apache/orc/impl/OrcAcidUtils.java
index 72c7f54..7ca9e1d 100644
--- a/orc/src/java/org/apache/orc/impl/OrcAcidUtils.java
+++ b/orc/src/java/org/apache/orc/impl/OrcAcidUtils.java
@@ -54,6 +54,9 @@ public class OrcAcidUtils {
Path deltaFile) throws IOException {
Path lengths = getSideFile(deltaFile);
long result = Long.MAX_VALUE;
+ if(!fs.exists(lengths)) {
+ return result;
+ }
try (FSDataInputStream stream = fs.open(lengths)) {
result = -1;
while (stream.available() > 0) {