Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The guide contains a list APIs that were deprecated or removed in Apache Ignite 2.0 incorporate tremendous changes that make it different from Apache Ignite 1.x releases. Apache Ignite 2.0 and provides alternate APIs which you can use to migrate to from the deprecated or removed ones. 

TcpDiscoveryS3IpFinder
  • TcpDiscoveryS3IpFinder.setAwsCredentials(AWSCredentialsProvider) renamed to TcpDiscoveryS3IpFinder.setAwsCredentialsProvider(AWSCredentialsProvider)

Eviction Policies

  • Existing eviction mechanism based on EvictionPolicy is now supported only in near and onheap caches.
  • To enable eviction in regular cache, choose one of page-based eviction algorithms with MemoryPolicyConfiguration#setPageEvictionMode. More info about page-based eviction can be found in javadocs of MemoryPolicyConfiguration and DataPageEvictionMode.

Cache Memory Modes:

  • All the cache memory modes, previously defined by CacheMemoryMode, are no longer supported. Off-heap mode that is a basis of the new page memory is used by default.
  • CachePeekMode.SWAP is no longer supported as well as SwapSpaceSPI.

Memory Policies

Managing of memory regions where caches store their data is done via MemoryConfiguration and MemoryPolicyConfiguration entities; detailed information is presented in javadocs of these classes. Also MemoryPoliciesExample provides some sample configurations on this topic.

IgniteConfiguration

getGridName/setGridName declared deprecated and getIgniteInstanceName/setIgniteInstanceName should be used instead.

is incompatible with previous versions and, most likely, application code has to be altered if someone plans to migrate to 2.0. Below you will find the main public API changes introduced in version 2.0. 

Off-Heap Memory Architecture

Apache Ignite 2.0 and later versions are based on the new off-heap memory architecture that is well explained in this documentation: https://apacheignite.readme.io/docs/page-memory

Look over the documentation above to learn more about new concepts and configuration parameters. The sections below list APIs existed prior to 2.0 and that was reworked in the latest version.

 

Cache Memory Modes:

  • `CacheMemoryMode` enumeration is no longer exist. Off-heap is used as the main storage tier with an ability to enable Java heap caching via `CacheConfiguration.setOnheapCacheEnabled(...)` API method.
  • `CachePeekMode.SWAP`, as well as 'SwapSpaceSPI', are discontinued. The swapping tier can only be used if a swapping file is set via `MemoryPolicyConfiguratoin.setSwapFilePath(..)`.

Eviction Policies

Previously existed eviction mechanisms based on `EvictionPolicy` is now supported only for optional near and Java heap caching of the data stored in the off-heap page memory. To enable the eviction for the page memory, use `DataPageEvictionMode` enumeration. Refer to this documentation for more details: https://apacheignite.readme.io/docs/evictions

 

 

Cache and Memory Metrics

 Cache and Memory Metrics

The following methods were removed from CacheMetrics `CacheMetrics` interface as part of migrating to new memory management a migration to the off-heap memory architecture: getOverflowSize, getOffHeapMaxSize, getSwapGets, getSwapPuts, getSwapRemovals, getSwapHits, getSwapMisses, getSwapEntriesCount, getSwapSize, getSwapHitPercentage, getSwapMissPercentage.

 

To support the new memory architecture, `MemoryMetrics` New MemoryMetrics interface was introduced to monitor off-heap memory consumption and usage. More information about its usage is available in javadoc on this class.in order to get insights on a state and behavior of the memory in runtime. Refer to this documentation if you plan to leverage from this interface: https://apacheignite.readme.io/docs/memory-metrics

 

Default Cache Name

`null` can no longer be used as a cache name. If a cache is started with an empty named then it will be named `default` and you can get it using either `Ignite.cache(null)` or `Ignite.cache("default")` calls.

Ignite Node Configuration

  • IgniteConfiguration's `getGridName/setGridName` methods are deprecated and will be removed in later releases. Use IgniteConfiguration's `getIgniteInstanceName/setIgniteInstanceName` instead.

  • Service Grid calls are processed in a separated Service Grid thread pool which size can be tweaked over `IgniteConfiguration.setServiceThreadPoolSize(...)` method. Before that, the public thread pool served that purpose.
  • Apache Ignite data streamer's calls are going to and processed by a dedicated data streamer's thread pool which size can be tweaked over `IgniteConfiguration.setDataStreamerThreadPoolSize(...)` method. Before that, the public thread pool served that purpose.
  • SQL queries are now processed and executed using Threads from Queries thread pool size that is configurable via `IgniteConfiguration.setQueryThreadPoolSize(...)` method. Before that, the system thread pool was used for that purpose.

Networking

  • Confusing `TcpDiscoverySPI.getHeartbeatFrequency` parameter is no longer supported. The parameter used to define a frequency of cluster and cache metrics that are sent by cluster nodes from one to another. Now the frequency can be adjusted with `IgniteConfiguration.setMetricsUpdateFrequency(...)` method.
  • `TcpDiscoveryS3IpFinder.setAwsCredentials(AWSCredentialsProvider)` renamed to `TcpDiscoveryS3IpFinder.setAwsCredentialsProvider(AWSCredentialsProvider)`.
  • Apache Ignite client nodes' failure detection timeout is now set with `IgniteConfiguration.setClientFailureDetectionTimeout(...)` and equal to 30 seconds be default. `IgniteConfiguration.getFailureDetectionTimeout()`, that is equal to 7 seconds, was used as the timeout for both server and client nodes in prior versions.

 

Redis Integration

Default Redis cache name was changed from 'null' to 'redis_cache'.

...