mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Using different ZooKeeper library (development) [#CLICKHOUSE-2]
This commit is contained in:
parent
280a5f8e3f
commit
0714a217fe
@ -11,7 +11,7 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <iostream>
|
||||
//#include <iostream>
|
||||
|
||||
|
||||
/** ZooKeeper wire protocol.
|
||||
@ -799,7 +799,7 @@ void ZooKeeper::receiveEvent()
|
||||
|
||||
response = std::make_shared<HeartbeatResponse>();
|
||||
|
||||
std::cerr << "Received heartbeat\n";
|
||||
// std::cerr << "Received heartbeat\n";
|
||||
}
|
||||
else if (xid == watch_xid)
|
||||
{
|
||||
@ -833,7 +833,7 @@ void ZooKeeper::receiveEvent()
|
||||
}
|
||||
};
|
||||
|
||||
std::cerr << "Received watch\n";
|
||||
// std::cerr << "Received watch\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -848,7 +848,7 @@ void ZooKeeper::receiveEvent()
|
||||
operations.erase(it);
|
||||
}
|
||||
|
||||
std::cerr << "Received response: " << request_info.request->getOpNum() << "\n";
|
||||
// std::cerr << "Received response: " << request_info.request->getOpNum() << "\n";
|
||||
|
||||
response = request_info.request->makeResponse();
|
||||
}
|
||||
@ -1083,7 +1083,7 @@ void ZooKeeper::MultiResponse::readImpl(ReadBuffer & in)
|
||||
ZooKeeperImpl::read(done, in);
|
||||
ZooKeeperImpl::read(op_error, in);
|
||||
|
||||
std::cerr << "Received result for multi: " << op_num << "\n";
|
||||
// std::cerr << "Received result for multi: " << op_num << "\n";
|
||||
|
||||
if (done)
|
||||
throw Exception("Not enough results received for multi transaction");
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include <Common/ZooKeeper/ZooKeeper.h>
|
||||
#include <Common/typeid_cast.h>
|
||||
#include <iostream>
|
||||
#include <port/unistd.h>
|
||||
|
||||
|
||||
using namespace zkutil;
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
@ -41,7 +43,7 @@ try
|
||||
ops.emplace_back(zkutil::makeRemoveRequest("/test", -1));
|
||||
std::cout << "multi" << std::endl;
|
||||
zkutil::Responses res = zk.multi(ops);
|
||||
std::cout << "path created: " << dynamic_cast<ZooKeeperImpl::ZooKeeper::CreateResponse &>(*ops[0]).path_created << std::endl;
|
||||
std::cout << "path created: " << typeid_cast<const CreateResponse &>(*res[0]).path_created << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user