OmniSciDB  06b3bd477c
 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 "DataMgr/MemoryLevel.h"
22 #include "LeafHostInfo.h"
25 #include "gen-cpp/OmniSci.h"
26 
27 #include "Shared/Logger.h"
28 
29 namespace Catalog_Namespace {
30 class SessionInfo;
31 } // namespace Catalog_Namespace
32 
33 class ResultSet;
34 
36  public:
37  LeafAggregator(const std::vector<LeafHostInfo>& leaves) { CHECK(leaves.empty()); }
38 
40  const std::string& query_ra,
41  const ExecutionOptions& eo) {
42  CHECK(false);
43  return {nullptr, {}};
44  }
45 
47  const Catalog_Namespace::SessionInfo& parent_session_info) {
48  CHECK(false);
49  }
50 
51  std::vector<TQueryResult> forwardQueryToLeaves(
52  const Catalog_Namespace::SessionInfo& parent_session_info,
53  const std::string& query_str) {
54  CHECK(false);
55  return {};
56  }
57 
58  TQueryResult forwardQueryToLeaf(
59  const Catalog_Namespace::SessionInfo& parent_session_info,
60  const std::string& query_str,
61  const size_t leaf_idx) {
62  CHECK(false);
63  return {};
64  }
65 
66  void insertDataToLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
67  const size_t leaf_idx,
68  const TInsertData& thrift_insert_data) {
69  CHECK(false);
70  }
71 
72  void checkpointLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
73  const int32_t db_id,
74  const int32_t table_id) {
75  CHECK(false);
76  }
77 
78  int32_t get_table_epochLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
79  const int32_t db_id,
80  const int32_t table_id) {
81  CHECK(false);
82  return 0;
83  }
84 
85  void set_table_epochLeaf(const Catalog_Namespace::SessionInfo& parent_session_info,
86  const int32_t db_id,
87  const int32_t table_id,
88  const int32_t new_epoch) {
89  CHECK(false);
90  }
91 
92  void connect(const Catalog_Namespace::SessionInfo& parent_session_info,
93  const std::string& user,
94  const std::string& passwd,
95  const std::string& dbname) {
96  CHECK(false);
97  }
98 
99  void disconnect(const TSessionId session) { CHECK(false); }
100 
101  void switch_database(const TSessionId session, const std::string& dbname) {
102  CHECK(false);
103  }
104 
105  void clone_session(const TSessionId session1, const TSessionId session2) {
106  CHECK(false);
107  };
108 
109  void interrupt(const TSessionId query_session, const TSessionId interrupt_session) {
110  CHECK(false);
111  }
112 
113  void set_execution_mode(const TSessionId session, const TExecuteMode::type mode) {
114  CHECK(false);
115  }
116 
117  size_t leafCount() const { return 0; }
118 
119  std::vector<TServerStatus> getLeafStatus(TSessionId session) {
120  CHECK(false);
121  return {};
122  }
123 
124  std::vector<TNodeMemoryInfo> getLeafMemoryInfo(
125  TSessionId session,
126  Data_Namespace::MemoryLevel memory_level) {
127  CHECK(false);
128  return {};
129  }
130 
131  TClusterHardwareInfo getHardwareInfo(TSessionId session) {
132  CHECK(false);
133  return {};
134  }
135 
136  void clear_leaf_cpu_memory(const TSessionId session) { CHECK(false); }
137 
138  void clear_leaf_gpu_memory(const TSessionId session) { CHECK(false); }
139 
140  std::vector<size_t> query_get_outer_fragment_counts(
141  const Catalog_Namespace::SessionInfo& parent_session_info,
142  std::string& sql_query) {
143  CHECK(false);
144  return {};
145  }
146 };
147 
148 #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 disconnect(const TSessionId session)
LeafAggregator(const std::vector< LeafHostInfo > &leaves)
CHECK(cgen_state)
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)
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)
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)