!638 Fix index preloading property issue

Merge pull request !638 from Han_Weng/fix-preloading-property
This commit is contained in:
i-robot 2021-02-27 08:51:35 +08:00 committed by Gitee
commit 151df92d9f
3 changed files with 5 additions and 5 deletions

View File

@ -135,9 +135,9 @@ public class HeuristicIndexerManager
public void preloadIndex()
throws IOException
{
if (indexClient != null) {
if (PropertyService.containsProperty(HetuConstant.FILTER_CACHE_PRELOAD_INDICES)) {
String preloadNames = PropertyService.getStringProperty(HetuConstant.FILTER_CACHE_PRELOAD_INDICES);
if (PropertyService.getBooleanProperty(HetuConstant.FILTER_ENABLED) && indexClient != null) {
String preloadNames = PropertyService.getStringProperty(HetuConstant.FILTER_CACHE_PRELOAD_INDICES);
if (!preloadNames.isEmpty()) {
List<String> preloadNameList = Arrays.asList(preloadNames.split(","));
if (!preloadNameList.isEmpty()) {
try {

View File

@ -42,7 +42,7 @@ public class HetuConfig
private Boolean indexCacheSoftReference = Boolean.TRUE;
private String indexStoreUri = "/opt/hetu/indices/";
private String indexStoreFileSystemProfile = "local-config-default";
private String indexToPreload;
private String indexToPreload = "";
private Boolean enableEmbeddedStateStore = Boolean.FALSE;
private Boolean enableMultipleCoordinator = Boolean.FALSE;
private Duration stateUpdateInterval = new Duration(100, TimeUnit.MILLISECONDS);

View File

@ -53,7 +53,7 @@ public class TestHetuConfig
.setSplitCacheMapEnabled(false)
.setSplitCacheStateUpdateInterval(new Duration(2, TimeUnit.SECONDS))
.setTraceStackVisible(false)
.setIndexToPreload(null));
.setIndexToPreload(""));
}
@Test