zhoujinsong commented on code in PR #3793:
URL: https://github.com/apache/amoro/pull/3793#discussion_r2419033907
##########
amoro-optimizer/amoro-optimizer-common/src/main/java/org/apache/amoro/optimizer/common/OptimizerExecutor.java:
##########
@@ -190,4 +187,31 @@ public static OptimizingTaskResult executeTask(
return errorResult;
}
}
+
+ private static Map<String, String> fillTaskProperties(
+ OptimizerConfig config, OptimizingTask task) {
+ if (config.isCacheEnabled()) {
+ System.setProperty(DeleteCache.DELETE_CACHE_ENABLED, "true");
+ }
+ if
(!config.getCacheMaxEntrySize().equals(DeleteCache.DELETE_CACHE_MAX_ENTRY_SIZE_DEFAULT))
{
+ System.setProperty(DeleteCache.DELETE_CACHE_MAX_ENTRY_SIZE,
config.getCacheMaxEntrySize());
+ }
+ if
(!config.getCacheMaxTotalSize().equals(DeleteCache.DELETE_CACHE_MAX_TOTAL_SIZE_DEFAULT))
{
+ System.setProperty(
+ DeleteCache.DELETE_CACHE_MAX_TOTAL_SIZE_DEFAULT,
config.getCacheMaxTotalSize());
+ }
+ if
(!config.getCacheMaxEntrySize().equals(DeleteCache.DELETE_CACHE_TIMEOUT)) {
Review Comment:
fixed.
##########
docs/admin-guides/managing-optimizers.md:
##########
@@ -378,3 +386,7 @@ The description of the relevant parameters is shown in the
following table:
| -eds | No | Whether extend storage to disk, default false.
|
| -dsp | No | Defines the directory where the storage files are
saved, the default temporary-file directory is specified by the system property
`java.io.tmpdir`. On UNIX systems the default value of this property is
typically "/tmp" or "/var/tmp". |
| -msz | No | Memory storage size limit when extending disk
storage(MB), default 512(MB).
|
+| -ce | No | Whether enable cache in optimizer, default false.
|
+| -cmts | No | Max total size in optimier cache, default 100MB.
|
+| -cmes | No | Max entry size in optimizer cache, default 50MB.
|
Review Comment:
fixed.
--
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]