You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »

Apache Ignite 2.0 incorporate tremendous changes that make it different from Apache Ignite 1.x releases. Apache Ignite 2.0 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 documentation [1].

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:
  • `CachePeekMode.SWAP`, as well as 'SwapSpaceSPI', are discontinued. The swapping tier can only be used if a swapping file is set via `MemoryPolicyConfiguratoin.setSwapFilePath(..)`.


Cache and Memory Metrics

The following methods were removed from `CacheMetrics` interface as part of 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` interface was introduced 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

Ignite Node Configuration

  • 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, Scan and SPI 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

  • `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.

 

Asynchronous Programming

`IgniteAsyncSupport` and all the methods that relied on it were deprecated and to be removed in the future Apache Ignite releases. Use direct async counterparts for a variety of synchronous methods instead. Refer to this documentation to learn more about the changed approach for the asynchronous programming: https://apacheignite.readme.io/docs/async-support


Ignite.NET

  • CompiledQuery class removed, CompiledQuery2 class renamed to CompiledQuery. If you have used CompiledQuery class, there is nothing to change. Existing code should compile. If you have used CompiledQuery2 class, rename it to CompiledQuery.

  • CacheEvent.LockId has been removed. It was always null previously.

  • BinaryConfiguration properties renamed: DefaultNameMapper -> NameMapper, DefaultIdMapper -> IdMapper, DefaultKeepDeserialized -> KeepDeserialized

  • ILifecycleBean renamed to ILifecycleHandler, IgniteConfiguration.LifecycleBeans -> IgniteConfiguration.LifecycleHandlers
Dynamic Type Registration, Serializable Types

BinaryConfiguration is no longer required - any type can be used in Cache and Compute right away. All objects are written in Ignite binary format (which means IBinary and SQL APIs always work).

Serializable types (including those which implement ISerializable) are also written using Ignite binary format. Learn more from this documentation: https://apacheignite-net.readme.io/docs/serialization

 

Redis Integration

Default Redis cache name was changed from 'null' to 'redis_cache'. Refer to this documentation for more details: https://apacheignite.readme.io/docs/redis

Hibernate Integration

Apache Ignite 2.0 integrates with Hibernate 5.0. The previous integration with a legacy Hibernate version of 4.2 can be used by importing `ignite-hibernate_4.2` Maven artifact or taking a respective JAR file from Apache Ignite 2.0 or later distribution.

Refer to this documentation for more details: https://apacheignite-mix.readme.io/docs/hibernate-l2-cache

Spring Framework

Spring Framework used by several Apache Ignite components has been upgraded to version 4.3.7.RELEASE.

-------------------------------------------------

IgniteCluster 

  • mapKeysToNodes - removed, use Affinity.mapKeysToNodes
  • mapKeyToNode - removed, use Affinity.mapKeyToNode

OptimizedMarshaller

Implementation has been removed from public API and is not expected to be used directly anymore. 

IgniteFuture

Several methods were removed with no replacement:

  • startTime
  • duration

CollectionConfiguration

  • memoryMode property has been removed due to new Ignite page memory architecture [1]

EventType

Several event types have been removed due to new Ignite page memory architecture:

  • EVT_CACHE_OBJECT_SWAPPED
  • EVT_CACHE_OBJECT_UNSWAPPED
  • EVT_SWAP_SPACE_DATA_READ
  • EVT_SWAP_SPACE_DATA_STORED
  • EVT_SWAP_SPACE_DATA_REMOVED
  • EVT_SWAP_SPACE_CLEARED
  • EVT_SWAP_SPACE_DATA_EVICTED
  • EVT_CACHE_OBJECT_TO_OFFHEAP
  • EVT_CACHE_OBJECT_FROM_OFFHEAP

CacheTypeMetadata and CacheTypeFieldMetadata

Classes have been removed. Use QueryEntity class and CacheConfiguration.queryEntities property.

CacheAtomicWriteOrderMode

Enumeration has been removed because CLOCK mode is no longer supported for ATOMIC cache.

CacheMemoryMode

Enumeration has been removed due to new Ignite page memory architecture [1]. Offheap is used as the main storage tier with an ability to enable Java heap caching via CacheConfiguration.onheapCacheEnabled property.

FileSystemConfiguration

  • name - null name is no longer allowed
  • metaCacheName - removed, use metaCacheConfiguration
  • dataCacheName - removed, use dataCacheConfiguration
  • streamBufferSize - renamed to bufferSize
  • maxSpace - removed, maximum memory is now controlled through MemoryPolicy [1]
  • initializeDefaultPathModes - removed
  • trashPurgeTimeout - removed
  • fragmentizerLocWritesRatio - removed 
  • dualModePutExecutorService - removed
  • dualModePutExecutorServiceShutdown - removed
  • dualModeMaxPendingPutsSize - removed

@QuerySqlField and @QueryTextField annotations

No longer allowed on methods.

@AffinityKeyMapped annotation

No longer allowed on methods.

BinaryIdentityResolved

Interface has been removed. Now key hash code and equality is calculated based on content of serialized object. 

FairAffinityFunction

Implementation has been removed due to well-known problems with co-location between caches on different versions of cluster topology. Use RendezvousAffinityFunction.

AffinityNodeHashResolved

Interface has been removed. Use IgniteConfiguration.consistentId property.

IgniteCache

  • randomEntry - removed
  • localPromote - removed due to new Ignite page memory architecture [1]

SwapSpaceSpi

SPI has been removed due to new Ignite page memory architecture [1].

RandomEvictionPolicy

Implementation has been removed with no replacement.

TcpCommunicationSpi

Several deprecated methods have been removed:

  • connectionBufferSize
  • connectionBufferFlushFrequency
  • minimumBufferedMessageCount

TcpDiscoverySpi

Heartbeat-related properties have been removed. Now heartbeat frequency is controlled through IgniteConfiguration.metricsUpdateFrequency property.

  • maxMissedHeartbeats
  • maxMissedClientHeartbeats
  • heartbeatFrequency

IgniteConfiguration

  • gridName - deprecated, use igniteInstanceName

  • marshallerCacheThreadPoolSize - removed due to changes in marshaller metadata handling

  • marshallerCacheKeepAliveTime - removed due to changes in marshaller metadata handling

  • clockSyncSamples - removed because CLOCK mode is no longer supported for ATOMIC cache

  • clockSyncFrequency - removed because CLOCK mode is no longer supported for ATOMIC cache

  • swapSpaceSpi - removed due to new Ignite page memory architecture [1] 

CacheConfiguration

The following properties have been changed/removed:

  • atomicWriteOrderMode - removed because CLOCK mode is no longer supported for ATOMIC cache

  • name - null name is not allowed any more

  • typeMetadata - removed, use queryEntities property

The following properties have been removed due to new Ignite page memory architecture [1]:

  • evictSynchronized

  • evictSynchronizedKeyBufferSize

  • evictSynchronizedConcurrencyLevel

  • evictSynchronizedTimeout

  • evictMaxOverflowRatio

  • memoryMode
  • offHeapMaxMemory

  • snapshotableIndex

  • sqlOnheapRowCacheSize

  • startSize
  • swapEnabled

Previously existed eviction mechanisms based on EvictionPolicy is now supported only for optional near and Java heap caching of the data stored in the offheap page memory. To enable the eviction for the page memory, use DataPageEvictionMode enumeration. See documentation [2] for more details.

 

Schema import utility - ?

Cache plugins - ?

 

[1] https://apacheignite.readme.io/docs/page-memory

[2] https://apacheignite.readme.io/docs/evictions

 

 

 

 


  • No labels