#include "MapKeeper.h" #include #include #include #include #include #include #include #include #include "logstore.h" #include "datatuple.h" #include "LSMServerHandler.h" using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; using namespace ::apache::thrift::transport; using namespace ::apache::thrift::server; using namespace ::apache::thrift::concurrency; using boost::shared_ptr; using namespace mapkeeper; int main(int argc, char **argv) { shared_ptr handler(new LSMServerHandler(argc, argv)); shared_ptr processor(new MapKeeperProcessor(handler)); shared_ptr serverTransport(new TServerSocket(9090)); shared_ptr transportFactory(new TFramedTransportFactory()); shared_ptr protocolFactory(new TBinaryProtocolFactory()); shared_ptr threadManager = ThreadManager::newSimpleThreadManager(32); shared_ptr threadFactory(new PosixThreadFactory()); //threadManager->threadFactory(threadFactory); //threadManager->start(); TThreadedServer server(processor, serverTransport, transportFactory, protocolFactory); printf("I'm using tthreaded server!"); server.serve(); return 0; }