GPUdb C++ API  Version 7.2.2.4
repartition_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 __REPARTITION_GRAPH_H__
7 #define __REPARTITION_GRAPH_H__
8 
9 namespace gpudb
10 {
26  {
31  graphName(std::string()),
32  options(std::map<std::string, std::string>())
33  {
34  }
35 
77  RepartitionGraphRequest(const std::string& graphName_, const std::map<std::string, std::string>& options_):
78  graphName( graphName_ ),
79  options( options_ )
80  {
81  }
82 
86  std::string graphName;
87 
114  std::map<std::string, std::string> options;
115  };
116 } // end namespace gpudb
117 
118 namespace avro
119 {
120  template<> struct codec_traits<gpudb::RepartitionGraphRequest>
121  {
122  static void encode(Encoder& e, const gpudb::RepartitionGraphRequest& v)
123  {
124  ::avro::encode(e, v.graphName);
125  ::avro::encode(e, v.options);
126  }
127 
128  static void decode(Decoder& d, gpudb::RepartitionGraphRequest& v)
129  {
130  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
131  {
132  const std::vector<size_t> fo = rd->fieldOrder();
133 
134  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
135  {
136  switch (*it)
137  {
138  case 0:
139  ::avro::decode(d, v.graphName);
140  break;
141 
142  case 1:
143  ::avro::decode(d, v.options);
144  break;
145 
146  default:
147  break;
148  }
149  }
150  }
151  else
152  {
153  ::avro::decode(d, v.graphName);
154  ::avro::decode(d, v.options);
155  }
156  }
157  };
158 } // end namespace avro
159 
160 namespace gpudb
161 {
168  {
174  result(bool()),
175  info(std::map<std::string, std::string>())
176  {
177  }
178 
182  bool result;
183 
187  std::map<std::string, std::string> info;
188  };
189 } // end namespace gpudb
190 
191 namespace avro
192 {
193  template<> struct codec_traits<gpudb::RepartitionGraphResponse>
194  {
195  static void encode(Encoder& e, const gpudb::RepartitionGraphResponse& v)
196  {
197  ::avro::encode(e, v.result);
198  ::avro::encode(e, v.info);
199  }
200 
201  static void decode(Decoder& d, gpudb::RepartitionGraphResponse& v)
202  {
203  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
204  {
205  const std::vector<size_t> fo = rd->fieldOrder();
206 
207  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
208  {
209  switch (*it)
210  {
211  case 0:
212  ::avro::decode(d, v.result);
213  break;
214 
215  case 1:
216  ::avro::decode(d, v.info);
217  break;
218 
219  default:
220  break;
221  }
222  }
223  }
224  else
225  {
226  ::avro::decode(d, v.result);
227  ::avro::decode(d, v.info);
228  }
229  }
230  };
231 } // end namespace avro
232 
233 #endif // __REPARTITION_GRAPH_H__
bool result
Indicates a successful rebalancing on all servers.
A set of parameters for GPUdb::repartitionGraph.
std::map< std::string, std::string > options
Optional parameters.
RepartitionGraphResponse()
Constructs a RepartitionGraphResponse object with default parameters.
RepartitionGraphRequest()
Constructs a RepartitionGraphRequest object with default parameters.
std::map< std::string, std::string > info
Additional information.
A set of results returned by GPUdb::repartitionGraph.
std::string graphName
Name of the graph resource to rebalance.
RepartitionGraphRequest(const std::string &graphName_, const std::map< std::string, std::string > &options_)
Constructs a RepartitionGraphRequest object with the specified parameters.