the input format like put 1 1 key time value
| 3401 | |
| 3402 | // the input format like put 1 1 key time value |
| 3403 | void 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 | |
| 3425 | void HandleClientBenPut(std::vector<std::string>& parts, // NOLINT |
| 3426 | ::fedb::client::TabletClient* client) { |
no test coverage detected