public final class QueryResultsCache extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryResultsCache.CacheEntry |
static class |
QueryResultsCache.CacheEntryStatus |
static class |
QueryResultsCache.InvalidationEventConsumer |
static class |
QueryResultsCache.LookupInfo |
static class |
QueryResultsCache.QueryInfo |
Modifier and Type | Method and Description |
---|---|
QueryResultsCache.CacheEntry |
addToCache(QueryResultsCache.QueryInfo queryInfo,
org.apache.hadoop.hive.common.ValidTxnWriteIdList txnWriteIdList)
Add an entry to the cache.
|
static void |
cleanupInstance() |
void |
clear() |
static void |
decrementMetric(String name) |
static void |
decrementMetric(String name,
long count) |
static QueryResultsCache |
getInstance() |
long |
getSize() |
static void |
incrementMetric(String name) |
static void |
incrementMetric(String name,
long count) |
static void |
initialize(HiveConf conf) |
QueryResultsCache.CacheEntry |
lookup(QueryResultsCache.LookupInfo request)
Check if the cache contains an entry for the requested LookupInfo.
|
void |
notifyTableChanged(String dbName,
String tableName,
long updateTime) |
void |
removeEntry(QueryResultsCache.CacheEntry entry) |
boolean |
setEntryValid(QueryResultsCache.CacheEntry cacheEntry,
FetchWork fetchWork)
Updates a pending cache entry with a FetchWork result from a finished query.
|
public static void initialize(HiveConf conf) throws IOException
IOException
public static QueryResultsCache getInstance()
public QueryResultsCache.CacheEntry lookup(QueryResultsCache.LookupInfo request)
request
- addReader
- Should the reader count be incremented during the lookup.
This will ensure the returned entry can be used after the lookup.
If true, the caller will be responsible for decrementing the reader count
using CacheEntry.releaseReader().public QueryResultsCache.CacheEntry addToCache(QueryResultsCache.QueryInfo queryInfo, org.apache.hadoop.hive.common.ValidTxnWriteIdList txnWriteIdList)
queryInfo
- public boolean setEntryValid(QueryResultsCache.CacheEntry cacheEntry, FetchWork fetchWork)
cacheEntry
- fetchWork
- public void clear()
public long getSize()
public void removeEntry(QueryResultsCache.CacheEntry entry)
public static void cleanupInstance()
public static void incrementMetric(String name, long count)
public static void decrementMetric(String name, long count)
public static void incrementMetric(String name)
public static void decrementMetric(String name)
Copyright © 2022 The Apache Software Foundation. All rights reserved.