15 #ifndef IMPALA_CATALOG_CATALOG_SERVER_H
16 #define IMPALA_CATALOG_CATALOG_SERVER_H
20 #include <boost/shared_ptr.hpp>
21 #include <boost/thread/mutex.hpp>
22 #include <boost/unordered_set.hpp>
24 #include "gen-cpp/CatalogService.h"
25 #include "gen-cpp/Frontend_types.h"
26 #include "gen-cpp/Types_types.h"
30 #include "rapidjson/rapidjson.h"
36 class TGetAllCatalogObjectsResponse;
145 std::vector<TTopicDelta>* subscriber_topic_updates);
187 rapidjson::Document* document);
195 rapidjson::Document* document);
boost::mutex catalog_lock_
void GatherCatalogUpdatesThread()
boost::condition_variable catalog_update_cv_
void CatalogObjectsUrlCallback(const Webserver::ArgumentMap &args, rapidjson::Document *document)
MetricGroups may be organised hierarchically as a tree.
boost::unordered_set< std::string > catalog_topic_entry_keys_
void BuildTopicUpdates(const std::vector< TCatalogObject > &catalog_objects)
static std::string IMPALA_CATALOG_TOPIC
boost::shared_ptr< CatalogServiceIf > thrift_iface_
Thrift API implementation which proxies requests onto this CatalogService.
boost::scoped_ptr< StatestoreSubscriber > statestore_subscriber_
std::map< std::string, std::string > ArgumentMap
boost::scoped_ptr< Thread > catalog_update_gathering_thread_
Thread that polls the catalog for any updates.
boost::scoped_ptr< Catalog > catalog_
bool topic_updates_ready_
const boost::shared_ptr< CatalogServiceIf > & thrift_iface() const
Returns the Thrift API interface that proxies requests onto the local CatalogService.
CatalogServer(MetricGroup *metrics)
int64_t catalog_objects_min_version_
void RegisterWebpages(Webserver *webserver)
std::map< Statestore::TopicId, TTopicDelta > TopicDeltaMap
A TopicDeltaMap is passed to each callback. See UpdateCallback for more details.
ThriftSerializer thrift_serializer_
Catalog * catalog() const
void CatalogUrlCallback(const Webserver::ArgumentMap &args, rapidjson::Document *document)
StatsMetric< double > * topic_processing_time_metric_
Metric that tracks the amount of time taken preparing a catalog update.
void UpdateCatalogTopicCallback(const StatestoreSubscriber::TopicDeltaMap &incoming_topic_deltas, std::vector< TTopicDelta > *subscriber_topic_updates)
int64_t catalog_objects_max_version_
std::vector< TTopicItem > pending_topic_updates_
int64_t last_sent_catalog_version_