GPUdb C++ API  Version 7.2.3.0
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 
73  RepartitionGraphRequest(const std::string& graphName_, const std::map<std::string, std::string>& options_):
74  graphName( graphName_ ),
75  options( options_ )
76  {
77  }
78 
82  std::string graphName;
83 
107  std::map<std::string, std::string> options;
108  };
109 } // end namespace gpudb
110 
111 namespace avro
112 {
113  template<> struct codec_traits<gpudb::RepartitionGraphRequest>
114  {
115  static void encode(Encoder& e, const gpudb::RepartitionGraphRequest& v)
116  {
117  ::avro::encode(e, v.graphName);
118  ::avro::encode(e, v.options);
119  }
120 
121  static void decode(Decoder& d, gpudb::RepartitionGraphRequest& v)
122  {
123  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
124  {
125  const std::vector<size_t> fo = rd->fieldOrder();
126 
127  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
128  {
129  switch (*it)
130  {
131  case 0:
132  ::avro::decode(d, v.graphName);
133  break;
134 
135  case 1:
136  ::avro::decode(d, v.options);
137  break;
138 
139  default:
140  break;
141  }
142  }
143  }
144  else
145  {
146  ::avro::decode(d, v.graphName);
147  ::avro::decode(d, v.options);
148  }
149  }
150  };
151 } // end namespace avro
152 
153 namespace gpudb
154 {
161  {
167  result(bool()),
168  info(std::map<std::string, std::string>())
169  {
170  }
171 
175  bool result;
176 
180  std::map<std::string, std::string> info;
181  };
182 } // end namespace gpudb
183 
184 namespace avro
185 {
186  template<> struct codec_traits<gpudb::RepartitionGraphResponse>
187  {
188  static void encode(Encoder& e, const gpudb::RepartitionGraphResponse& v)
189  {
190  ::avro::encode(e, v.result);
191  ::avro::encode(e, v.info);
192  }
193 
194  static void decode(Decoder& d, gpudb::RepartitionGraphResponse& v)
195  {
196  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
197  {
198  const std::vector<size_t> fo = rd->fieldOrder();
199 
200  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
201  {
202  switch (*it)
203  {
204  case 0:
205  ::avro::decode(d, v.result);
206  break;
207 
208  case 1:
209  ::avro::decode(d, v.info);
210  break;
211 
212  default:
213  break;
214  }
215  }
216  }
217  else
218  {
219  ::avro::decode(d, v.result);
220  ::avro::decode(d, v.info);
221  }
222  }
223  };
224 } // end namespace avro
225 
226 #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.