FAQ
Repository: hive
Updated Branches:
   refs/heads/branch-2.1 0adb2255c -> cc5db0dcd


HIVE-13929 org.apache.hadoop.hive.metastore.api.DataOperationType class not found error when a job is submitted by hive (Eugene Koifman, reviewed by Ashutosh Chauhan)


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

Branch: refs/heads/branch-2.1
Commit: cc5db0dcd17523e723aff5933dd6b95f1ef18f62
Parents: 0adb225
Author: Eugene Koifman <ekoifman@hortonworks.com>
Authored: Thu Jun 2 20:41:48 2016 -0700
Committer: Eugene Koifman <ekoifman@hortonworks.com>
Committed: Thu Jun 2 20:41:48 2016 -0700

----------------------------------------------------------------------
  .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 32 +++++++++++++-------
  .../apache/hadoop/hive/ql/metadata/Hive.java | 2 +-
  2 files changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/cc5db0dc/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
index bac38ce..25055c2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
@@ -223,17 +223,27 @@ public class AcidUtils {
    }

    public enum Operation {
- NOT_ACID(DataOperationType.UNSET),
- INSERT(DataOperationType.INSERT),
- UPDATE(DataOperationType.UPDATE),
- DELETE(DataOperationType.DELETE);
-
- private final DataOperationType dop;
- private Operation(DataOperationType dop) {
- this.dop = dop;
- }
- public DataOperationType toDataOperationType() {
- return dop;
+ NOT_ACID, INSERT, UPDATE, DELETE;
+ }
+
+ /**
+ * Logically this should have been defined in Operation but that causes a dependency
+ * on metastore package from exec jar (from the cluster) which is not allowed.
+ * This method should only be called from client side where metastore.* classes are present.
+ * Not following this will not be caught by unit tests since they have all the jar loaded.
+ */
+ public static DataOperationType toDataOperationType(Operation op) {
+ switch (op) {
+ case NOT_ACID:
+ return DataOperationType.UNSET;
+ case INSERT:
+ return DataOperationType.INSERT;
+ case UPDATE:
+ return DataOperationType.UPDATE;
+ case DELETE:
+ return DataOperationType.DELETE;
+ default:
+ throw new IllegalArgumentException("Unexpected Operation: " + op);
      }
    }


http://git-wip-us.apache.org/repos/asf/hive/blob/cc5db0dc/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index ee6c564..3a7d3bb 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -1760,7 +1760,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
            partNames.add(p.getName());
          }
          metaStoreClient.addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(),
- partNames, operation.toDataOperationType());
+ partNames, AcidUtils.toDataOperationType(operation));
        }
        return partitionsMap;
      } catch (IOException e) {

Search Discussions

  • Ekoifman at Jun 3, 2016 at 3:43 am
    Repository: hive
    Updated Branches:
       refs/heads/master 6d8b9d2d7 -> 3b04ce3d1


    HIVE-13929 org.apache.hadoop.hive.metastore.api.DataOperationType class not found error when a job is submitted by hive (Eugene Koifman, reviewed by Ashutosh Chauhan)


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

    Branch: refs/heads/master
    Commit: 3b04ce3d14d70d2bb08a3c02022b4efe85e00645
    Parents: 6d8b9d2
    Author: Eugene Koifman <ekoifman@hortonworks.com>
    Authored: Thu Jun 2 19:56:04 2016 -0700
    Committer: Eugene Koifman <ekoifman@hortonworks.com>
    Committed: Thu Jun 2 19:56:16 2016 -0700

    ----------------------------------------------------------------------
      .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 32 +++++++++++++-------
      .../apache/hadoop/hive/ql/metadata/Hive.java | 2 +-
      2 files changed, 22 insertions(+), 12 deletions(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/hive/blob/3b04ce3d/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    index 496bd0f..36f38f6 100644
    --- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    +++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    @@ -223,17 +223,27 @@ public class AcidUtils {
        }

        public enum Operation {
    - NOT_ACID(DataOperationType.UNSET),
    - INSERT(DataOperationType.INSERT),
    - UPDATE(DataOperationType.UPDATE),
    - DELETE(DataOperationType.DELETE);
    -
    - private final DataOperationType dop;
    - private Operation(DataOperationType dop) {
    - this.dop = dop;
    - }
    - public DataOperationType toDataOperationType() {
    - return dop;
    + NOT_ACID, INSERT, UPDATE, DELETE;
    + }
    +
    + /**
    + * Logically this should have been defined in Operation but that causes a dependency
    + * on metastore package from exec jar (from the cluster) which is not allowed.
    + * This method should only be called from client side where metastore.* classes are present.
    + * Not following this will not be caught by unit tests since they have all the jar loaded.
    + */
    + public static DataOperationType toDataOperationType(Operation op) {
    + switch (op) {
    + case NOT_ACID:
    + return DataOperationType.UNSET;
    + case INSERT:
    + return DataOperationType.INSERT;
    + case UPDATE:
    + return DataOperationType.UPDATE;
    + case DELETE:
    + return DataOperationType.DELETE;
    + default:
    + throw new IllegalArgumentException("Unexpected Operation: " + op);
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/3b04ce3d/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    index ee6c564..3a7d3bb 100644
    --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    @@ -1760,7 +1760,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
                partNames.add(p.getName());
              }
              metaStoreClient.addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(),
    - partNames, operation.toDataOperationType());
    + partNames, AcidUtils.toDataOperationType(operation));
            }
            return partitionsMap;
          } catch (IOException e) {
  • Ekoifman at Jun 3, 2016 at 3:46 am
    Repository: hive
    Updated Branches:
       refs/heads/branch-1 d9b2001f0 -> ad244efe4


    HIVE-13929 org.apache.hadoop.hive.metastore.api.DataOperationType class not found error when a job is submitted by hive (Eugene Koifman, reviewed by Ashutosh Chauhan)


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

    Branch: refs/heads/branch-1
    Commit: ad244efe4550291a4b01927aef1545b84fd01d51
    Parents: d9b2001
    Author: Eugene Koifman <ekoifman@hortonworks.com>
    Authored: Thu Jun 2 20:44:24 2016 -0700
    Committer: Eugene Koifman <ekoifman@hortonworks.com>
    Committed: Thu Jun 2 20:44:24 2016 -0700

    ----------------------------------------------------------------------
      .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 32 +++++++++++++-------
      .../apache/hadoop/hive/ql/metadata/Hive.java | 2 +-
      2 files changed, 22 insertions(+), 12 deletions(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/hive/blob/ad244efe/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    index cf93bc5..8bcf6d7 100644
    --- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    +++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
    @@ -219,17 +219,27 @@ public class AcidUtils {
        }

        public enum Operation {
    - NOT_ACID(DataOperationType.UNSET),
    - INSERT(DataOperationType.INSERT),
    - UPDATE(DataOperationType.UPDATE),
    - DELETE(DataOperationType.DELETE);
    -
    - private final DataOperationType dop;
    - private Operation(DataOperationType dop) {
    - this.dop = dop;
    - }
    - public DataOperationType toDataOperationType() {
    - return dop;
    + NOT_ACID, INSERT, UPDATE, DELETE;
    + }
    +
    + /**
    + * Logically this should have been defined in Operation but that causes a dependency
    + * on metastore package from exec jar (from the cluster) which is not allowed.
    + * This method should only be called from client side where metastore.* classes are present.
    + * Not following this will not be caught by unit tests since they have all the jar loaded.
    + */
    + public static DataOperationType toDataOperationType(Operation op) {
    + switch (op) {
    + case NOT_ACID:
    + return DataOperationType.UNSET;
    + case INSERT:
    + return DataOperationType.INSERT;
    + case UPDATE:
    + return DataOperationType.UPDATE;
    + case DELETE:
    + return DataOperationType.DELETE;
    + default:
    + throw new IllegalArgumentException("Unexpected Operation: " + op);
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/ad244efe/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    index 6362d23..4a0b685 100644
    --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
    @@ -1605,7 +1605,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
                partNames.add(p.getName());
              }
              metaStoreClient.addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(),
    - partNames, operation.toDataOperationType());
    + partNames, AcidUtils.toDataOperationType(operation));
            }
            return partitionsMap;
          } catch (IOException e) {

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJun 3, '16 at 3:42a
activeJun 3, '16 at 3:46a
posts3
users1
websitehive.apache.org

1 user in discussion

Ekoifman: 3 posts

People

Translate

site design / logo © 2021 Grokbase