diff --git metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java index 382df1f..b7262ba 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java @@ -2787,9 +2787,9 @@ private void timeOutLocks(Connection dbConn, long now) { 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(); @@ -3199,7 +3199,7 @@ public LockHandle acquireLock(String key) throws MetaException { * 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; @@ -3235,7 +3235,7 @@ public LockHandle acquireLock(String key) throws MetaException { 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) { @@ -3292,7 +3292,7 @@ public void releaseLocks() { derbySemaphore.release(); } for(String key : keys) { - LOG.info(quoteString(key) + " unlocked by " + quoteString(TxnHandler.hostname)); + LOG.debug(quoteString(key) + " unlocked by " + quoteString(TxnHandler.hostname)); } } } diff --git orc/src/java/org/apache/orc/impl/OrcAcidUtils.java orc/src/java/org/apache/orc/impl/OrcAcidUtils.java index 72c7f54..7ca9e1d 100644 --- orc/src/java/org/apache/orc/impl/OrcAcidUtils.java +++ orc/src/java/org/apache/orc/impl/OrcAcidUtils.java @@ -54,6 +54,9 @@ public static long getLastFlushLength(FileSystem fs, 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) {