MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / HandleClientPut

Function HandleClientPut

src/cmd/fedb.cc:3403–3423  ·  view source on GitHub ↗

the input format like put 1 1 key time value

Source from the content-addressed store, hash-verified

3401
3402// the input format like put 1 1 key time value
3403void HandleClientPut(const std::vector<std::string>& parts,
3404 ::fedb::client::TabletClient* client) {
3405 if (parts.size() < 6) {
3406 std::cout << "Bad put format, eg put tid pid key time value"
3407 << std::endl;
3408 return;
3409 }
3410 try {
3411 bool ok =
3412 client->Put(boost::lexical_cast<uint32_t>(parts[1]),
3413 boost::lexical_cast<uint32_t>(parts[2]), parts[3],
3414 boost::lexical_cast<uint64_t>(parts[4]), parts[5]);
3415 if (ok) {
3416 std::cout << "Put ok" << std::endl;
3417 } else {
3418 std::cout << "Put failed" << std::endl;
3419 }
3420 } catch (std::exception const& e) {
3421 std::cout << "Invalid args tid and pid should be uint32_t" << std::endl;
3422 }
3423}
3424
3425void HandleClientBenPut(std::vector<std::string>& parts, // NOLINT
3426 ::fedb::client::TabletClient* client) {

Callers 1

StartClientFunction · 0.85

Calls 2

sizeMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected