GPUdb C++ API  Version 7.2.3.0
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 
80  ShowGraphRequest(const std::string& graphName_, const std::map<std::string, std::string>& options_):
81  graphName( graphName_ ),
82  options( options_ )
83  {
84  }
85 
91  std::string graphName;
92 
125  std::map<std::string, std::string> options;
126  };
127 } // end namespace gpudb
128 
129 namespace avro
130 {
131  template<> struct codec_traits<gpudb::ShowGraphRequest>
132  {
133  static void encode(Encoder& e, const gpudb::ShowGraphRequest& v)
134  {
135  ::avro::encode(e, v.graphName);
136  ::avro::encode(e, v.options);
137  }
138 
139  static void decode(Decoder& d, gpudb::ShowGraphRequest& v)
140  {
141  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
142  {
143  const std::vector<size_t> fo = rd->fieldOrder();
144 
145  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
146  {
147  switch (*it)
148  {
149  case 0:
150  ::avro::decode(d, v.graphName);
151  break;
152 
153  case 1:
154  ::avro::decode(d, v.options);
155  break;
156 
157  default:
158  break;
159  }
160  }
161  }
162  else
163  {
164  ::avro::decode(d, v.graphName);
165  ::avro::decode(d, v.options);
166  }
167  }
168  };
169 } // end namespace avro
170 
171 namespace gpudb
172 {
178  {
183  result(bool()),
184  load(std::vector<int32_t>()),
185  memory(std::vector<int64_t>()),
186  graphNames(std::vector<std::string>()),
187  graphServerIds(std::vector<int32_t>()),
188  graphOwnerUserNames(std::vector<std::string>()),
189  graphOwnerResourceGroups(std::vector<std::string>()),
190  directed(std::vector<bool>()),
191  numNodes(std::vector<int64_t>()),
192  numEdges(std::vector<int64_t>()),
193  numBytes(std::vector<int64_t>()),
194  resourceCapacity(std::vector<int64_t>()),
195  isPersisted(std::vector<bool>()),
196  isPartitioned(std::vector<bool>()),
197  isSyncDb(std::vector<bool>()),
198  hasInsertTableMonitor(std::vector<bool>()),
199  originalRequest(std::vector<std::string>()),
200  info(std::map<std::string, std::string>())
201  {
202  }
203 
208  bool result;
209 
214  std::vector<int32_t> load;
215 
219  std::vector<int64_t> memory;
220 
224  std::vector<std::string> graphNames;
225 
229  std::vector<int32_t> graphServerIds;
230 
234  std::vector<std::string> graphOwnerUserNames;
235 
239  std::vector<std::string> graphOwnerResourceGroups;
240 
248  std::vector<bool> directed;
249 
253  std::vector<int64_t> numNodes;
254 
258  std::vector<int64_t> numEdges;
259 
263  std::vector<int64_t> numBytes;
264 
268  std::vector<int64_t> resourceCapacity;
269 
274  std::vector<bool> isPersisted;
275 
280  std::vector<bool> isPartitioned;
281 
287  std::vector<bool> isSyncDb;
288 
293  std::vector<bool> hasInsertTableMonitor;
294 
299  std::vector<std::string> originalRequest;
300 
304  std::map<std::string, std::string> info;
305  };
306 } // end namespace gpudb
307 
308 namespace avro
309 {
310  template<> struct codec_traits<gpudb::ShowGraphResponse>
311  {
312  static void encode(Encoder& e, const gpudb::ShowGraphResponse& v)
313  {
314  ::avro::encode(e, v.result);
315  ::avro::encode(e, v.load);
316  ::avro::encode(e, v.memory);
317  ::avro::encode(e, v.graphNames);
318  ::avro::encode(e, v.graphServerIds);
319  ::avro::encode(e, v.graphOwnerUserNames);
320  ::avro::encode(e, v.graphOwnerResourceGroups);
321  ::avro::encode(e, v.directed);
322  ::avro::encode(e, v.numNodes);
323  ::avro::encode(e, v.numEdges);
324  ::avro::encode(e, v.numBytes);
325  ::avro::encode(e, v.resourceCapacity);
326  ::avro::encode(e, v.isPersisted);
327  ::avro::encode(e, v.isPartitioned);
328  ::avro::encode(e, v.isSyncDb);
329  ::avro::encode(e, v.hasInsertTableMonitor);
330  ::avro::encode(e, v.originalRequest);
331  ::avro::encode(e, v.info);
332  }
333 
334  static void decode(Decoder& d, gpudb::ShowGraphResponse& v)
335  {
336  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
337  {
338  const std::vector<size_t> fo = rd->fieldOrder();
339 
340  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
341  {
342  switch (*it)
343  {
344  case 0:
345  ::avro::decode(d, v.result);
346  break;
347 
348  case 1:
349  ::avro::decode(d, v.load);
350  break;
351 
352  case 2:
353  ::avro::decode(d, v.memory);
354  break;
355 
356  case 3:
357  ::avro::decode(d, v.graphNames);
358  break;
359 
360  case 4:
361  ::avro::decode(d, v.graphServerIds);
362  break;
363 
364  case 5:
365  ::avro::decode(d, v.graphOwnerUserNames);
366  break;
367 
368  case 6:
369  ::avro::decode(d, v.graphOwnerResourceGroups);
370  break;
371 
372  case 7:
373  ::avro::decode(d, v.directed);
374  break;
375 
376  case 8:
377  ::avro::decode(d, v.numNodes);
378  break;
379 
380  case 9:
381  ::avro::decode(d, v.numEdges);
382  break;
383 
384  case 10:
385  ::avro::decode(d, v.numBytes);
386  break;
387 
388  case 11:
389  ::avro::decode(d, v.resourceCapacity);
390  break;
391 
392  case 12:
393  ::avro::decode(d, v.isPersisted);
394  break;
395 
396  case 13:
397  ::avro::decode(d, v.isPartitioned);
398  break;
399 
400  case 14:
401  ::avro::decode(d, v.isSyncDb);
402  break;
403 
404  case 15:
405  ::avro::decode(d, v.hasInsertTableMonitor);
406  break;
407 
408  case 16:
409  ::avro::decode(d, v.originalRequest);
410  break;
411 
412  case 17:
413  ::avro::decode(d, v.info);
414  break;
415 
416  default:
417  break;
418  }
419  }
420  }
421  else
422  {
423  ::avro::decode(d, v.result);
424  ::avro::decode(d, v.load);
425  ::avro::decode(d, v.memory);
426  ::avro::decode(d, v.graphNames);
427  ::avro::decode(d, v.graphServerIds);
428  ::avro::decode(d, v.graphOwnerUserNames);
429  ::avro::decode(d, v.graphOwnerResourceGroups);
430  ::avro::decode(d, v.directed);
431  ::avro::decode(d, v.numNodes);
432  ::avro::decode(d, v.numEdges);
433  ::avro::decode(d, v.numBytes);
434  ::avro::decode(d, v.resourceCapacity);
435  ::avro::decode(d, v.isPersisted);
436  ::avro::decode(d, v.isPartitioned);
437  ::avro::decode(d, v.isSyncDb);
438  ::avro::decode(d, v.hasInsertTableMonitor);
439  ::avro::decode(d, v.originalRequest);
440  ::avro::decode(d, v.info);
441  }
442  }
443  };
444 } // end namespace avro
445 
446 #endif // __SHOW_GRAPH_H__
ShowGraphResponse()
Constructs a ShowGraphResponse object with default parameters.
Definition: show_graph.h:182
A set of parameters for GPUdb::showGraph.
Definition: show_graph.h:18
std::vector< int64_t > memory
Available memory.
Definition: show_graph.h:219
std::vector< std::string > graphOwnerResourceGroups
Owner of the resource groups(s) of the graph(s).
Definition: show_graph.h:239
std::vector< int64_t > resourceCapacity
Memory this graph uses in bytes.
Definition: show_graph.h:268
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:234
std::vector< int64_t > numEdges
Total number of edges in the graph.
Definition: show_graph.h:258
std::map< std::string, std::string > options
Optional parameters.
Definition: show_graph.h:125
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:287
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:299
std::vector< std::string > graphNames
Name(s) of the graph(s).
Definition: show_graph.h:224
A set of results returned by GPUdb::showGraph.
Definition: show_graph.h:177
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:248
std::vector< bool > hasInsertTableMonitor
Shows whether or not the graph has an insert table monitor attached to it.
Definition: show_graph.h:293
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:80
std::vector< bool > isPartitioned
Indicates if the graph data is distributed across all available servers.
Definition: show_graph.h:280
std::vector< int64_t > numBytes
Memory this graph uses in bytes.
Definition: show_graph.h:263
std::string graphName
Name of the graph on which to retrieve information.
Definition: show_graph.h:91
std::vector< bool > isPersisted
Shows whether or not the graph is persisted (saved and loaded on launch).
Definition: show_graph.h:274
std::vector< int64_t > numNodes
Total number of nodes in the graph.
Definition: show_graph.h:253
std::vector< int32_t > load
A percentage approximating the current computational load on the server.
Definition: show_graph.h:214
std::map< std::string, std::string > info
Additional information.
Definition: show_graph.h:304
std::vector< int32_t > graphServerIds
Id(s) of the graph(s).
Definition: show_graph.h:229
bool result
Indicates a success.
Definition: show_graph.h:208