OmniSciDB  1dac507f6e
 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/MapD.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 interrupt(const TSessionId session) { CHECK(false); }
102 
103  void set_execution_mode(const TSessionId session, const TExecuteMode::type mode) {
104  CHECK(false);
105  }
106 
107  size_t leafCount() const { return 0; }
108 
109  std::vector<TServerStatus> getLeafStatus(TSessionId session) {
110  CHECK(false);
111  return {};
112  }
113 
114  std::vector<TNodeMemoryInfo> getLeafMemoryInfo(
115  TSessionId session,
116  Data_Namespace::MemoryLevel memory_level) {
117  CHECK(false);
118  return {};
119  }
120 
121  TClusterHardwareInfo getHardwareInfo(TSessionId session) {
122  CHECK(false);
123  return {};
124  }
125 
126  void clear_leaf_cpu_memory(const TSessionId session) { CHECK(false); }
127 
128  void clear_leaf_gpu_memory(const TSessionId session) { CHECK(false); }
129 };
130 
131 #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)
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 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 disconnect(const TSessionId session)
void interrupt(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)