XComp commented on code in PR #20919:
URL: https://github.com/apache/flink/pull/20919#discussion_r1042146547
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/table/lookup/fullcache/CacheLoader.java:
##########
@@ -59,11 +65,11 @@ public abstract class CacheLoader extends
AbstractRichFunction implements Runnab
protected volatile boolean isStopped;
- protected abstract void reloadCache() throws Exception;
+ protected abstract void updateCache() throws Exception;
- @Override
public void open(Configuration parameters) throws Exception {
firstLoadLatch = new CountDownLatch(1);
+ reloadExecutor = Executors.newSingleThreadExecutor();
}
public void open(CacheMetricGroup cacheMetricGroup) {
Review Comment:
Having two methods `open` with different signatures and actually different
purpose is quite confusing. Could we give at least the one not implementing the
interface a more meaningful name? Would `initializeMetrics` be a more
descriptive name?
The same applies to the `LookupFullCache`. It looks like that's where the
name overloading is coming from (`CacheLoader#open` and `LookupCache#open`).
--
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]