GPUdb C++ API  Version 7.2.2.4
show_graph.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __SHOW_GRAPH_H__
7 #define __SHOW_GRAPH_H__
8 
9 namespace gpudb
10 {
19  {
24  graphName(std::string()),
25  options(std::map<std::string, std::string>())
26  {
27  }
28 
63  ShowGraphRequest(const std::string& graphName_, const std::map<std::string, std::string>& options_):
64  graphName( graphName_ ),
65  options( options_ )
66  {
67  }
68 
74  std::string graphName;
75 
97  std::map<std::string, std::string> options;
98  };
99 } // end namespace gpudb
100 
101 namespace avro
102 {
103  template<> struct codec_traits<gpudb::ShowGraphRequest>
104  {
105  static void encode(Encoder& e, const gpudb::ShowGraphRequest& v)
106  {
107  ::avro::encode(e, v.graphName);
108  ::avro::encode(e, v.options);
109  }
110 
111  static void decode(Decoder& d, gpudb::ShowGraphRequest& v)
112  {
113  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
114  {
115  const std::vector<size_t> fo = rd->fieldOrder();
116 
117  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
118  {
119  switch (*it)
120  {
121  case 0:
122  ::avro::decode(d, v.graphName);
123  break;
124 
125  case 1:
126  ::avro::decode(d, v.options);
127  break;
128 
129  default:
130  break;
131  }
132  }
133  }
134  else
135  {
136  ::avro::decode(d, v.graphName);
137  ::avro::decode(d, v.options);
138  }
139  }
140  };
141 } // end namespace avro
142 
143 namespace gpudb
144 {
150  {
155  result(bool()),
156  load(std::vector<int32_t>()),
157  memory(std::vector<int64_t>()),
158  graphNames(std::vector<std::string>()),
159  graphServerIds(std::vector<int32_t>()),
160  graphOwnerUserNames(std::vector<std::string>()),
161  graphOwnerResourceGroups(std::vector<std::string>()),
162  directed(std::vector<bool>()),
163  numNodes(std::vector<int64_t>()),
164  numEdges(std::vector<int64_t>()),
165  numBytes(std::vector<int64_t>()),
166  resourceCapacity(std::vector<int64_t>()),
167  isPersisted(std::vector<bool>()),
168  isPartitioned(std::vector<bool>()),
169  isSyncDb(std::vector<bool>()),
170  hasInsertTableMonitor(std::vector<bool>()),
171  originalRequest(std::vector<std::string>()),
172  info(std::map<std::string, std::string>())
173  {
174  }
175 
180  bool result;
181 
186  std::vector<int32_t> load;
187 
191  std::vector<int64_t> memory;
192 
196  std::vector<std::string> graphNames;
197 
201  std::vector<int32_t> graphServerIds;
202 
206  std::vector<std::string> graphOwnerUserNames;
207 
211  std::vector<std::string> graphOwnerResourceGroups;
212 
220  std::vector<bool> directed;
221 
225  std::vector<int64_t> numNodes;
226 
230  std::vector<int64_t> numEdges;
231 
235  std::vector<int64_t> numBytes;
236 
240  std::vector<int64_t> resourceCapacity;
241 
246  std::vector<bool> isPersisted;
247 
252  std::vector<bool> isPartitioned;
253 
259  std::vector<bool> isSyncDb;
260 
265  std::vector<bool> hasInsertTableMonitor;
266 
271  std::vector<std::string> originalRequest;
272 
276  std::map<std::string, std::string> info;
277  };
278 } // end namespace gpudb
279 
280 namespace avro
281 {
282  template<> struct codec_traits<gpudb::ShowGraphResponse>
283  {
284  static void encode(Encoder& e, const gpudb::ShowGraphResponse& v)
285  {
286  ::avro::encode(e, v.result);
287  ::avro::encode(e, v.load);
288  ::avro::encode(e, v.memory);
289  ::avro::encode(e, v.graphNames);
290  ::avro::encode(e, v.graphServerIds);
291  ::avro::encode(e, v.graphOwnerUserNames);
292  ::avro::encode(e, v.graphOwnerResourceGroups);
293  ::avro::encode(e, v.directed);
294  ::avro::encode(e, v.numNodes);
295  ::avro::encode(e, v.numEdges);
296  ::avro::encode(e, v.numBytes);
297  ::avro::encode(e, v.resourceCapacity);
298  ::avro::encode(e, v.isPersisted);
299  ::avro::encode(e, v.isPartitioned);
300  ::avro::encode(e, v.isSyncDb);
301  ::avro::encode(e, v.hasInsertTableMonitor);
302  ::avro::encode(e, v.originalRequest);
303  ::avro::encode(e, v.info);
304  }
305 
306  static void decode(Decoder& d, gpudb::ShowGraphResponse& v)
307  {
308  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
309  {
310  const std::vector<size_t> fo = rd->fieldOrder();
311 
312  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
313  {
314  switch (*it)
315  {
316  case 0:
317  ::avro::decode(d, v.result);
318  break;
319 
320  case 1:
321  ::avro::decode(d, v.load);
322  break;
323 
324  case 2:
325  ::avro::decode(d, v.memory);
326  break;
327 
328  case 3:
329  ::avro::decode(d, v.graphNames);
330  break;
331 
332  case 4:
333  ::avro::decode(d, v.graphServerIds);
334  break;
335 
336  case 5:
337  ::avro::decode(d, v.graphOwnerUserNames);
338  break;
339 
340  case 6:
341  ::avro::decode(d, v.graphOwnerResourceGroups);
342  break;
343 
344  case 7:
345  ::avro::decode(d, v.directed);
346  break;
347 
348  case 8:
349  ::avro::decode(d, v.numNodes);
350  break;
351 
352  case 9:
353  ::avro::decode(d, v.numEdges);
354  break;
355 
356  case 10:
357  ::avro::decode(d, v.numBytes);
358  break;
359 
360  case 11:
361  ::avro::decode(d, v.resourceCapacity);
362  break;
363 
364  case 12:
365  ::avro::decode(d, v.isPersisted);
366  break;
367 
368  case 13:
369  ::avro::decode(d, v.isPartitioned);
370  break;
371 
372  case 14:
373  ::avro::decode(d, v.isSyncDb);
374  break;
375 
376  case 15:
377  ::avro::decode(d, v.hasInsertTableMonitor);
378  break;
379 
380  case 16:
381  ::avro::decode(d, v.originalRequest);
382  break;
383 
384  case 17:
385  ::avro::decode(d, v.info);
386  break;
387 
388  default:
389  break;
390  }
391  }
392  }
393  else
394  {
395  ::avro::decode(d, v.result);
396  ::avro::decode(d, v.load);
397  ::avro::decode(d, v.memory);
398  ::avro::decode(d, v.graphNames);
399  ::avro::decode(d, v.graphServerIds);
400  ::avro::decode(d, v.graphOwnerUserNames);
401  ::avro::decode(d, v.graphOwnerResourceGroups);
402  ::avro::decode(d, v.directed);
403  ::avro::decode(d, v.numNodes);
404  ::avro::decode(d, v.numEdges);
405  ::avro::decode(d, v.numBytes);
406  ::avro::decode(d, v.resourceCapacity);
407  ::avro::decode(d, v.isPersisted);
408  ::avro::decode(d, v.isPartitioned);
409  ::avro::decode(d, v.isSyncDb);
410  ::avro::decode(d, v.hasInsertTableMonitor);
411  ::avro::decode(d, v.originalRequest);
412  ::avro::decode(d, v.info);
413  }
414  }
415  };
416 } // end namespace avro
417 
418 #endif // __SHOW_GRAPH_H__
ShowGraphResponse()
Constructs a ShowGraphResponse object with default parameters.
Definition: show_graph.h:154
A set of parameters for GPUdb::showGraph.
Definition: show_graph.h:18
std::vector< int64_t > memory
Available memory.
Definition: show_graph.h:191
std::vector< std::string > graphOwnerResourceGroups
Owner of the resource groups(s) of the graph(s).
Definition: show_graph.h:211
std::vector< int64_t > resourceCapacity
Memory this graph uses in bytes.
Definition: show_graph.h:240
ShowGraphRequest()
Constructs a ShowGraphRequest object with default parameters.
Definition: show_graph.h:23
std::vector< std::string > graphOwnerUserNames
Owner of the graph(s) and associated solution table(s).
Definition: show_graph.h:206
std::vector< int64_t > numEdges
Total number of edges in the graph.
Definition: show_graph.h:230
std::map< std::string, std::string > options
Optional parameters.
Definition: show_graph.h:97
std::vector< bool > isSyncDb
Shows whether or not the graph is linked to the original tables that created it, and will potentially...
Definition: show_graph.h:259
std::vector< std::string > originalRequest
The original client request used to create the graph (before any expression evaluation or separator p...
Definition: show_graph.h:271
std::vector< std::string > graphNames
Name(s) of the graph(s).
Definition: show_graph.h:196
A set of results returned by GPUdb::showGraph.
Definition: show_graph.h:149
std::vector< bool > directed
Whether or not the edges of the graph have directions (bi-directional edges can still exist in direct...
Definition: show_graph.h:220
std::vector< bool > hasInsertTableMonitor
Shows whether or not the graph has an insert table monitor attached to it.
Definition: show_graph.h:265
ShowGraphRequest(const std::string &graphName_, const std::map< std::string, std::string > &options_)
Constructs a ShowGraphRequest object with the specified parameters.
Definition: show_graph.h:63
std::vector< bool > isPartitioned
Indicates if the graph data is distributed across all available servers.
Definition: show_graph.h:252
std::vector< int64_t > numBytes
Memory this graph uses in bytes.
Definition: show_graph.h:235
std::string graphName
Name of the graph on which to retrieve information.
Definition: show_graph.h:74
std::vector< bool > isPersisted
Shows whether or not the graph is persisted (saved and loaded on launch).
Definition: show_graph.h:246
std::vector< int64_t > numNodes
Total number of nodes in the graph.
Definition: show_graph.h:225
std::vector< int32_t > load
A percentage approximating the current computational load on the server.
Definition: show_graph.h:186
std::map< std::string, std::string > info
Additional information.
Definition: show_graph.h:276
std::vector< int32_t > graphServerIds
Id(s) of the graph(s).
Definition: show_graph.h:201
bool result
Indicates a success.
Definition: show_graph.h:180