I want to config "Ignite Persistence" and "Ignite Connecting To Server" in Apache Ignite.
I use ignite as docker image and asp.net core application.
if i use ignite with config.xml, it don't let to use ignite client to linq query and i must use sql query that is not what i want.
if i use ignite with C#/.Net configuration, then it don't let to use many configuration in ignite instance creating or maybe i don't know how do this.
for example:
this is configuration for "Ignite Persistence":
var cfg = new IgniteConfiguration
{
DataStorageConfiguration = new DataStorageConfiguration
{
StoragePath = "/ssd/storage",
DefaultDataRegionConfiguration = new DataRegionConfiguration
{
Name = "Default_Region",
PersistenceEnabled = true
}
}
};
var ignite = Ignition.Start(cfg);
and this is for connecting to ignite server:
var cfg = new IgniteClientConfiguration
{
Endpoints = new[] { "172.**.**.**:10800" },
SocketTimeout = TimeSpan.FromSeconds(60)
};
var cfg = Ignition.StartClient(conf);
as you can see, every Ignition.Start()
or 'Ignition.StartClinet()
' gets different input types ("IgniteConfiguration" and "IgniteClientConfiguration") for instace creating of ignite
variable and my question is how to join this multi configuration as one input to pass them to Ignition.Start()
Method?
this configs are possible to set in config.xml.
i need to set both of two configs(asp.net core ignite configuration and config.xml) for this instance while it doesn't let. my question is how to do this or how to use configuration from config.xml and C#/.Net as same time?
IgniteConfiguration.SpringConfigUrl
var cfg = new IgniteConfiguration
{
// XML is always loaded first, then .NET config is applied on top.
SpringConfigUrl = "/foo/bar/ignite-config.xml",
DataStorageConfiguration = new DataStorageConfiguration
{
StoragePath = "/ssd/storage",
DefaultDataRegionConfiguration = new DataRegionConfiguration
{
Name = "Default_Region",
PersistenceEnabled = true
}
}
};
var ignite = Ignition.Start(cfg);
See https://ignite.apache.org/docs/latest/net-specific/net-configuration-options#configure-with-spring-xml for more details.
IgniteConfiguration
is for server nodes and thick clients (full-blown Ignite nodes that enter the cluster). IgniteClientConfiguration
is for thin clients (lightweight connector). That's why configuration classes are very different. It does not make sense to "join" them in any way.