v5.0
This document lists the new features, enhancements, fixed issues and, removed
or deprecated features for Hazelcast 5.0 release. The numbers in the square
brackets refer to the issues in Hazelcast's GitHub repository.
Hazelcast 5.0 is a major release which unifies
the former Hazelcast IMDG and Jet products in a
single solution. The changes are summarized below.
For information about upgrading from previous IMDG and Jet
releases, see the Upgrade chapter in https://docs.hazelcast.com/hazelcast/5.0/.
To learn about the changes in previous IMDG and Jet releases, see https://docs.hazelcast.org/docs/rn/ and
https://jet-start.sh/blog/.
New Features
-
Jet Streaming Engine: Hazelcast now incorporates the streaming engine, which was formerly and separately known as Hazelcast Jet.
-
SQL Engine: We have added the support of following operators to our SQL engine:
** INSERT
** UPDATE
** DELETE
** ORDER BY
** GROUP BY
** JOIN
** CASE
See https://docs.hazelcast.com/hazelcast/5.0/sql/sql-overview.html.
Related issue and PRs: [hazelcast#18940], [hazelcast#18910], [hazelcast#18898], [hazelcast#18734],
[hazelcast#18663], [hazelcast#18569], [hazelcast#18479], [hazelcast#18483], [hazelcast#18422], [hazelcast#18067] -
Persistence: This allows individual members and whole clusters to recover
faster by persisting map entries and JCache data on disk. Members can use persisted data to recover during restarts.
See https://docs.hazelcast.com/hazelcast/5.0/storage/persistence.html. -
Compact Serialization Format (Preview Feature): We have introduced a new serialization format
(CompactSerializer
), which is in its beta stage currently. This format requires much
less storage space, provides better latency and throughput, and supports more extensive type sets:
** It supports schema evolution of a class and does not require any version to be specified explicitly.
** On common use cases where the field types of an object are natively supported via this compact format,
Java DTO classes are automatically serialized without requiring a serializer (CompactSerializer
) to be implemented.
** Your classes do not need to implement an interface likePortable
. Once you enable the compact serialization,
the classes not matching to any other serialization methods are serialized in this new format.See the https://docs.hazelcast.com/hazelcast/5.0/serialization/compact-serialization.html.
Related PR: [hazelcast#19017] -
Security for Jet Engine Jobs: The Jet engine allows you to upload custom code as well as access data
outside of Hazelcast such as files on the device that's running a member. You can secure your Hazelcast member
against malicious uses of the Jet API. See https://docs.hazelcast.com/hazelcast/5.0/pipelines/job-security.html.
Breaking Changes
API Changes
-
For Google Cloud Storage (GCS) file sources, the
SecuredFunction
interface now returns a list of permissions instead of a single
permission. Previously, Hazelcast was returning only the permission for the bucket to be read, and this was causing a source to be
possibly exploited for gaining information whether some file exists in the system. Now, Hazelcast also returns a permission
for the keyfile that is required to read a bucket on GCS. [hazelcast#19407] -
The "Hot Restart Persistence" feature name has been changed to "Persistence"; with this change
we've performed various cleanups in its API:
** TheHotRestartService
has been deprecated; see <<removed-deprecated-features, Deprecated Features>>.
** Renamedcom.hazelcast.hotrestart.BackupTask
ascom.hazelcast.persistence.BackupTask
.
** Renamedcom.hazelcast.hotrestart.BackupTaskState
ascom.hazelcast.persistence.BackupTaskState
.
** Added theisBackupEnabled()
toPersistenceService
/HotRestartService
that does
not have a default implementation.
[hazelcast#19404] -
After the unification of cloud discovery plugins (see the Cloud Discovery Plugins section below),
the exception class for the failure in generatingSSLSocketFactory
is changed from
KubernetesClientException
toRestClientException
for the Kubernetes plugin. [hazelcast#19132] -
Changed the type of
YEAR
field in the SQL client protocol fromshort
toint
. [hazelcast#18984] -
Since the
HOST
andRACK
metadata were deprecated in the previous Hazelcast
release, these information are removed from theZONE_AWARE
partition grouping
configuration. [hazelcast#18780] -
Since DAG printing was not reflecting the real queue size, the
DAG.toDotString(int defaultParallelism)
method
signature is changed asDAG.toDotString(int defaultLocalParallelism, int defaultQueueSize)
. You, now, need to supply the
queue size that will be shown if it is not overriden on the edge. [hazelcast#18475]
Configuration Changes
- Removed the following properties that were used in the former Jet product, since it
is now part of Hazelcast 5.0:
**jet.home
**jet.imdg.version.mismatch.check.disabled
[hazelcast#18999]
Enhancements
Distribution
- Hazelcast distribution is now available in two versions: full and slim.
While the full one includes Hazelcast and all of its modules along with SQL,
Jet engine extensions and Management Center, the slim one only includes the Hazelcast
runtime, default configurations and scripts.
See https://docs.hazelcast.com/hazelcast/5.0/migrate/upgrading-from-imdg-4.html#changes-in-distribution-packaging
for details. [hazelcast#18990], [hazelcast#18989] - Consolidated the scripts delivered with the former IMDG and Jet distributions.
See https://docs.hazelcast.com/hazelcast/5.0/migrate/upgrading-from-imdg-4.html#changes-in-distribution-packaging. [hazelcast#18999] - The former
hazelcast-sql
,hazelcast-sql-core
andhazelcast-jet-sql
Maven modules in the distributions
have been merged into a singlehazelcast-sql
module as a part of the Hazelcast 5.0 distribution. [hazelcast#18584] - Removed the
jackson-core
dependency frompom.xml
since it was
breaking the extensions that depend onjackson
. [hazelcast#18665] - Moved the former Hazelcast Jet code samples into the
https://github.com/hazelcast/hazelcast-code-samples repository. [hazelcast#475]
The Jet and SQL Engine
- Added support of rolling upgrades for SQL. [hazelcast#19026]
- Added support of reading data from High-Density Memory Store backed maps via the SQL engine. [hazelcast#19328]
- Added support of regular and index (migration tolerant) scan of High-Density Memory Store via SQL. [hazelcast#19227]
- Tables were called
mapping
ininformation_schema.mappings
andtable
ininformation_schema.columns
.
This inconsistency has been fixed by renamingmapping
astable
. [hazelcast#19210] - Added support of the
CONCAT_WS
function, which takes variable sized
VARCHAR
(minimum 3) and returns aVARCHAR
that consists of the
concatenation of the arguments except the first one using the first argument as a separator. [hazelcast#19094] - The 'SELECT' statement now also supports queries without the
FROM
clause
so that you can submit queries likeSELECT rand()
without this clause. [hazelcast#19030] - The Jet engine jobs submitted in a Hazelcast cluster are now cancelled
when you upgrade your Hazelcast version since the Jet engine doesn't provide backwards compatibility. [hazelcast#19012] - Implemented the partition-tolerant index scan processor for Hazelcast maps:
during a partition migration, this processor searches all the migrated partitions on all
available cluster members. [hazelcast#18968] - Added support of the
putIfAbsentAsync()
method for maps on the member side;
which is required for the usage ofINSERT INTO
statements in SQL queries. [hazelcast#18946] - Added support of returning nested fields without having to
deserialize them, which enables you to usePortable
in client/server
deployments without touching the server side; for example, SQL queries
can now return columns without having the class on the server-side classpath. [hazelcast#18922] - Standardized the
TIME
andTIMESTAMP
temporal formats for the
SQL engine: You can now useTIME
without leading zeroes andTIMESTAMP
with space instead of theT
symbol. Also added support of leading non-zero
characters for theDATE
formats. [hazelcast#18881], [hazelcast#18842] - Added support of
OFFSET
for SQL queries. [hazelcast#18866] - Implemented
IdentifiedDataSerializable
for SQL schema objects. [hazelcast#18851] - Changed the
since
tags in Jet engine API and its extension modules
from@since x.y
to@since Jet x.y
. [hazelcast#18832] - Implemented the
OnHeapMapScanP
class to read the Hazelcast maps directly
by the SQL engine. [hazelcast#18685] - Implemented a basic memory management for the SQL engine
so that number of records accumulated by it can be limited
to avoid out of memory failures. You can use themax-processor-accumulated-records
configuration element for this purpose. [hazelcast#18671] - Added support of dynamic parameters for the SQL engine and file table functions. [hazelcast#18613], [hazelcast#18522]
- Introduced
QueryDataType.MAP
andQueryDataTypeFamily.MAP
to support map operand checks
for file table functions. [hazelcast#18602] - Added support of
EXTRACT(field FROM source)
for the SQL engine.
The function computes date parts from the source field. The supported types forsource
argument are as follow:
** Date
** Time
** Timestamp
** Timestamp With Time Zone
[hazelcast#18570] - Added support of the
LIMIT <n>
andORDER BY
clauses for the streaming engine. [hazelcast#18479] - Implemented the following functions for the SQL engine:
**REPLACE
**ATAN2
**POWER
**SQUARE
**SQRT
**CBRT
**POSITION
**COALESCE
**NULLIF
**TO_EPOCH_MILLIS
**TO_TIMESTAMP_TZ
[hazelcast#18900], [hazelcast#18856], [hazelcast#18510], [hazelcast#18487], [hazelcast#18450], [hazelcast#18424], [hazelcast#18405] - Added support of plan caching for Jet engine based queries. [hazelcast#18446]
- Added support of plus and minus operations for interval types (date, time, etc.) for
the SQL engine. [hazelcast#18390] - Added support of various new
Portable
types for the SQL engine. [hazelcast#18115] - Added support of
IN
andBETWEEN
operators for the SQL queries. [hazelcast#18483], [hazelcast#18422], [hazelcast#18067]
Data Structures
- The previous Replicated Map implementation was iterating all the values
while calculating the size of map; this was causing latencies and performance issues
as the entries in a Replicated Map grows. The relatedsize()
method
has been refactored to eliminate the aforementioned situation. [hazelcast#19005]
Cloud Discovery Plugins
- In Kubernetes, Hazelcast resolves its public addresses by finding an individual service
that points to the given Hazelcast pod. If there are multiple services pointing to one pod,
then the discovery could not work or might have chosen the wrong service. The following changes
have been made to address this:
** Added label-based filtering for the Kubernetes Service per pod.
** Added matching service and pod by name (if there are multiple services per pod is configured,
the priority takes a service with the same name as the pod, before it was a random service.
** Added resolving load balancer service if "hostname" is defined.
[hazelcast#19168] - The code of the AWS, Azure, Kubernetes and GCP discovery
plugins' in their own Github repos have been moved into thehazelcast/hazelcast
repo. Their documentation also has been merged and unified into https://docs.hazelcast.com/hazelcast/5.0/deploy/deploying-in-cloud.html. [hazelcast#19132] - Added Kubernetes plugin's configuration file for role based access control
into thehazelcast/hazelcast
Github repository askubernetes-rbac.yaml
. [hazelcast#19093]
Serialization
- Added support of default serializers for the following classes
which has been necessary for non-Java clients to use these:
**LocalDate
**LocalTime
**LocalDateTime
**OffsetDatetime
[hazelcast#18983]
Security
- Added an example Hazelcast configuration file (
hazelcast-security-hardened.yaml
) focused
on hardened security to the distribution packages; it lists configuration options with their
descriptions which may help securing your Hazelcast deployment. [hazelcast#18843] - Introduced the simple authentication configuration; it allows to have users and
their assigned roles stored together with other Hazelcast configurations. [hazelcast#18948]
See the YAML example:
hazelcast:
security:
enabled: true
realms:
- name: simpleRealm
authentication:
simple:
users:
- username: test
password: 'a1234'
roles:
- monitor
- hazelcast
- username: root
password: 'secret'
roles:
- admin
Configuration
- Unless you explicitly disable them, the Merkle Trees are now enabled automatically
when your cluster has a map or cache whose persistence is enabled; this is to improve
a single member recovery from a crash, and it does not have a high memory overhead. [hazelcast#19502] - Added the
expose-externally
configuration parameter for objects that expose an external IP address
In. Kubernetes. See https://docs.hazelcast.com/hazelcast/5.0/deploy/configuring-kubernetes.html
for its description. - The properties provided in former
JetProperties
are now merged intoClusterProperty
.
Also added thehazelcast
prefix to the former Jet property names, e.g.,jet.job.scan.period
has become
hazelcast.jet.job.scan.period
and the former one is deprecated. [hazelcast#19146] - Added a configuration option to enable/disable resource uploading for
Jet engine jobs. See https://docs.hazelcast.com/hazelcast/5.0/configuration/jet-configuration.html#enabling-resource-uploads for details. - Even when the factory configuration is missing on the member but
the map is configured to have the the in-memory format asOBJECT
, Hazelcast now can store
portables asPortableGenericRecord
and still query them
without needing to convert them to Object/Data. [hazelcast#18891] - Introduced the following properties:
**hazelcast.partition.rebalance.mode
: It determines whether cluster
membership change triggers partition rebalancing automatically (auto
) or
explicit action is required for rebalancing to occur (manual
). Its default isauto
.
**hazelcast.partition.rebalance.delay.seconds
: it specifies the time in seconds
to wait before triggering automatic partition
rebalancing after a member leaves the cluster unexpectedly. Unexpectedly in this
context means that a member leaves the cluster by programmatic termination, a
process crash or network partition. Its default is 0, which means rebalancing is
triggered immediately.
[hazelcast#18425]
Other Enhancements
- Introduced a warning when the users create a job JAR to submit via
hz-cli
and Hazelcast detectshazelcast
orhazelcast-enterprise
is packaged in it. [hazelcast#19512] - Added
queueFillPercent
metric to show how full the WAN replication queue is, in percentage. [hazelcast#19431] - The README of
hazelcast/hazelcast
GitHub repository has been completely
rewritten to reflect the unification of former Hazelcast IMDG and Jet products. [hazelcast#19061] - The
hazelcast-sql
module is now covered by the Hazelcast Community License; before,
it was Apache License, Version 2. [hazelcast#18957] - Added the merkle tree support for caches to speed up the migration process during a cluster rebalancing. [hazelcast#18898]
- Added the client console entry point to the Hazelcast command line
interface; you can now use thehazelcast console
command to start
the client console application. [hazelcast#18857] - Enhanced the
getPartitionGroupStrategy()
method to have cluster members
as arguments so that useful partitioning strategies can be implemented by accessing
the members using this method. [hazelcast#18794] - The log message for infinite cluster connection timeout is clearer now.
Previously, it was represented as the value ofLong.MAX_VALUE
. [hazelcast#18642] - Introduced a new mechanism in the background expiration tasks;
now a thread local array controls the allocations for these tasks otherwise
which may cause increased garbage collection pressure and CPU usage spikes when
you use aggressive expiration configurations, e.g., low time-to-live values. 18633[hazelcast#18633] - The license key is, now, not shown while starting a member on Docker with overriding configurations. [hazelcast#18568]
- Limited the number of parallel partition reads (to a fixed value of five)
for maps and caches to prevent out of memory failures. [hazelcast#18499] - Added a comprehensive documentation for metrics produced by Hazelcast.
See https://docs.hazelcast.com/hazelcast/5.0/list-of-metrics.html
for the full list of metrics with their descriptions. [hazelcast#17880] - Improved the speed of connection by a member when it joins the cluster, by
removing the unnecessarysleep
statements in the code. [hazelcast#17428]
Fixes
-
Fixed a possible serialization error while submitting a Jet engine job when the member and client sides
have different Hazelcast versions with compatible APIs. [hazelcast#19534] -
Fixed an issue where running the
map.clear
/cache.clear
methods was evicting
all entries in all Near Caches of all maps, not only in the requested map/cache. [hazelcast#19523] -
Fixed an issue where the wildcard configuration mechanism was not working
correctly if a matching pattern has the same prefix and suffix. [hazelcast#19357] -
If the connector permission for file includes wildcard (*) then any file in the system could be
read by using..
in the path in connector. See the below example:Then one can read a file like
readFrom(FileSources.files("/home/user/workspace/../some_secure_file")
.
This has been fixed by converting the file path to canonical path for file permissions. -
If two clusters with different cluster names run locally and both of them has enabled security,
then a Hazelcast client was ignoring the configured cluster names and connecting to any of them;
a check has been put to eliminate this issue. [hazelcast#19344] -
Fixed an issue where a high amount of garbage collection pressure was occurring
during repartitioning especially when having a high partition count. [hazelcast#19312] -
Fixed an issue where the MultiMap operation statistics were not being
updated after these operations are called from client. [hazelcast#19296] -
Fixed an issue where the
hz-cli submit
script was not working properly with
relative path: if the script is called from a different directory (like./bin/hz-cli
), thebin
directory was
taken as root for the relative path instead of the directory from where the script is called. [hazelcast#19204] -
Fixed an issue where
ElasticSearch
did not have a client method that allows
HTTPS connections; added a new client with HTTP and HTTPS schemes. [hazelcast#19139] -
SQL expressions now does not fail when used with trailing semicolons. [18976]
-
Fixed an issue where the health monitor was incorrectly showing the value for
free metadata memory. [hazelcast#18951] -
Some merge policies like
LatestUpdateMergePolicy
for the map and WAN replication
configurations require the per-entry statistics to be enabled. Previously, this
configuration inconsistency was causing the related member to fail at runtime.
Now, the Hazelcast member fails to start, i.e., fast fails, in such a case. [hazelcast#18928] -
Fixed an issue where the maximum size policy for a map was being ignored
when the policy isPER_NODE
and the cluster is scaled down (due to losing or killing a member). [hazelcast#18927] -
The LRU eviction policy now takes last access time value into account to
prevent premature removal of the lately added but not yet accessed map entries.[hazelcast#18909] -
Fixed an issue where the map���s Near Cache was setting its maximum
size as 10.000 even if the configured eviction policy isNONE
. [hazelcast#18835] -
Fixed a regression issue where a job using map reader/writer could not be completed
when the target map has a configured Near Cache. [hazelcast#18696] -
Fixed an issue where the updates made to a persistent map store might be lost when the
write coalescing is enabled. [hazelcast#18686] -
Fixed a reconnection flood when members are separated by a proxy: When a member is disconnected
from the cluster, the alive cluster members still try to reconnect to it if the dying member
connection is not closed explicitly. In the cases where the connection is explicitly closed with a cause
(such asConnection reset by peer
orRemote socket closed!
), a new connection was being established
if the member is placed behind a proxy. This scenario was end causing opening and closing connections continuously.
This issue has been fixed. [hazelcast#18673] -
Fixed an issue where the multicast discovery was not working between the members
when the loopback mode is enabled. [hazelcast#18669] -
The
HazelcastInstance.shutdown()
method now gracefully terminate Jet engine jobs, too.
After the merge of IMDG and Jet, it was failing. [hazelcast#18625] -
Replicated Map does not fail to publish events anymore, from an entry listener with a predicate
which has an attribute path. [hazelcast#18623] -
Fixed a possible performance regression by not starting the cooperative threads
until a job is submitted; otherwise the Jet engine was consuming system resources. [hazelcast#18574] -
Fixed an issue where running SQL statements was fetching results incorrectly
(from an unexpected mapping) when there are different user-provided schemas for
data structures and mappings. [hazelcast#18428] -
Fixed an issue where the client state listener was not properly working
with failover clients (in blue-green deployments); it was failing with
invalid configuration exception. [hazelcast#18351] -
Fixed an issue where there might be continuous reconnection attempts by the
cluster members to a failed member, even its connection is explicitly closed
and when Hazelcast is placed behind a proxy. [hazelcast#18320] -
Hazelcast now properly works on hosts with multiple NICs. [hazelcast#17834]
Removed/Deprecated Features
- The following properties have been deprecated:
**hazelcast.client.statistics.enabled
**hazelcast.client.statistics.period.seconds
[hazelcast#19219] - The
HotRestartService
class has been deprecated; usePersistenceService
instead. [hazelcast#19404] - The following property have been removed:
**hazelcast.hotrestart.free.native.memory.percentage
[hazelcast#19404] - Former
Jet
,JetInstance
andJetCacheManager
classes have been deprecated.
See https://docs.hazelcast.com/hazelcast/5.0/migrate/upgrading-from-jet.html
for details. AccordinglyJetInstance
has been removed from Hazelcast's command line
interface (CLI) and Jet engine tests (also the name of CLI has been changed toHazelcastCommandLine
). [hazelcast#18829], [hazelcast#18775], [hazelcast#18667] - Former Hazelcast Jet's
bootstrappedInstance()
has been deprecated. Instead, you can useHazelcast.bootstrappedInstance()
.
See https://docs.hazelcast.com/hazelcast/5.0/migrate/upgrading-from-jet.html for details. - The support of
NULLS FIRST
andNULLS LAST
has been removed from the SQL engine;
the indices treatNULL
as the smallest value in ordering, therefore we needed to disable temporarily these constructs. [hazelcast#19031] - The configuration element
hot-restart-persistence
has been deprecated.
You can usepersistence
instead, which is the successor ofhot-restart-persistence
.
If both are enabled, Hazelcast uses thepersistence
configuration.
Thehot-restart-persistence
element will be removed in a future release. [hazelcast#19004] - The
hazelcast-all
module has been removed from the Hazelcast distribution after the merge of
former IMDG and Jet products.
Contributors
We would like to thank the contributors from our open source community
who worked on this release: