1

In most cases, Geode allocates one partitioned region for each data structure. For example, each Sorted Set is allocated its own partitioned region, in which the key is the user data and the value is the user-provided score, and entries are indexed by score. The two exceptions to this design are data types String and HyperLogLog. All Strings are allocated to a single partitioned region.

For WAN replication, we create a gateway-sender and then assign this sender to a particular region for replication. With redis adaptor, we only have two regions by default as written above. Since a region for a "set" data structure will be created only when we add a key for it. How can we replicate those regions with redis adaptor? https://cwiki.apache.org/confluence/display/GEODE/GemFire+Multi-site+%28WAN%29+Architecture

Steps for WAN replication done by me:

start locator --name=dc1  --properties-file=gemfire.properties
start server --name=redis  --redis-port=11211 --J=-Dgemfireredis.regiontype=REPLICATE
create gateway-sender --id=dc1 --remote-distributed-system-id=3
create gateway-receiver

Now, I list regions which are currently available.

Cluster-1 gfsh>list regions
List of regions
---------------
ReDiS_HlL
ReDiS_StRiNgS

Assign both the regions to the gateway-sender

alter region --name=ReDiS_StRiNgS --gateway-sender-id=dc1

It is able to replicate the strings but not other data structures.

gemfire.properties

mcast-port=0
locators=1dc1[10334]
distributed-system-id=1
remote-locators=dc2[10334] 

I have ran the same commands on dc2.

Shivam Mitra
  • 1,040
  • 3
  • 17
  • 33

1 Answers1

0

Before creating the region for other data structures, the Redis adapter implementation looks as the cache.xml to see if the region is defined. So, in your case, you can define a region with a gateway-sender in cache.xml while starting the server. Please see this reference for creating the cache.xml file this hierarchy information will also be useful. Once you have you can run the following command:

gfsh>start server --cache-xml-file=/path/to/cache.xml
Swapnil
  • 1,191
  • 7
  • 8
  • When you don't know the name of region before hand, how can you define that region? – Shivam Mitra Oct 12 '17 at 10:12
  • On the remote cluster, if the region with this name does not exist, the data is going to be thrown away. So, you would really need to restrict the names of the regions that can be created and then create them on both clusters. – Swapnil Oct 12 '17 at 23:13