ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Goncharuk <alexey.goncha...@gmail.com>
Subject Re: Persistence per memory policy configuration
Date Wed, 20 Sep 2017 11:46:38 GMT
Reiterating this based on some feedback from PDS users.

It might be confusing to configure persistence with "MemoryPolicy", so
another approach is to deprecate the old names and introduce a new name
"DataRegion" because it reflects the actual state when data is stored on
disk and partially in memory. I have two options in mind, each of them
looks acceptable to me, so I would like to have some feedback from the
community. Old configuration names will be deprecated (but still be taken
if used for backward compatibility). Note, that old names deprecation
handles default configuration compatibility very nicely - current PDS users
will not need to change anything to keep everything working. The two
options I mentioned are below:

 * we have two separate classes for in-memory and persisted data regions,
so the configuration would look like so:

IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setDataRegionsConfiguration(new DataRegionsConfiguration()
    .setDataRegions(
        new MemoryDataRegion()
            .setName("volatileCaches")
            .setMaxMemorySize(...),
        new PersistentDataRegion()
            .setName("persistentCaches")
            .setMaxMemorySize(...)
            .setMaxDiskSize()));

cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());


* we have one class for data region configuration, but it will have a
sub-bean for persistence configuration:

IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setDataRegionsConfiguration(new DataRegionsConfiguration()
    .setDataRegions(
        new DataRegion()
            .setName("volatileCaches")
            .setMaxMemorySize(...),
        new DataRegion()
            .setName("persistentCaches")
            .setMaxMemorySize(...),
            .setPersistenceConfiguration(
                new DataRegionPersistenceConfiguration()
                    .setMaxDiskSize(...))));

cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message