OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataRecycler.h File Reference
#include "Analyzer/Analyzer.h"
#include "QueryEngine/ColumnarResults.h"
#include "QueryEngine/Descriptors/InputDescriptors.h"
#include "QueryEngine/Descriptors/RelAlgExecutionDescriptor.h"
#include "QueryEngine/JoinHashTable/HashTable.h"
#include "QueryEngine/RelAlgExecutionUnit.h"
#include "QueryEngine/ResultSet.h"
#include "Shared/heavyai_shared_mutex.h"
#include "Shared/misc.h"
#include <boost/functional/hash.hpp>
#include <algorithm>
#include <ostream>
#include <unordered_map>
+ Include dependency graph for DataRecycler.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EMPTY_META_INFO
 
class  CacheItemMetric
 
class  DataRecyclerUtil
 
class  CacheMetricTracker
 
struct  CachedItem< CACHED_ITEM_TYPE, META_INFO_TYPE >
 
class  DataRecycler< CACHED_ITEM_TYPE, META_INFO_TYPE >
 

Typedefs

using DeviceIdentifier = size_t
 
using CacheSizeMap = std::unordered_map< DeviceIdentifier, size_t >
 
using CacheMetricInfoMap = std::unordered_map< DeviceIdentifier, std::vector< std::shared_ptr< CacheItemMetric >>>
 

Enumerations

enum  CacheItemType {
  PERFECT_HT = 0, BASELINE_HT, BBOX_INTERSECT_HT, HT_HASHING_SCHEME,
  BASELINE_HT_APPROX_CARD, BBOX_INTERSECT_AUTO_TUNER_PARAM, QUERY_RESULTSET, CHUNK_METADATA,
  NUM_CACHE_ITEM_TYPE
}
 
enum  CacheAvailability { AVAILABLE, AVAILABLE_AFTER_CLEANUP, UNAVAILABLE }
 
enum  CacheUpdateAction { ADD, REMOVE }
 
enum  CacheMetricType { REF_COUNT = 0, MEM_SIZE, COMPUTE_TIME, NUM_METRIC_TYPE }
 

Functions

std::ostream & operator<< (std::ostream &os, CacheItemType const item_type)
 

Typedef Documentation

using CacheMetricInfoMap = std::unordered_map<DeviceIdentifier, std::vector<std::shared_ptr<CacheItemMetric>>>

Definition at line 132 of file DataRecycler.h.

using CacheSizeMap = std::unordered_map<DeviceIdentifier, size_t>

Definition at line 130 of file DataRecycler.h.

using DeviceIdentifier = size_t

Definition at line 129 of file DataRecycler.h.

Enumeration Type Documentation

Enumerator
AVAILABLE 
AVAILABLE_AFTER_CLEANUP 
UNAVAILABLE 

Definition at line 71 of file DataRecycler.h.

71  {
72  AVAILABLE, // item can be cached as is
73  AVAILABLE_AFTER_CLEANUP, // item can be cached after removing already cached items
74  UNAVAILABLE // item cannot be cached due to size limitation
75 };
Enumerator
PERFECT_HT 
BASELINE_HT 
BBOX_INTERSECT_HT 
HT_HASHING_SCHEME 
BASELINE_HT_APPROX_CARD 
BBOX_INTERSECT_AUTO_TUNER_PARAM 
QUERY_RESULTSET 
CHUNK_METADATA 
NUM_CACHE_ITEM_TYPE 

Definition at line 38 of file DataRecycler.h.

38  {
39  PERFECT_HT = 0, // Perfect hashtable
40  BASELINE_HT, // Baseline hashtable
41  BBOX_INTERSECT_HT, // Bounding box intersect hashtable
42  HT_HASHING_SCHEME, // Hashtable layout
43  BASELINE_HT_APPROX_CARD, // Approximated cardinality for baseline hashtable
44  BBOX_INTERSECT_AUTO_TUNER_PARAM, // Bounding box intersect auto tuner's params
45  QUERY_RESULTSET, // query resultset
46  CHUNK_METADATA, // query resultset's chunk metadata
47  // TODO (yoonmin): support the following items for recycling
48  // COUNTALL_CARD_EST, Cardinality of query result
49  // NDV_CARD_EST, # Non-distinct value
50  // FILTER_SEL Selectivity of (push-downed) filter node
52 };
Enumerator
REF_COUNT 
MEM_SIZE 
COMPUTE_TIME 
NUM_METRIC_TYPE 

Definition at line 84 of file DataRecycler.h.

Enumerator
ADD 
REMOVE 

Definition at line 77 of file DataRecycler.h.

77 { ADD, REMOVE };

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
CacheItemType const  item_type 
)
inline

Definition at line 54 of file DataRecycler.h.

References NUM_CACHE_ITEM_TYPE.

54  {
55  constexpr char const* cache_item_type_str[]{
56  "Perfect Join Hashtable",
57  "Baseline Join Hashtable",
58  "Bounding Box Intersect Join Hashtable",
59  "Hashing Scheme for Join Hashtable",
60  "Baseline Join Hashtable's Approximated Cardinality",
61  "Bounding Box Intersect Join Hashtable's Auto Tuner's Parameters",
62  "Query ResultSet",
63  "Chunk Metadata"};
64  static_assert(sizeof(cache_item_type_str) / sizeof(*cache_item_type_str) ==
66  return os << cache_item_type_str[item_type];
67 }