GPUdb C++ API  Version 7.2.2.4
admin_add_ranks.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_ADD_RANKS_H__
7 #define __ADMIN_ADD_RANKS_H__
8 
9 namespace gpudb
10 {
47  {
52  hosts(std::vector<std::string>()),
53  configParams(std::vector<std::map<std::string, std::string> >()),
54  options(std::map<std::string, std::string>())
55  {
56  }
57 
134  AdminAddRanksRequest(const std::vector<std::string>& hosts_, const std::vector<std::map<std::string, std::string> >& configParams_, const std::map<std::string, std::string>& options_):
135  hosts( hosts_ ),
136  configParams( configParams_ ),
137  options( options_ )
138  {
139  }
140 
156  std::vector<std::string> hosts;
157 
182  std::vector<std::map<std::string, std::string> > configParams;
183 
203  std::map<std::string, std::string> options;
204  };
205 } // end namespace gpudb
206 
207 namespace avro
208 {
209  template<> struct codec_traits<gpudb::AdminAddRanksRequest>
210  {
211  static void encode(Encoder& e, const gpudb::AdminAddRanksRequest& v)
212  {
213  ::avro::encode(e, v.hosts);
214  ::avro::encode(e, v.configParams);
215  ::avro::encode(e, v.options);
216  }
217 
218  static void decode(Decoder& d, gpudb::AdminAddRanksRequest& v)
219  {
220  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
221  {
222  const std::vector<size_t> fo = rd->fieldOrder();
223 
224  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
225  {
226  switch (*it)
227  {
228  case 0:
229  ::avro::decode(d, v.hosts);
230  break;
231 
232  case 1:
233  ::avro::decode(d, v.configParams);
234  break;
235 
236  case 2:
237  ::avro::decode(d, v.options);
238  break;
239 
240  default:
241  break;
242  }
243  }
244  }
245  else
246  {
247  ::avro::decode(d, v.hosts);
248  ::avro::decode(d, v.configParams);
249  ::avro::decode(d, v.options);
250  }
251  }
252  };
253 } // end namespace avro
254 
255 namespace gpudb
256 {
263  {
268  addedRanks(std::vector<std::string>()),
269  info(std::map<std::string, std::string>())
270  {
271  }
272 
279  std::vector<std::string> addedRanks;
280 
284  std::map<std::string, std::string> info;
285  };
286 } // end namespace gpudb
287 
288 namespace avro
289 {
290  template<> struct codec_traits<gpudb::AdminAddRanksResponse>
291  {
292  static void encode(Encoder& e, const gpudb::AdminAddRanksResponse& v)
293  {
294  ::avro::encode(e, v.addedRanks);
295  ::avro::encode(e, v.info);
296  }
297 
298  static void decode(Decoder& d, gpudb::AdminAddRanksResponse& v)
299  {
300  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
301  {
302  const std::vector<size_t> fo = rd->fieldOrder();
303 
304  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
305  {
306  switch (*it)
307  {
308  case 0:
309  ::avro::decode(d, v.addedRanks);
310  break;
311 
312  case 1:
313  ::avro::decode(d, v.info);
314  break;
315 
316  default:
317  break;
318  }
319  }
320  }
321  else
322  {
323  ::avro::decode(d, v.addedRanks);
324  ::avro::decode(d, v.info);
325  }
326  }
327  };
328 } // end namespace avro
329 
330 #endif // __ADMIN_ADD_RANKS_H__
AdminAddRanksRequest(const std::vector< std::string > &hosts_, const std::vector< std::map< std::string, std::string > > &configParams_, const std::map< std::string, std::string > &options_)
Constructs an AdminAddRanksRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::adminAddRanks.
std::map< std::string, std::string > info
Additional information.
std::vector< std::string > addedRanks
The number assigned to each added rank, formatted as 'rankN', in the same order as the ranks in hosts...
AdminAddRanksRequest()
Constructs an AdminAddRanksRequest object with default parameters.
AdminAddRanksResponse()
Constructs an AdminAddRanksResponse object with default parameters.
A set of parameters for GPUdb::adminAddRanks.
std::vector< std::string > hosts
Array of host IP addresses (matching a hostN.address from the gpudb.conf file), or host identifiers (...
std::vector< std::map< std::string, std::string > > configParams
Array of maps containing configuration parameters to apply to the new ranks found in hosts.