Skip to content

Commit

Permalink
Update WAN Rest API with target scope information [HZ-4594] (#1058)
Browse files Browse the repository at this point in the history
* Update WAN Rest API with impact scope information [HZ-4594]

Some WAN API endpoints apply to the entire cluster, while some only apply to the receiving member. This commit adds notes to each endpoint specifying what the scope of its impact is.

I'm not sure if the `IMPORTANT:` boxes are the best way to present this, so please feel free to suggest better approaches!

Related to https://hazelcast.atlassian.net/browse/HZ-4594

* Apply Rebekah's suggestions from code review

Co-authored-by: rebekah-lawrence <[email protected]>

---------

Co-authored-by: rebekah-lawrence <[email protected]>
  • Loading branch information
JamesHazelcast and rebekah-lawrence authored Apr 6, 2024
1 parent ebb30cc commit d8a9226
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/modules/wan/pages/rest-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ hazelcast:

== Clearing the Queues

The URL for cleaning the WAN event queues is as follows:
The URL for clearing the WAN event queues is as follows:

```
http://{member IP address:port}/hazelcast/rest/wan/clearWanQueues
Expand All @@ -96,6 +96,7 @@ The command according to the above example configuration is as follows:
curl -X POST -d "tokyo&&london-wan-rep&london" --URL http://127.0.0.1:5701/hazelcast/rest/wan/clearWanQueues
```

IMPORTANT: This endpoint only clears the specified WAN queues of the member it is sent to, it does not clear WAN queues for all members of the cluster.

== Pausing the Publisher

Expand All @@ -117,6 +118,8 @@ The command according to the above example configuration is as follows:
curl -X POST -d "tokyo&&london-wan-rep&london" --URL http://127.0.0.1:5701/hazelcast/rest/wan/pausePublisher
```

IMPORTANT: This endpoint only pauses the specified WAN publisher on the member it is sent to, it does not pause WAN publishers for any other members of the cluster.

== Resuming the Publisher

The URL for resuming the WAN publisher is as follows:
Expand All @@ -137,6 +140,8 @@ The command according to the above example configuration is as follows:
curl -X POST -d "tokyo&&london-wan-rep&london" --URL http://127.0.0.1:5701/hazelcast/rest/wan/resumePublisher
```

IMPORTANT: This endpoint only resumes the specified WAN publisher on the member it is sent to, it does not resume WAN publishers for any other members of the cluster.

== Stopping the Publisher

The URL for stopping the WAN publisher is as follows:
Expand All @@ -157,6 +162,8 @@ The command according to the above example configuration is as follows:
curl -X POST -d "tokyo&&london-wan-rep&london" --URL http://127.0.0.1:5701/hazelcast/rest/wan/stopPublisher
```

IMPORTANT: This endpoint only stops the specified WAN publisher on the member it is sent to, it does not stop WAN publishers for any other members of the cluster.

== Synchronizing the Clusters

=== Full Synchronization
Expand Down Expand Up @@ -189,6 +196,8 @@ The following is an example output:
{"status":"success","message":"Sync initiated","uuid":"22e1e3d6-1c96-4757-baee-4cd77f1d214e"}
```

IMPORTANT: This endpoint initiates WAN synchronization across the entire cluster, with the receiving member designated as the coordinator for the synchronization process.

=== Delta Synchronization

For the delta synchronization, you need to first perform a
Expand All @@ -210,6 +219,8 @@ a single map or all the maps.

NOTE: Consistency check can be triggered only for one map.

IMPORTANT: This endpoint initiates WAN synchronization across the entire cluster, with the receiving member designated as the coordinator for the synchronization process.

== Tracking the WAN Sync Progress

You can track the progress of a WAN sync operation. The URL is as follows:
Expand All @@ -233,6 +244,8 @@ The following is an example output:

The other stages are `STARTED`, `IN_PROGRESS` and `FAILED`.

IMPORTANT: As WAN synchronization is an operation that occurs across the cluster, this response represents the WAN sync progress for the entire cluster.

[[wr-dynamically-adding]]
== Dynamically Adding WAN Publishers

Expand All @@ -250,4 +263,6 @@ curl -X POST -d "{clusterOnSource}&{clusterPassword}&{wanConfig}" --URL http://1
```

The `wanConfig` parameter should be the full configuration as a JSON string.
See xref:advanced-features.adoc#dynamically-adding-wan-publishers[here] for configuration examples.
See xref:advanced-features.adoc#dynamically-adding-wan-publishers[here] for configuration examples.

IMPORTANT: This endpoint deploys the provided config across all members of the cluster, following the same principles as other dynamic configuration mechanisms.

0 comments on commit d8a9226

Please sign in to comment.