Skip to content

Commit

Permalink
[fix](hms) fix compatibility issue of hive metastore client apache#27327
Browse files Browse the repository at this point in the history
  • Loading branch information
morningman authored and gnehil committed Dec 4, 2023
1 parent e9e619d commit 1a042f6
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,17 @@ public HiveMetaStoreClient(Configuration conf, HiveMetaHookLoader hookLoader, Bo

hiveVersion = HiveVersionUtil.getVersion(conf.get(HMSProperties.HIVE_VERSION));

version = MetastoreConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST) ? TEST_VERSION : VERSION;
// For hive 2.3.7, there is no ClientCapability.INSERT_ONLY_TABLES
if (hiveVersion == HiveVersion.V1_0 || hiveVersion == HiveVersion.V2_0 || hiveVersion == HiveVersion.V2_3) {
version = MetastoreConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST) ? TEST_VERSION : null;
} else {
version = MetastoreConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST) ? TEST_VERSION : VERSION;
}

filterHook = loadFilterHooks();
uriResolverHook = loadUriResolverHook();
fileMetadataBatchSize = MetastoreConf.getIntVar(
conf, ConfVars.BATCH_RETRIEVE_OBJECTS_MAX);
conf, ConfVars.BATCH_RETRIEVE_OBJECTS_MAX);

String msUri = MetastoreConf.getVar(conf, ConfVars.THRIFT_URIS);
localMetaStore = MetastoreConf.isEmbeddedMetaStore(msUri);
Expand Down

0 comments on commit 1a042f6

Please sign in to comment.