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

Compare with Current View Page History

« Previous Version 55 Next »

Overview

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. 

Page Memory Architecture

Apache Ignite 2.0 is based on the new page memory architecture. Data is always stored offheap, with ability to optionally cache small portion in Java heap. Please refer to documentation to learn more about new concepts and configuration parameters [1]. 

Configuration

IgniteConfiguration

  • gridName - deprecated, use igniteInstanceName

  • failureDetectionTimeout - now this property affects only server nodes, use IgniteConfiguration.clientFailureDetectionTimeout for client nodes
  • 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.

CollectionConfiguration

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

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

TcpDiscoverySpi

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

  • maxMissedHeartbeats
  • maxMissedClientHeartbeats
  • heartbeatFrequency

TcpCommunicationSpi

Several deprecated properties have been removed:

  • connectionBufferSize
  • connectionBufferFlushFrequency
  • minimumBufferedMessageCount

TcpDiscoveryS3IpFinder

  • awsCredentials - renamed to awsCredentialsProvider

General API

Asynchronous programming

IgniteAsyncSupport interface is now deprecated and will be removed in future Apache Ignite releases. Use methods with Async suffix instead. See documentation [4] for more information.

Old style:

IgniteCache<K, V> asyncCache = cache.withAsync();
 
asyncCache.getAsync(key);
 
IgniteFuture<V> future = asyncCache.future();

New style:

IgniteFuture<V> future = сache.getAsync(key);

IgniteCluster 

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

IgniteFuture 

Several methods were removed with no replacement: 

  • startTime
  • duration

OptimizedMarshaller

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

BinaryIdentityResolver

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

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

SwapSpaceSpi

SPI has been removed due to new Ignite page memory architecture [1]. The swapping tier can only be used if a swapping file is set via MemoryPolicyConfiguration.swapFilePath property.

Cache API

IgniteCache

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

CacheEntry

updateTime method was removed

CacheMetrics

The following methods were removed as part of a migration to page memory architecture [1]. New MemoryMetrics interface has been introduced in order to monitor memory usage in runtime [3].

  • getOverflowSize

  • getOffHeapMaxSize

  • getSwapGets

  • getSwapPuts

  • getSwapRemovals

  • getSwapHits

  • getSwapMisses

  • getSwapEntriesCount

  • getSwapSize

  • getSwapHitPercentage

  • getSwapMissPercentage

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.

CacheAtomicWriteOrderMode

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

CachePeekMode

SWAP value has been removed due to new Ignite page memory architecture [1]. The swapping tier can only be used if a swapping file is set via MemoryPolicyConfiguration.swapFilePath property.

FairAffinityFunction

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

RandomEvictionPolicy

Implementation has been removed with no replacement.

AffinityNodeHashResolver

Interface has been removed. Use IgniteConfiguration.consistentId property.

@AffinityKeyMapped annotation

No longer allowed on methods.

SQL API

CacheTypeMetadata and CacheTypeFieldMetadata

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

@QuerySqlField and @QueryTextField annotations

No longer allowed on methods.

_key and _val columns in SqlFieldsQuery

Before Apache Ignite 2.0 SqlFieldsQuery in the form  "SELECT * FROM ..." returned special _key and _val columns representing actual cache entry key and value respectively. These columns are not returned anymore unless specified explicitly.

Miscellaneous

Thread pools

Ignite process different types of requests in special thread pools to provide clear separation of concerns and avoid starvation. Several new thread pools were added in Apache Ignite 2.0:

  • Service Grid calls are now processed in dedicated thread pool (see IgniteConfiguration.serviceThreadPoolSize property)

  • Data Streamer calls are now processed in dedicated thread pool (see IgniteConfiguration.dataStreamerThreadPoolSize property)
  • SQL, Scan and SPI queries are now processed in dedicated thread pool (see IgniteConfiguration.queryThreadPoolSize property)

Integrations

Spring Framework

Spring Framework dependency has been upgraded to 4.3.7.RELEASE version.

Hibernate

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 distribution. See documentation for more details [6]

Redis

Default Redis cache name was changed from null to  default. See documentation for more details [5]

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

Binary Name Mapping

Ignite.NET 1.9 and earlier uses simple name mapping only, which means obj.GetType().Name is used to map type name to type id.

Ignite.NET 2.0 uses full name mapping by default, which includes namespace, generics and array dimensions.

This change affects multi-platform Ignite applications where Java and .NET types are mapped to each other. More details: https://apacheignite-net.readme.io/docs/platform-interoperability

 

Schema import utility - ?

Cache plugins - ?

 

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

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

[3] https://apacheignite.readme.io/docs/memory-metrics

[4] https://apacheignite.readme.io/docs/async-support

[5] https://apacheignite.readme.io/docs/redis

[6] https://apacheignite-mix.readme.io/docs/hibernate-l2-cache

  • No labels