private boolean isValidSideInputStore(String storeName, File storeLocation) { return isPersistedStore(storeName) && !StorageManagerUtil.isStaleStore(storeLocation, OFFSET_FILE, STORE_DELETE_RETENTION_MS, clock.currentTimeMillis()) && StorageManagerUtil.isOffsetFileValid(storeLocation, OFFSET_FILE); }
private boolean isValidSideInputStore(String storeName, File storeLocation) { return isPersistedStore(storeName) && !StorageManagerUtil.isStaleStore(storeLocation, OFFSET_FILE, STORE_DELETE_RETENTION_MS, clock.currentTimeMillis()) && StorageManagerUtil.isOffsetFileValid(storeLocation, OFFSET_FILE); }
private boolean isValidSideInputStore(String storeName, File storeLocation) { return isPersistedStore(storeName) && !StorageManagerUtil.isStaleStore(storeLocation, OFFSET_FILE, STORE_DELETE_RETENTION_MS, clock.currentTimeMillis()) && StorageManagerUtil.isOffsetFileValid(storeLocation, OFFSET_FILE); }
private boolean isValidSideInputStore(String storeName, File storeLocation) { return isPersistedStore(storeName) && !StorageManagerUtil.isStaleStore(storeLocation, OFFSET_FILE, STORE_DELETE_RETENTION_MS, clock.currentTimeMillis()) && StorageManagerUtil.isOffsetFileValid(storeLocation, OFFSET_FILE); }
private boolean isValidSideInputStore(String storeName, File storeLocation) { return isPersistedStore(storeName) && !StorageManagerUtil.isStaleStore(storeLocation, OFFSET_FILE, STORE_DELETE_RETENTION_MS, clock.currentTimeMillis()) && StorageManagerUtil.isOffsetFileValid(storeLocation, OFFSET_FILE); }
/** * Directory loggedStoreDir associated with the logged store storeName is determined to be valid * if all of the following conditions are true. * a) If the store has to be persisted to disk. * b) If there is a valid offset file associated with the logged store. * c) If the logged store has not gone stale. * * @return true if the logged store is valid, false otherwise. */ private boolean isLoggedStoreValid(String storeName, File loggedStoreDir) { long changeLogDeleteRetentionInMs = StorageConfig.DEFAULT_CHANGELOG_DELETE_RETENTION_MS(); if (new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).isDefined()) { changeLogDeleteRetentionInMs = (long) new StorageConfig(config).getChangeLogDeleteRetentionsInMs().get(storeName).get(); } return this.taskStores.get(storeName).getStoreProperties().isPersistedToDisk() && StorageManagerUtil.isOffsetFileValid(loggedStoreDir, OFFSET_FILE_NAME) && !StorageManagerUtil.isStaleStore( loggedStoreDir, OFFSET_FILE_NAME, changeLogDeleteRetentionInMs, clock.currentTimeMillis()); }