| 3606 | } |
| 3607 | |
| 3608 | void HandleClientSetExpire(const std::vector<std::string> parts, |
| 3609 | ::fedb::client::TabletClient* client) { |
| 3610 | if (parts.size() < 3) { |
| 3611 | std::cout << "Bad format" << std::endl; |
| 3612 | return; |
| 3613 | } |
| 3614 | try { |
| 3615 | bool ok = client->SetExpire(boost::lexical_cast<uint32_t>(parts[1]), |
| 3616 | boost::lexical_cast<uint32_t>(parts[2]), |
| 3617 | parts[3] == "true" ? true : false); |
| 3618 | if (ok) { |
| 3619 | std::cout << "setexpire ok" << std::endl; |
| 3620 | } else { |
| 3621 | std::cout << "Fail to setexpire" << std::endl; |
| 3622 | } |
| 3623 | } catch (boost::bad_lexical_cast& e) { |
| 3624 | std::cout << "Bad format" << std::endl; |
| 3625 | } |
| 3626 | } |
| 3627 | |
| 3628 | void HandleClientConnectZK(const std::vector<std::string> parts, |
| 3629 | ::fedb::client::TabletClient* client) { |
no test coverage detected