OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LeafAggregator.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LEAFAGGREGATOR_H
18 #define LEAFAGGREGATOR_H
19 
20 #include "../AggregatedResult.h"
21 #include "Catalog/Catalog.h"
22 #include "DataMgr/MemoryLevel.h"
23 #include "LeafHostInfo.h"
26 #include "gen-cpp/OmniSci.h"
27 
28 #include "Logger/Logger.h"
29 
30 namespace Catalog_Namespace {
31 class SessionInfo;
32 } // namespace Catalog_Namespace
33 
34 class ResultSet;
35 
37  public:
38  LeafAggregator(const std::vector<LeafHostInfo>& leaves) { CHECK(leaves.empty()); }
39 
41  const std::string& query_ra,
42  const ExecutionOptions& eo) {
43  CHECK(false);
44  return {nullptr, {}};
45  }
46 
48  const Catalog_Namespace::SessionInfo& parent_session_info) {
49  CHECK(false);
50  }
51 
52  std::vector<TQueryResult> forwardQueryToLeaves(
53  const Catalog_Namespace::SessionInfo& parent_session_info,
54  const std::string& query_str) {
55  CHECK(false);
56  return {};
57  }
58 
59  TQueryResult forwardQueryToLeaf(
60  const Catalog_Namespace::SessionInfo& parent_session_info,
61  const std::string& query_str,
62  const size_t leaf_idx) {
63  CHECK(false);
64  return {};
65  }
66 
67  void insertDataToLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
68  const size_t leaf_idx,
69  const TInsertData& thrift_insert_data) {
70  CHECK(false);
71  }
72 
73  void checkpointLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
74  const int32_t db_id,
75  const int32_t table_id) {
76  CHECK(false);
77  }
78 
79  int32_t get_table_epochLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
80  const int32_t db_id,
81  const int32_t table_id) {
82  CHECK(false);
83  return 0;
84  }
85 
86  void set_table_epochLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
87  const int32_t db_id,
88  const int32_t table_id,
89  const int32_t new_epoch) {
90  CHECK(false);
91  }
92 
93  std::vector<Catalog_Namespace::TableEpochInfo> get_leaf_table_epochs(
94  const Catalog_Namespace::SessionInfo& parent_session_info,
95  const int32_t db_id,
96  const int32_t table_id) {
97  CHECK(false);
98  return {};
99  }
100 
102  const Catalog_Namespace::SessionInfo& parent_session_info,
103  const int32_t db_id,
104  const std::vector<Catalog_Namespace::TableEpochInfo>& table_epochs) {
105  CHECK(false);
106  }
107 
108  void connect(const Catalog_Namespace::SessionInfo& parent_session_info,
109  const std::string& user,
110  const std::string& passwd,
111  const std::string& dbname) {
112  CHECK(false);
113  }
114 
115  void disconnect(const TSessionId session) { CHECK(false); }
116 
117  void switch_database(const TSessionId session, const std::string& dbname) {
118  CHECK(false);
119  }
120 
121  void clone_session(const TSessionId session1, const TSessionId session2) {
122  CHECK(false);
123  };
124 
125  void interrupt(const TSessionId query_session, const TSessionId interrupt_session) {
126  CHECK(false);
127  }
128 
129  void set_execution_mode(const TSessionId session, const TExecuteMode::type mode) {
130  CHECK(false);
131  }
132 
133  size_t leafCount() const { return 0; }
134 
135  std::vector<TServerStatus> getLeafStatus(TSessionId session) {
136  CHECK(false);
137  return {};
138  }
139 
140  std::vector<TNodeMemoryInfo> getLeafMemoryInfo(
141  TSessionId session,
142  Data_Namespace::MemoryLevel memory_level) {
143  CHECK(false);
144  return {};
145  }
146 
147  TClusterHardwareInfo getHardwareInfo(TSessionId session) {
148  CHECK(false);
149  return {};
150  }
151 
152  void clear_leaf_cpu_memory(const TSessionId session) { CHECK(false); }
153 
154  void clear_leaf_gpu_memory(const TSessionId session) { CHECK(false); }
155 
156  std::vector<size_t> query_get_outer_fragment_counts(
157  const Catalog_Namespace::SessionInfo& parent_session_info,
158  std::string& sql_query) {
159  CHECK(false);
160  return {};
161  }
162 };
163 
164 #endif // LEAFAGGREGATOR_H
int32_t get_table_epochLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const int32_t db_id, const int32_t table_id)
std::vector< size_t > query_get_outer_fragment_counts(const Catalog_Namespace::SessionInfo &parent_session_info, std::string &sql_query)
void set_execution_mode(const TSessionId session, const TExecuteMode::type mode)
void leafCatalogConsistencyCheck(const Catalog_Namespace::SessionInfo &parent_session_info)
void checkpointLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const int32_t db_id, const int32_t table_id)
void clone_session(const TSessionId session1, const TSessionId session2)
void clear_leaf_gpu_memory(const TSessionId session)
void connect(const Catalog_Namespace::SessionInfo &parent_session_info, const std::string &user, const std::string &passwd, const std::string &dbname)
void switch_database(const TSessionId session, const std::string &dbname)
void set_leaf_table_epochs(const Catalog_Namespace::SessionInfo &parent_session_info, const int32_t db_id, const std::vector< Catalog_Namespace::TableEpochInfo > &table_epochs)
void disconnect(const TSessionId session)
ResultSet(const std::vector< TargetInfo > &targets, const ExecutorDeviceType device_type, const QueryMemoryDescriptor &query_mem_desc, const std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const Executor *executor)
Definition: ResultSet.cpp:104
This file contains the class specification and related data structures for Catalog.
LeafAggregator(const std::vector< LeafHostInfo > &leaves)
AggregatedResult execute(const Catalog_Namespace::SessionInfo &parent_session_info, const std::string &query_ra, const ExecutionOptions &eo)
void clear_leaf_cpu_memory(const TSessionId session)
std::vector< TQueryResult > forwardQueryToLeaves(const Catalog_Namespace::SessionInfo &parent_session_info, const std::string &query_str)
size_t leafCount() const
TClusterHardwareInfo getHardwareInfo(TSessionId session)
TQueryResult forwardQueryToLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const std::string &query_str, const size_t leaf_idx)
std::vector< TNodeMemoryInfo > getLeafMemoryInfo(TSessionId session, Data_Namespace::MemoryLevel memory_level)
std::vector< Catalog_Namespace::TableEpochInfo > get_leaf_table_epochs(const Catalog_Namespace::SessionInfo &parent_session_info, const int32_t db_id, const int32_t table_id)
void set_table_epochLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const int32_t db_id, const int32_t table_id, const int32_t new_epoch)
#define CHECK(condition)
Definition: Logger.h:197
void insertDataToLeaf(const Catalog_Namespace::SessionInfo &parent_session_info, const size_t leaf_idx, const TInsertData &thrift_insert_data)
std::vector< TServerStatus > getLeafStatus(TSessionId session)
void interrupt(const TSessionId query_session, const TSessionId interrupt_session)