Merge branch 'master' of github.com:cloudius-systems/urchin into db

Conflicts:
	message/messaging_service.cc
	message/messaging_service.hh
This commit is contained in:
Avi Kivity
2015-07-16 12:51:19 +03:00
8 changed files with 31 additions and 19 deletions

View File

@@ -4,6 +4,7 @@
#include "storage_service.hh"
#include "api/api-doc/storage_service.json.hh"
#include "db/config.hh"
#include <service/storage_service.hh>
#include <db/commitlog/commitlog.hh>
#include <gms/gossiper.hh>

View File

@@ -34,6 +34,7 @@
#include "db_clock.hh"
#include "database.hh"
#include "unimplemented.hh"
#include "db/config.hh"
static logging::logger logger("BatchLog Manager");

View File

@@ -14,6 +14,24 @@ class file;
namespace db {
typedef std::unordered_map<sstring, sstring> string_map;
/*
* This type is not use, and probably never will be.
* So it makes sense to jump through hoops just to ensure
* it is in fact handled properly...
*/
struct seed_provider_type {
seed_provider_type() = default;
seed_provider_type(sstring n,
std::initializer_list<string_map::value_type> opts =
{ })
: class_name(std::move(n)), parameters(std::move(opts)) {
}
sstring class_name;
string_map parameters;
};
class config {
public:
enum class value_status {
@@ -79,22 +97,7 @@ public:
typedef std::unordered_map<sstring, sstring> string_map;
typedef std::vector<sstring> string_list;
/*
* This type is not use, and probably never will be.
* So it makes sense to jump through hoops just to ensure
* it is in fact handled properly...
*/
struct seed_provider_type {
seed_provider_type() = default;
seed_provider_type(sstring n,
std::initializer_list<typename string_map::value_type> opts =
{ })
: class_name(std::move(n)), parameters(std::move(opts)) {
}
sstring class_name;
string_map parameters;
};
using seed_provider_type = db::seed_provider_type;
/*
* All values and documentation taken from

View File

@@ -41,6 +41,7 @@
#include "db/serializer.hh"
#include "query_context.hh"
#include "partition_slice_builder.hh"
#include "db/config.hh"
using days = std::chrono::duration<int, std::ratio<24 * 3600>>;

View File

@@ -15,6 +15,7 @@
#include "query-request.hh"
#include "query-result.hh"
#include "rpc/rpc.hh"
#include "db/config.hh"
namespace net {
@@ -85,7 +86,7 @@ future<> deinit_messaging_service() {
});
}
future<> init_messaging_service(sstring listen_address, db::config::seed_provider_type seed_provider) {
future<> init_messaging_service(sstring listen_address, db::seed_provider_type seed_provider) {
const gms::inet_address listen(listen_address);
std::set<gms::inet_address> seeds;
if (seed_provider.parameters.count("seeds") > 0) {

View File

@@ -14,7 +14,6 @@
#include "gms/inet_address.hh"
#include "rpc/rpc_types.hh"
#include <unordered_map>
#include "db/config.hh"
#include "frozen_mutation.hh"
#include "query-request.hh"
#include "db/serializer.hh"
@@ -38,6 +37,10 @@ namespace utils {
class UUID;
}
namespace db {
class seed_provider_type;
}
namespace net {
/* All verb handler identifiers */
@@ -411,5 +414,5 @@ inline messaging_service& get_local_messaging_service() {
return _the_messaging_service.local();
}
future<> init_messaging_service(sstring listen_address, db::config::seed_provider_type seed_provider);
future<> init_messaging_service(sstring listen_address, db::seed_provider_type seed_provider);
} // namespace net

View File

@@ -37,6 +37,7 @@
#include "storage_service.hh"
#include "core/future-util.hh"
#include "db/read_repair_decision.hh"
#include "db/config.hh"
#include <boost/range/algorithm_ext/push_back.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/iterator/counting_iterator.hpp>

View File

@@ -11,6 +11,7 @@
#include "utils/UUID_gen.hh"
#include "message/messaging_service.hh"
#include "service/storage_service.hh"
#include "db/config.hh"
class in_memory_cql_env : public cql_test_env {
public: