Support snitch registration on long and short format
Snitches can be inialized based on short and long name format. In case a short name is provided the "org.apache.cassandra.locator." is contacenated to it. Out solution is simpler with double regitration. Default cassandra.yaml includes "endpoint_snitch: SimpleSnitch" Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
This commit is contained in:
@@ -284,6 +284,7 @@ namespace locator {
|
||||
using registry = class_registrator<i_endpoint_snitch,
|
||||
gossiping_property_file_snitch,
|
||||
const sstring&>;
|
||||
static registry registrator("org.apache.cassandra.locator.GossipingPropertyFileSnitch");
|
||||
static registry registrator1("org.apache.cassandra.locator.GossipingPropertyFileSnitch");
|
||||
static registry registrator2("GossipingPropertyFileSnitch");
|
||||
}
|
||||
} // namespace locator
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
namespace locator {
|
||||
using registry = class_registrator<i_endpoint_snitch, rack_inferring_snitch>;
|
||||
static registry registrator("org.apache.cassandra.locator.RackInferringSnitch");
|
||||
static registry registrator1("org.apache.cassandra.locator.RackInferringSnitch");
|
||||
static registry registrator2("RackInferringSnitch");
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
|
||||
namespace locator {
|
||||
using registry = class_registrator<i_endpoint_snitch, simple_snitch>;
|
||||
static registry registrator("org.apache.cassandra.locator.SimpleSnitch");
|
||||
static registry registrator1("org.apache.cassandra.locator.SimpleSnitch");
|
||||
static registry registrator2("SimpleSnitch");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user