18 #include <boost/scoped_ptr.hpp>
46 using namespace impala;
47 using namespace apache::thrift;
49 int main(
int argc,
char** argv) {
50 FLAGS_webserver_port = 25020;
51 FLAGS_state_store_subscriber_port = 23020;
56 scoped_ptr<Webserver> webserver(
new Webserver());
57 if (FLAGS_enable_webserver) {
61 LOG(INFO) <<
"Not starting webserver";
64 scoped_ptr<MetricGroup> metrics(
new MetricGroup(
"catalog"));
65 metrics->Init(FLAGS_enable_webserver ? webserver.get() : NULL);
71 "catalogd build version");
75 catalog_server.RegisterWebpages(webserver.get());
76 shared_ptr<TProcessor> processor(
77 new CatalogServiceProcessor(catalog_server.thrift_iface()));
78 shared_ptr<TProcessorEventHandler> event_handler(
80 processor->setEventHandler(event_handler);
83 FLAGS_catalog_service_port, NULL, metrics.get(), 5);
85 LOG(INFO) <<
"CatalogService started on port: " << FLAGS_catalog_service_port;
DECLARE_bool(enable_webserver)
void AddDefaultUrlCallbacks(Webserver *webserver, MemTracker *process_mem_tracker=NULL)
string GetVersionString(bool compact)
Returns "<program short name> version <GetBuildVersion(compact)>".
Status RegisterMemoryMetrics(MetricGroup *metrics, bool register_jvm_metrics)
void InitCommonRuntime(int argc, char **argv, bool init_jvm, TestInfo::Mode m=TestInfo::NON_TEST)
MetricGroups may be organised hierarchically as a tree.
void Join()
Blocks until the server stops and exits its main thread.
DECLARE_int32(catalog_service_port)
Status StartThreadInstrumentation(MetricGroup *metrics, Webserver *webserver)
void InitRpcEventTracing(Webserver *webserver)
Initialises rpc event tracing, must be called before any RpcEventHandlers are created.
#define EXIT_IF_ERROR(stmt)
This class is thread-safe.
int main(int argc, char **argv)
DECLARE_string(classpath)