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/07/25 17:17:18 UTC

hive git commit: HIVE-14297 OrcRecordUpdater floods logs trying to create _orc_acid_version file (Eugene Koifman, reviewed by Owen O'Malley)

Repository: hive
Updated Branches:
  refs/heads/master cb398d15d -> b70cd7e5d


HIVE-14297 OrcRecordUpdater floods logs trying to create _orc_acid_version file (Eugene Koifman, reviewed by Owen O'Malley)


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

Branch: refs/heads/master
Commit: b70cd7e5d48b895a8073cfac490a0eafb15b77b7
Parents: cb398d1
Author: Eugene Koifman <ek...@hortonworks.com>
Authored: Mon Jul 25 10:16:53 2016 -0700
Committer: Eugene Koifman <ek...@hortonworks.com>
Committed: Mon Jul 25 10:16:53 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/io/orc/OrcRecordUpdater.java      | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b70cd7e5/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
index e577961..1a1af28 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java
@@ -187,14 +187,15 @@ public class OrcRecordUpdater implements RecordUpdater {
       fs = path.getFileSystem(options.getConfiguration());
     }
     this.fs = fs;
-    try {
-      FSDataOutputStream strm = fs.create(new Path(path, ACID_FORMAT), false);
-      strm.writeInt(ORC_ACID_VERSION);
-      strm.close();
-    } catch (IOException ioe) {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("Failed to create " + path + "/" + ACID_FORMAT + " with " +
+    Path formatFile = new Path(path, ACID_FORMAT);
+    if(!fs.exists(formatFile)) {
+      try (FSDataOutputStream strm = fs.create(formatFile, false)) {
+        strm.writeInt(ORC_ACID_VERSION);
+      } catch (IOException ioe) {
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Failed to create " + path + "/" + ACID_FORMAT + " with " +
             ioe);
+        }
       }
     }
     if (options.getMinimumTransactionId() != options.getMaximumTransactionId()