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 2017/11/06 22:08:37 UTC

[17/17] hive git commit: HIVE-17990 Add Thrift and DB storage for Schema Registry objects

HIVE-17990 Add Thrift and DB storage for Schema Registry objects


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

Branch: refs/heads/standalone-metastore
Commit: 25bc3c6971954140e3bd1a1120538fa972f8a8f3
Parents: 8af7b86
Author: Alan Gates <ga...@hortonworks.com>
Authored: Thu Oct 19 16:49:38 2017 -0700
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Mon Nov 6 14:07:40 2017 -0800

----------------------------------------------------------------------
 .../listener/DummyRawStoreFailEvent.java        |    74 +
 metastore/src/gen/thrift/gen-py/__init__.py     |     0
 standalone-metastore/pom.xml                    |     3 +-
 .../gen/thrift/gen-cpp/ThriftHiveMetastore.cpp  | 34656 ++++++++++-------
 .../gen/thrift/gen-cpp/ThriftHiveMetastore.h    |  2427 +-
 .../ThriftHiveMetastore_server.skeleton.cpp     |    70 +
 .../gen/thrift/gen-cpp/hive_metastore_types.cpp |  4780 ++-
 .../gen/thrift/gen-cpp/hive_metastore_types.h   |   465 +-
 .../hive/metastore/api/ClientCapability.java    |     8 +-
 .../metastore/api/FindSchemasByColsResp.java    |   449 +
 .../api/FindSchemasByColsRespEntry.java         |   497 +
 .../metastore/api/FindSchemasByColsRqst.java    |   605 +
 .../hadoop/hive/metastore/api/ISchema.java      |  1162 +
 .../hive/metastore/api/SchemaCompatibility.java |    51 +
 .../hadoop/hive/metastore/api/SchemaType.java   |    45 +
 .../hive/metastore/api/SchemaValidation.java    |    45 +
 .../hive/metastore/api/SchemaVersion.java       |  1407 +
 .../hive/metastore/api/SchemaVersionState.java  |    63 +
 .../hadoop/hive/metastore/api/SerDeInfo.java    |   443 +-
 .../hadoop/hive/metastore/api/SerdeType.java    |    45 +
 .../hive/metastore/api/ThriftHiveMetastore.java | 19160 ++++++++-
 .../api/WMAlterResourcePlanRequest.java         |     2 +-
 .../api/WMAlterResourcePlanResponse.java        |     2 +-
 .../metastore/api/WMAlterTriggerRequest.java    |     2 +-
 .../metastore/api/WMAlterTriggerResponse.java   |     2 +-
 .../api/WMCreateResourcePlanRequest.java        |     2 +-
 .../api/WMCreateResourcePlanResponse.java       |     2 +-
 .../metastore/api/WMCreateTriggerRequest.java   |     2 +-
 .../metastore/api/WMCreateTriggerResponse.java  |     2 +-
 .../api/WMDropResourcePlanRequest.java          |     2 +-
 .../api/WMDropResourcePlanResponse.java         |     2 +-
 .../metastore/api/WMDropTriggerRequest.java     |     2 +-
 .../metastore/api/WMDropTriggerResponse.java    |     2 +-
 .../api/WMGetAllResourcePlanRequest.java        |     2 +-
 .../api/WMGetAllResourcePlanResponse.java       |     2 +-
 .../metastore/api/WMGetResourcePlanRequest.java |     2 +-
 .../api/WMGetResourcePlanResponse.java          |     2 +-
 .../api/WMGetTriggersForResourePlanRequest.java |     2 +-
 .../WMGetTriggersForResourePlanResponse.java    |     2 +-
 .../hadoop/hive/metastore/api/WMMapping.java    |     2 +-
 .../hadoop/hive/metastore/api/WMPool.java       |     2 +-
 .../hive/metastore/api/WMResourcePlan.java      |     2 +-
 .../hadoop/hive/metastore/api/WMTrigger.java    |     2 +-
 .../api/WMValidateResourcePlanRequest.java      |     2 +-
 .../api/WMValidateResourcePlanResponse.java     |     2 +-
 .../gen-php/metastore/ThriftHiveMetastore.php   | 27030 +++++++------
 .../src/gen/thrift/gen-php/metastore/Types.php  |  1026 +
 .../hive_metastore/ThriftHiveMetastore-remote   |    98 +
 .../hive_metastore/ThriftHiveMetastore.py       |  5256 ++-
 .../gen/thrift/gen-py/hive_metastore/ttypes.py  |   739 +-
 .../gen/thrift/gen-rb/hive_metastore_types.rb   |   186 +-
 .../gen/thrift/gen-rb/thrift_hive_metastore.rb  |   932 +
 .../hadoop/hive/metastore/HiveMetaStore.java    |   456 +-
 .../hive/metastore/HiveMetaStoreClient.java     |    71 +
 .../hadoop/hive/metastore/IMetaStoreClient.java |   158 +
 .../hive/metastore/MetaStoreEventListener.java  |    26 +
 .../metastore/MetaStoreListenerNotifier.java    |    42 +
 .../hadoop/hive/metastore/ObjectStore.java      |   408 +-
 .../apache/hadoop/hive/metastore/RawStore.java  |   135 +
 .../hive/metastore/cache/CachedStore.java       |    75 +
 .../client/builder/DatabaseBuilder.java         |     2 +-
 .../client/builder/ISchemaBuilder.java          |    93 +
 .../client/builder/SchemaVersionBuilder.java    |    90 +
 .../client/builder/SerdeAndColsBuilder.java     |   124 +
 .../builder/StorageDescriptorBuilder.java       |    57 +-
 .../metastore/events/AddSchemaVersionEvent.java |    40 +
 .../metastore/events/AlterISchemaEvent.java     |    45 +
 .../events/AlterSchemaVersionEvent.java         |    46 +
 .../metastore/events/CreateISchemaEvent.java    |    39 +
 .../hive/metastore/events/DropISchemaEvent.java |    39 +
 .../events/DropSchemaVersionEvent.java          |    40 +
 .../events/PreAddSchemaVersionEvent.java        |    39 +
 .../metastore/events/PreAlterISchemaEvent.java  |    44 +
 .../events/PreAlterSchemaVersionEvent.java      |    45 +
 .../metastore/events/PreCreateISchemaEvent.java |    39 +
 .../metastore/events/PreDropISchemaEvent.java   |    39 +
 .../events/PreDropSchemaVersionEvent.java       |    39 +
 .../hive/metastore/events/PreEventContext.java  |    10 +-
 .../metastore/events/PreReadISchemaEvent.java   |    39 +
 .../events/PreReadhSchemaVersionEvent.java      |    36 +
 .../hive/metastore/messaging/EventMessage.java  |     8 +-
 .../metastore/messaging/MessageFactory.java     |     7 +
 .../hadoop/hive/metastore/model/MISchema.java   |   107 +
 .../hive/metastore/model/MSchemaVersion.java    |   127 +
 .../hadoop/hive/metastore/model/MSerDeInfo.java |    48 +-
 .../main/resources/datanucleus-log4j.properties |    17 +
 .../src/main/resources/package.jdo              |    77 +
 .../main/sql/derby/hive-schema-3.0.0.derby.sql  |    30 +-
 .../sql/derby/upgrade-2.3.0-to-3.0.0.derby.sql  |    34 +
 .../main/sql/mssql/hive-schema-3.0.0.mssql.sql  |    33 +-
 .../sql/mssql/upgrade-2.3.0-to-3.0.0.mssql.sql  |    33 +
 .../main/sql/mysql/hive-schema-3.0.0.mysql.sql  |    38 +
 .../sql/mysql/upgrade-2.3.0-to-3.0.0.mysql.sql  |    38 +
 .../sql/oracle/hive-schema-3.0.0.oracle.sql     |    33 +-
 .../oracle/upgrade-2.3.0-to-3.0.0.oracle.sql    |    34 +
 .../sql/postgres/hive-schema-3.0.0.postgres.sql |    34 +-
 .../upgrade-2.3.0-to-3.0.0.postgres.sql         |    34 +
 .../src/main/thrift/hive_metastore.thrift       |   111 +-
 .../DummyRawStoreControlledCommit.java          |    73 +
 .../DummyRawStoreForJdoConnection.java          |    72 +
 .../TestHiveMetaStoreSchemaMethods.java         |   888 +
 .../hadoop/hive/metastore/TestObjectStore.java  |    38 +-
 .../metastore/TestObjectStoreSchemaMethods.java |   550 +
 .../hive/metastore/cache/TestCachedStore.java   |     4 +-
 104 files changed, 75647 insertions(+), 30907 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/25bc3c69/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
----------------------------------------------------------------------
diff --git a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
index 5a627ce..22f8c2a 100644
--- a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
+++ b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.FileMetadataExprType;
 import org.apache.hadoop.hive.metastore.api.Function;
 import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege;
+import org.apache.hadoop.hive.metastore.api.ISchema;
 import org.apache.hadoop.hive.metastore.api.Index;
 import org.apache.hadoop.hive.metastore.api.InvalidInputException;
 import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
@@ -58,6 +59,8 @@ import org.apache.hadoop.hive.metastore.api.PartitionValuesResponse;
 import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet;
 import org.apache.hadoop.hive.metastore.api.PrincipalType;
 import org.apache.hadoop.hive.metastore.api.PrivilegeBag;
+import org.apache.hadoop.hive.metastore.api.SchemaVersion;
+import org.apache.hadoop.hive.metastore.api.SerDeInfo;
 import org.apache.hadoop.hive.metastore.api.WMResourcePlan;
 import org.apache.hadoop.hive.metastore.api.WMTrigger;
 import org.apache.hadoop.hive.metastore.api.Role;
@@ -1036,4 +1039,75 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
       throws NoSuchObjectException, MetaException {
     return objectStore.getTriggersForResourcePlan(resourcePlanName);
   }
+
+  @Override
+  public void createISchema(ISchema schema) throws AlreadyExistsException, MetaException,
+      NoSuchObjectException {
+    objectStore.createISchema(schema);
+  }
+
+  @Override
+  public void alterISchema(String schemaName, ISchema newSchema) throws NoSuchObjectException,
+      MetaException {
+    objectStore.alterISchema(schemaName, newSchema);
+  }
+
+  @Override
+  public ISchema getISchema(String schemaName) throws MetaException {
+    return objectStore.getISchema(schemaName);
+  }
+
+  @Override
+  public void dropISchema(String schemaName) throws NoSuchObjectException, MetaException {
+    objectStore.dropISchema(schemaName);
+  }
+
+  @Override
+  public void addSchemaVersion(SchemaVersion schemaVersion) throws AlreadyExistsException,
+      InvalidObjectException, NoSuchObjectException, MetaException {
+    objectStore.addSchemaVersion(schemaVersion);
+  }
+
+  @Override
+  public void alterSchemaVersion(String schemaName, int version, SchemaVersion newVersion) throws
+      NoSuchObjectException, MetaException {
+    objectStore.alterSchemaVersion(schemaName, version, newVersion);
+  }
+
+  @Override
+  public SchemaVersion getSchemaVersion(String schemaName, int version) throws MetaException {
+    return objectStore.getSchemaVersion(schemaName, version);
+  }
+
+  @Override
+  public SchemaVersion getLatestSchemaVersion(String schemaName) throws MetaException {
+    return objectStore.getLatestSchemaVersion(schemaName);
+  }
+
+  @Override
+  public List<SchemaVersion> getAllSchemaVersion(String schemaName) throws MetaException {
+    return objectStore.getAllSchemaVersion(schemaName);
+  }
+
+  @Override
+  public List<SchemaVersion> getSchemaVersionsByColumns(String colName, String colNamespace,
+                                                        String type) throws MetaException {
+    return objectStore.getSchemaVersionsByColumns(colName, colNamespace, type);
+  }
+
+  @Override
+  public void dropSchemaVersion(String schemaName, int version) throws NoSuchObjectException,
+      MetaException {
+    objectStore.dropSchemaVersion(schemaName, version);
+  }
+
+  @Override
+  public SerDeInfo getSerDeInfo(String serDeName) throws NoSuchObjectException, MetaException {
+    return objectStore.getSerDeInfo(serDeName);
+  }
+
+  @Override
+  public void addSerde(SerDeInfo serde) throws AlreadyExistsException, MetaException {
+    objectStore.addSerde(serde);
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/25bc3c69/metastore/src/gen/thrift/gen-py/__init__.py
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-py/__init__.py b/metastore/src/gen/thrift/gen-py/__init__.py
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hive/blob/25bc3c69/standalone-metastore/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index b7e9de4..24d6137 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -592,7 +592,8 @@
         <version>4.0.5</version>
         <configuration>
           <api>JDO</api>
-          <verbose>true</verbose>
+          <verbose>false</verbose>
+          <log4jConfiguration>${basedir}/src/main/resources/datanucleus-log4j.properties</log4jConfiguration>
           <metadataIncludes>**/*.jdo</metadataIncludes>
           <fork>false</fork>
         </configuration>