pandalee99 commented on code in PR #27251:
URL: https://github.com/apache/shardingsphere/pull/27251#discussion_r1266127737
##########
kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/sqlbuilder/PipelineImportSQLBuilder.java:
##########
@@ -44,12 +46,20 @@ public final class PipelineImportSQLBuilder {
private final PipelineSQLSegmentBuilder sqlSegmentBuilder;
- private final ConcurrentMap<String, String> sqlCacheMap;
+ private final Cache<String, String> sqlCache;
- public PipelineImportSQLBuilder(final DatabaseType databaseType) {
+ public PipelineImportSQLBuilder(final DatabaseType databaseType,final
ShardingCacheOptionsConfiguration cacheOptions) {
dialectSQLBuilder =
DatabaseTypedSPILoader.getService(DialectPipelineSQLBuilder.class,
databaseType);
sqlSegmentBuilder = new PipelineSQLSegmentBuilder(databaseType);
- sqlCacheMap = new ConcurrentHashMap<>();
+ sqlCache = buildRouteCache(cacheOptions);
+ }
+
+ private Cache<String, String> buildRouteCache(final
ShardingCacheOptionsConfiguration cacheOptions) {
Review Comment:
1. yes,i need to rename,thanks
2.I refer to other code.maybe, i should modify to 100 and 1024
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]