Remove hive - DO NOT MERGE. #682
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE
Executive Summary
This commit removes the
metacat-connector-hivemodule entirely, eliminating the Hive Metastore connector as a pluggable backend. The change required extracting reusable components (Iceberg handling, common view support, type converters) into shared modules while preserving Thrift protocol support for legacy compatibility.Step-by-Step Cascading Effects
1. Module Removal
The
metacat-connector-hivemodule was deleted fromsettings.gradleand all build configurations. This module contained:2. Extraction to
metacat-common-serverThe following components were extracted because they are used by the Polaris connector independently of Hive:
Iceberg Components (→
common.server.connector.iceberg):IcebergTableHandler,IcebergTableWrapper,IcebergTableOpsIcebergTableCriteria,IcebergTableCriteriaImplIcebergTableOpWrapper,IcebergTableOpsProxyIcebergMetastoreTables,IcebergRequestMetricsDataMetadataMetrics,DataMetadataMetricConstantsCommon View Support (→
common.server.connector.commonview):CommonViewHandlerSQL Support (→
common.server.connector.sql):DirectSqlTable(subset - only the interface/base needed by Polaris)Converters (→
common.server.converter):IcebergTypeConverter- converts Iceberg types to Metacat types without Hive dependenciesIcebergTableInfoConverter- converts Iceberg tables toTableInfowithout Hive Thrift typesUtilities (→
common.server.util.hive):HiveTableUtil,HiveConfigConstants,IcebergFilterGeneratorHiveMetrics,HiveConnectorFastServiceMetricBuild changes: Added
hadoop-core,guava-retrying, andiceberg-spark-runtimedependencies tometacat-common-server.3. Extraction to
metacat-thriftThrift protocol support requires Hive type conversions. These were moved here because Thrift is the only remaining consumer:
HiveConnectorInfoConverter- converts between Hive Thrift types (Database,Table,Partition) and Metacat modelsHiveTypeConverter,HiveTypeMapping- Hive-to-Metacat type mappingHiveTableStructUtil- new utility for Thrift struct operationsThe Thrift module now has a direct dependency on Hive libraries solely for protocol compatibility.
4. Polaris Connector Changes
The Polaris connector previously depended on
metacat-connector-hive. Changes:api(project(":metacat-connector-hive"))deleted frombuild.gradleconnector.hive.*tocommon.server.connector.*orcommon.server.converter.*HiveTypeConvertertoIcebergTypeConverterHiveConnectorInfoConvertertoIcebergTableInfoConverterPolarisConnectorInfoConverter(no-op implementation since Polaris uses internal converters)5. Main Application Changes
ThriftConfig.java: Added
@PostConstructmethod to registerHiveTypeConverterunder the "hive" key withTypeConverterFactory. This is required becauseCatalogThriftEventHandlersets the data type context to "hive" for all Thrift requests, regardless of which connector module is loaded.Build.gradle: Removed
runtimeOnly(project(":metacat-connector-hive")).6. Functional Test Changes
TestCatalogs.groovy:
hive-metastorecatalog from test catalog listvalidateWithHivefieldgetThriftImplementersToValidateWithHive()methodpolaris-metastoreandpolaris-metastore-testcatalogs with explicit capability flagsDocker Compose:
hive-metastore/fsmoke_acltopolaris-metastore/fsmoke_aclhive-metastore.propertiescatalog configsTest Spec Files (-1,652 lines net):
MetacatFunctionalSpec.groovy- Removed hive-specific test casesMetacatSmokeSpec.groovy- Removed hive metastore testsMetacatSmokeThriftSpec.groovy- Removed hive Thrift validation testsMetacatThriftFunctionalSpec.groovy- Removed hive-specific assertionsNew Iceberg Metadata Files: Added pre-built metadata JSON files for functional tests (replacing Hive-created tables):
metacat-all-types.metadata.jsonpig-table.metadata.jsonpig-part-table.metadata.jsonpig-parts-table.metadata.json7. Dependency Lock Updates
All connector modules had their
dependencies.lockfiles regenerated to reflect the removal of transitive Hive dependencies. Notable reductions in the Polaris connector dependency graph.Dependency Relationships After Change
metacat-main
└── metacat-thrift (Hive Thrift types for protocol compat)
└── metacat-connector-polaris
└── metacat-common-server (Iceberg handling, converters)
└── metacat-connector-jdbc
The Hive Metastore client libraries remain only in
metacat-thriftfor Thrift protocol support. The Polaris connector now operates independently of Hive types.Files Deleted vs. Moved