Configuring Replicated Maps

A replicated map is a distributed key-value data structure where the data is replicated to all members in the cluster. It provides full replication of entries to all members for high-speed access. You can create and configure replicated maps using the ReplicatedMap custom resource.

Configuring a ReplicatedMap Resource

You can use any of the following configuration options in the ReplicatedMap resource. For more information, see the API Reference.

Field Description

name

Name of the ReplicatedMap configuration that you’re creating. If empty, the custom resource (CR) name is used.

hazelcastResourceName

Defines the name of the Hazelcast resource.

inMemoryFormat

Internal storage format. Use either OBJECT or BINARY.

asyncFillup

Specifies whether the ReplicatedMap is filled with entries asynchronously. The default value is true, in which case calls to the ReplicatedMap during the initial replication may return null values. If set to false, calls to the ReplicatedMap are blocked until the initial replication is complete, and no exceptions are thrown.

Example Configuration

The following ReplicatedMap custom resource creates a ReplicatedMap configuration for the Hazelcast resource that is defined in the hazelcastResourceName field.

Example configuration
apiVersion: hazelcast.com/v1alpha1
kind: ReplicatedMap
metadata:
  name: replicatedmap-sample
spec:
  hazelcastResourceName: hazelcast
  inMemoryFormat: OBJECT
  asyncFillup: true

After creating the ReplicatedMap resource, use the following command to check its status:

kubectl get replicatedmap replicatedmap-sample -o wide
NAME                   STATUS    HAZELCAST-RESOURCE   MESSAGE
replicatedmap-sample   Success   hazelcast