Skip to content

Commit

Permalink
Remove StorageUnitMetaData.storageUnits
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 29, 2023
1 parent f28ce10 commit 85564d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class GenericSchemaBuilderMaterial {
public GenericSchemaBuilderMaterial(final DatabaseType protocolType, final StorageUnitMetaData storageUnitMetaData,
final Collection<ShardingSphereRule> rules, final ConfigurationProperties props, final String defaultSchemaName) {
this(protocolType, storageUnitMetaData.getMetaDataMap().entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getStorageType(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)),
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getStorageType(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)),
storageUnitMetaData.getMetaDataMap().entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getDataSource(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)),
rules, props, defaultSchemaName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private DatabaseConfiguration getDatabaseConfiguration(final ResourceMetaData re
StorageResource storageResource = getMergedStorageResource(resourceMetaData, switchingResource);
Map<String, DataSourcePoolProperties> propsMap = null == switchingResource
? resourceMetaData.getStorageUnitMetaData().getMetaDataMap()
.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getDataSourcePoolProperties(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new))
.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getDataSourcePoolProperties(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new))
: switchingResource.getMergedDataSourcePoolPropertiesMap();
return new DataSourceProvidedDatabaseConfiguration(storageResource, toBeCreatedRuleConfigs, propsMap);
}
Expand Down

0 comments on commit 85564d3

Please sign in to comment.