Class DeltaJoinCache
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.join.deltajoin.DeltaJoinCache
-
@NotThreadSafe @VisibleForTesting public class DeltaJoinCache extends Object
Cache for both sides in delta join.Note: This cache is not thread-safe although its inner
Cacheis thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringLEFT_CACHE_METRIC_PREFIXprotected static StringMETRIC_HIT_COUNTprotected static StringMETRIC_HIT_RATEprotected static StringMETRIC_KEY_SIZEprotected static StringMETRIC_REQUEST_COUNTprotected static StringMETRIC_TOTAL_NON_EMPTY_VALUE_SIZEprotected static StringRIGHT_CACHE_METRIC_PREFIX
-
Constructor Summary
Constructors Constructor Description DeltaJoinCache(long leftCacheMaxSize, long rightCacheMaxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildCache(org.apache.flink.table.data.RowData key, LinkedHashMap<org.apache.flink.table.data.RowData,Object> ukDataMap, boolean buildRightCache)LinkedHashMap<org.apache.flink.table.data.RowData,Object>getData(org.apache.flink.table.data.RowData key, boolean requestRightCache)org.apache.flink.shaded.guava33.com.google.common.cache.Cache<org.apache.flink.table.data.RowData,LinkedHashMap<org.apache.flink.table.data.RowData,Object>>getLeftCache()AtomicLonggetLeftHitCount()AtomicLonggetLeftRequestCount()AtomicLonggetLeftTotalSize()org.apache.flink.shaded.guava33.com.google.common.cache.Cache<org.apache.flink.table.data.RowData,LinkedHashMap<org.apache.flink.table.data.RowData,Object>>getRightCache()AtomicLonggetRightHitCount()AtomicLonggetRightRequestCount()AtomicLonggetRightTotalSize()voidhitLeftCache()voidhitRightCache()voidregisterMetrics(org.apache.flink.metrics.MetricGroup metricGroup)voidrequestLeftCache()voidrequestRightCache()voidupsertCache(org.apache.flink.table.data.RowData key, org.apache.flink.table.data.RowData uk, Object data, boolean upsertRightCache)
-
-
-
Field Detail
-
LEFT_CACHE_METRIC_PREFIX
protected static final String LEFT_CACHE_METRIC_PREFIX
- See Also:
- Constant Field Values
-
RIGHT_CACHE_METRIC_PREFIX
protected static final String RIGHT_CACHE_METRIC_PREFIX
- See Also:
- Constant Field Values
-
METRIC_HIT_RATE
protected static final String METRIC_HIT_RATE
- See Also:
- Constant Field Values
-
METRIC_REQUEST_COUNT
protected static final String METRIC_REQUEST_COUNT
- See Also:
- Constant Field Values
-
METRIC_HIT_COUNT
protected static final String METRIC_HIT_COUNT
- See Also:
- Constant Field Values
-
METRIC_KEY_SIZE
protected static final String METRIC_KEY_SIZE
- See Also:
- Constant Field Values
-
METRIC_TOTAL_NON_EMPTY_VALUE_SIZE
protected static final String METRIC_TOTAL_NON_EMPTY_VALUE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerMetrics
public void registerMetrics(org.apache.flink.metrics.MetricGroup metricGroup)
-
getData
@Nullable public LinkedHashMap<org.apache.flink.table.data.RowData,Object> getData(org.apache.flink.table.data.RowData key, boolean requestRightCache)
-
buildCache
public void buildCache(org.apache.flink.table.data.RowData key, LinkedHashMap<org.apache.flink.table.data.RowData,Object> ukDataMap, boolean buildRightCache)
-
upsertCache
public void upsertCache(org.apache.flink.table.data.RowData key, org.apache.flink.table.data.RowData uk, Object data, boolean upsertRightCache)
-
requestLeftCache
public void requestLeftCache()
-
requestRightCache
public void requestRightCache()
-
hitLeftCache
public void hitLeftCache()
-
hitRightCache
public void hitRightCache()
-
getLeftCache
@VisibleForTesting public org.apache.flink.shaded.guava33.com.google.common.cache.Cache<org.apache.flink.table.data.RowData,LinkedHashMap<org.apache.flink.table.data.RowData,Object>> getLeftCache()
-
getRightCache
@VisibleForTesting public org.apache.flink.shaded.guava33.com.google.common.cache.Cache<org.apache.flink.table.data.RowData,LinkedHashMap<org.apache.flink.table.data.RowData,Object>> getRightCache()
-
getLeftTotalSize
@VisibleForTesting public AtomicLong getLeftTotalSize()
-
getRightTotalSize
@VisibleForTesting public AtomicLong getRightTotalSize()
-
getLeftHitCount
@VisibleForTesting public AtomicLong getLeftHitCount()
-
getLeftRequestCount
@VisibleForTesting public AtomicLong getLeftRequestCount()
-
getRightHitCount
@VisibleForTesting public AtomicLong getRightHitCount()
-
getRightRequestCount
@VisibleForTesting public AtomicLong getRightRequestCount()
-
-