GPUdb C++ API  Version 7.2.2.4
admin_show_shards.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 __ADMIN_SHOW_SHARDS_H__
7 #define __ADMIN_SHOW_SHARDS_H__
8 
9 namespace gpudb
10 {
21  {
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
37  AdminShowShardsRequest(const std::map<std::string, std::string>& options_):
38  options( options_ )
39  {
40  }
41 
45  std::map<std::string, std::string> options;
46  };
47 } // end namespace gpudb
48 
49 namespace avro
50 {
51  template<> struct codec_traits<gpudb::AdminShowShardsRequest>
52  {
53  static void encode(Encoder& e, const gpudb::AdminShowShardsRequest& v)
54  {
55  ::avro::encode(e, v.options);
56  }
57 
58  static void decode(Decoder& d, gpudb::AdminShowShardsRequest& v)
59  {
60  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
61  {
62  const std::vector<size_t> fo = rd->fieldOrder();
63 
64  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
65  {
66  switch (*it)
67  {
68  case 0:
69  ::avro::decode(d, v.options);
70  break;
71 
72  default:
73  break;
74  }
75  }
76  }
77  else
78  {
79  ::avro::decode(d, v.options);
80  }
81  }
82  };
83 } // end namespace avro
84 
85 namespace gpudb
86 {
93  {
99  version(int64_t()),
100  rank(std::vector<int32_t>()),
101  tom(std::vector<int32_t>()),
102  info(std::map<std::string, std::string>())
103  {
104  }
105 
109  int64_t version;
110 
114  std::vector<int32_t> rank;
115 
119  std::vector<int32_t> tom;
120 
124  std::map<std::string, std::string> info;
125  };
126 } // end namespace gpudb
127 
128 namespace avro
129 {
130  template<> struct codec_traits<gpudb::AdminShowShardsResponse>
131  {
132  static void encode(Encoder& e, const gpudb::AdminShowShardsResponse& v)
133  {
134  ::avro::encode(e, v.version);
135  ::avro::encode(e, v.rank);
136  ::avro::encode(e, v.tom);
137  ::avro::encode(e, v.info);
138  }
139 
140  static void decode(Decoder& d, gpudb::AdminShowShardsResponse& v)
141  {
142  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
143  {
144  const std::vector<size_t> fo = rd->fieldOrder();
145 
146  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
147  {
148  switch (*it)
149  {
150  case 0:
151  ::avro::decode(d, v.version);
152  break;
153 
154  case 1:
155  ::avro::decode(d, v.rank);
156  break;
157 
158  case 2:
159  ::avro::decode(d, v.tom);
160  break;
161 
162  case 3:
163  ::avro::decode(d, v.info);
164  break;
165 
166  default:
167  break;
168  }
169  }
170  }
171  else
172  {
173  ::avro::decode(d, v.version);
174  ::avro::decode(d, v.rank);
175  ::avro::decode(d, v.tom);
176  ::avro::decode(d, v.info);
177  }
178  }
179  };
180 } // end namespace avro
181 
182 #endif // __ADMIN_SHOW_SHARDS_H__
int64_t version
Current shard array version number.
AdminShowShardsRequest()
Constructs an AdminShowShardsRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::adminShowShards.
AdminShowShardsRequest(const std::map< std::string, std::string > &options_)
Constructs an AdminShowShardsRequest object with the specified parameters.
A set of parameters for GPUdb::adminShowShards.
std::vector< int32_t > tom
Array of toms to which the corresponding shard belongs.
std::vector< int32_t > rank
Array of ranks indexed by the shard number.
AdminShowShardsResponse()
Constructs an AdminShowShardsResponse object with default parameters.
std::map< std::string, std::string > info
Additional information.