Skip to content

Commit

Permalink
[controller][server] Remove guava class usages in KME upgrade code pa…
Browse files Browse the repository at this point in the history
…th (#675)

This is a follow up change to a8af3a9 addressing comments about not pull in
guava classes if possible due to instablility and compatibility concerns.
  • Loading branch information
lluwm authored Oct 2, 2023
1 parent 63f0606 commit bc4106e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static java.lang.Thread.currentThread;
import static java.lang.Thread.sleep;

import com.google.common.collect.ImmutableMap;
import com.linkedin.davinci.compression.StorageEngineBackedCompressorFactory;
import com.linkedin.davinci.config.VeniceConfigLoader;
import com.linkedin.davinci.config.VeniceServerConfig;
Expand Down Expand Up @@ -428,7 +427,7 @@ public void handleStoreDeleted(Store store) {
serverConfig.getLocalControllerD2ServiceName(),
serverConfig.getLocalD2ZkHost(),
false)) {
schemaInitializer.execute(ImmutableMap.of(schemaId, schema));
schemaInitializer.execute(Collections.singletonMap(schemaId, schema));
} catch (VeniceException e) {
LOGGER.error(
"Exception in registering '{}' schema version '{}'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static com.linkedin.venice.client.store.ClientFactory.getSchemaReader;

import com.google.common.collect.ImmutableMap;
import com.linkedin.d2.balancer.D2Client;
import com.linkedin.venice.SSLConfig;
import com.linkedin.venice.acl.DynamicAccessController;
Expand Down Expand Up @@ -31,6 +30,7 @@
import com.linkedin.venice.utils.pools.LandFillObjectPool;
import io.tehuti.metrics.MetricsRepository;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -150,7 +150,7 @@ public VeniceControllerService(
systemStoreClusterConfig.getChildControllerD2ZkHost(systemStoreClusterConfig.getRegionName()),
systemStoreClusterConfig.isControllerEnforceSSLOnly());

schemaInitializer.execute(ImmutableMap.of(schemaId, schema));
schemaInitializer.execute(Collections.singletonMap(schemaId, schema));
} catch (VeniceException e) {
LOGGER.error(
"Exception in registering '{}' schema version '{}'",
Expand Down

0 comments on commit bc4106e

Please sign in to comment.