#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 sherpa; int main(int argc, char **argv) { shared_ptr handler(new LSMServerHandler(argc, argv)); shared_ptr processor(new PersistentStoreProcessor(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(); TThreadPoolServer server(processor, serverTransport, transportFactory, protocolFactory, threadManager); server.serve(); return 0; }