Skip to content

Commit

Permalink
[da-vinci][fast-client] Delete deprecated NativeMetadataRepository an…
Browse files Browse the repository at this point in the history
…d StoreMetadata implementations (#1171)

1. Deleted DaVinciClientMetaStoreBasedRepository, DaVinciClientBasedMetadata, related configs and tests.
This was originally used by DaVinciClientBasedMetadata to retrieve metadata from the meta system
store for fast-client.

2. Deleted ThinClientBasedMetadata, configs and related tests. This was originally introduced as a
tactical fix to support running DVC and fast-client running in the same host.
  • Loading branch information
xunyin8 committed Sep 13, 2024
1 parent c25c658 commit 64dba89
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 1,625 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.linkedin.davinci.repository;

import static com.linkedin.venice.ConfigKeys.CLIENT_SYSTEM_STORE_REPOSITORY_REFRESH_INTERVAL_SECONDS;
import static com.linkedin.venice.ConfigKeys.CLIENT_USE_DA_VINCI_BASED_SYSTEM_STORE_REPOSITORY;
import static com.linkedin.venice.system.store.MetaStoreWriter.KEY_STRING_SCHEMA_ID;
import static com.linkedin.venice.system.store.MetaStoreWriter.KEY_STRING_STORE_NAME;
import static java.lang.Thread.currentThread;

import com.linkedin.davinci.client.factory.CachingDaVinciClientFactory;
import com.linkedin.venice.client.exceptions.ServiceDiscoveryException;
import com.linkedin.venice.client.store.ClientConfig;
import com.linkedin.venice.client.store.ClientFactory;
import com.linkedin.venice.common.VeniceSystemStoreType;
import com.linkedin.venice.exceptions.MissingKeyInStoreMetadataException;
import com.linkedin.venice.exceptions.VeniceException;
Expand All @@ -26,9 +23,7 @@
import com.linkedin.venice.schema.SchemaEntry;
import com.linkedin.venice.schema.rmd.RmdSchemaEntry;
import com.linkedin.venice.schema.writecompute.DerivedSchemaEntry;
import com.linkedin.venice.serialization.avro.AvroProtocolDefinition;
import com.linkedin.venice.service.ICProvider;
import com.linkedin.venice.stats.TehutiUtils;
import com.linkedin.venice.system.store.MetaStoreDataType;
import com.linkedin.venice.systemstore.schemas.StoreClusterConfig;
import com.linkedin.venice.systemstore.schemas.StoreMetaKey;
Expand All @@ -41,7 +36,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -122,31 +116,11 @@ public static NativeMetadataRepository getInstance(
ClientConfig clientConfig,
VeniceProperties backendConfig,
ICProvider icProvider) {
if (backendConfig.getBoolean(CLIENT_USE_DA_VINCI_BASED_SYSTEM_STORE_REPOSITORY, false)) {
LOGGER.info(
"Initializing {} with {}",
NativeMetadataRepository.class.getSimpleName(),
DaVinciClientMetaStoreBasedRepository.class.getSimpleName());
ClientConfig clonedClientConfig = ClientConfig.cloneConfig(clientConfig)
.setStoreName(AvroProtocolDefinition.METADATA_SYSTEM_SCHEMA_STORE.getSystemStoreName())
.setSpecificValueClass(StoreMetaValue.class);
return new DaVinciClientMetaStoreBasedRepository(
clientConfig,
backendConfig,
new CachingDaVinciClientFactory(
clientConfig.getD2Client(),
clientConfig.getD2ServiceName(),
Optional.ofNullable(clientConfig.getMetricsRepository())
.orElse(TehutiUtils.getMetricsRepository("davinci-client")),
backendConfig),
ClientFactory.getSchemaReader(clonedClientConfig, null));
} else {
LOGGER.info(
"Initializing {} with {}",
NativeMetadataRepository.class.getSimpleName(),
ThinClientMetaStoreBasedRepository.class.getSimpleName());
return new ThinClientMetaStoreBasedRepository(clientConfig, backendConfig, icProvider);
}
LOGGER.info(
"Initializing {} with {}",
NativeMetadataRepository.class.getSimpleName(),
ThinClientMetaStoreBasedRepository.class.getSimpleName());
return new ThinClientMetaStoreBasedRepository(clientConfig, backendConfig, icProvider);
}

@Override
Expand Down
Loading

0 comments on commit 64dba89

Please sign in to comment.