forked from apache/geode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEODE-7955: Docs for redundancy internal API and redundancy commands (a…
…pache#5005) * GEODE-7955: Docs for redundancy internal API and redundancy commands - Document restore redundancy gfsh command - Document status redundancy gfsh command - Document new RestoreRedundancyOperation API usage - Add rebalance and restore redundancy stats to stats list - Removed suggestion to use show metrics command to determine redundancy status - Removed suggestions to use rebalance when only restoring redundancy is wanted Authored-by: Donal Evans <[email protected]>
- Loading branch information
1 parent
84387ce
commit a820c59
Showing
10 changed files
with
224 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
geode-docs/developing/partitioned_regions/restoring_region_redundancy.html.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: Restoring Redundancy in Partitioned Regions | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
Restoring redundancy is a member operation. It affects all partitioned regions defined by the member, regardless of whether the member hosts data for the regions. | ||
|
||
Restoring redundancy creates new redundant copies of buckets on members hosting the region and by default reassigns which members host the primary buckets to give better load balancing. It does not move buckets from one member to another. The reassignment of primary hosts can be prevented using the appropriate flags, as described below. See [Configure High Availability for a Partitioned Region](configuring_ha_for_pr.html) for further detail on redundancy. | ||
|
||
For efficiency, when starting multiple members, trigger the restore redundancy a single time, after you have added all members. | ||
|
||
Initiate a restore redundancy operation using one of the following: | ||
|
||
- `gfsh` command. First, starting a `gfsh` prompt and connect to the cluster. Then type the following command: | ||
|
||
``` pre | ||
gfsh>restore redundancy | ||
``` | ||
|
||
Optionally, you can specify regions to include or exclude from restoring redundancy, and prevent the operation from reassigning which members host primary copies. Type `help restore redundancy` or see [restore redundancy](../../tools_modules/gfsh/command-pages/restore.html) for more information. | ||
|
||
- API call: | ||
|
||
``` pre | ||
ResourceManager manager = cache.getResourceManager(); | ||
CompletableFuture<RestoreRedundancyResults> future = manager.createRestoreRedundancyOperation() | ||
.includeRegions(regionsToInclude) | ||
.excludeRegions(regionsToExclude) | ||
.shouldReassignPrimaries(false) | ||
.start(); | ||
//Get the results | ||
RestoreRedundancyResults results = future.get(); | ||
//These are some of the details we can get about the run from the API | ||
System.out.println("Restore redundancy operation status is " + results.getStatus()); | ||
System.out.println("Results for each included region: " + results.getMessage()); | ||
System.out.println("Number of regions with no redundant copies: " + results.getZeroRedundancyRegionResults().size(); | ||
System.out.println("Results for region " + regionName + ": " + results.getRegionResult(regionName).getMessage(); | ||
``` | ||
|
||
If you have `start-recovery-delay=-1` configured for your partitioned region, you will need to perform a restore redundancy operation on your region after you restart any members in your cluster in order to recover any lost redundancy. | ||
|
||
If you have `start-recovery-delay` set to a low number, you may need to wait extra time until the region has recovered redundancy. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
geode-docs/tools_modules/gfsh/command-pages/restore.html.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: restore redundancy | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
Restore redundancy to partitioned regions and optionally reassign which members host the primary copies. | ||
|
||
The default is for all partitioned regions to have redundancy restored and to reassign primary hosts. If any region that would have redundancy restored is a member of a colocated group, all other regions that are part of that group will also have their redundancy restored. This behavior takes precedence over any included or excluded regions specified as part of the command. See [Data Colocation Between Regions](../../../developing/partitioned_regions/custom_partitioning_and_data_colocation.html#custom_partitioning_and_data_colocation__section_D2C66951FE38426F9C05050D2B9028D8) | ||
|
||
**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command. | ||
|
||
**Syntax:** | ||
|
||
``` pre | ||
restore redundancy [--include-region=value(,value)*] [--exclude-region=value(,value)*] [--reassign-primaries(=value)] | ||
``` | ||
|
||
| Name | Description | Default Value | | ||
|------|-------------|---------------| | ||
| ‑‑include‑region | Partitioned Region paths to be included for restore redundancy operation. Includes take precedence over excludes. | | | ||
| ‑‑exclude‑region | Partitioned Region paths to be excluded for restore redundancy operation. | | | ||
| ‑‑reassign‑primaries | If false, this operation will not attempt to reassign which members host primary buckets. | true | | ||
|
||
**Example Commands:** | ||
|
||
``` pre | ||
restore redundancy | ||
restore redundancy --include-region=/region3,/region2 --exclude-region=/region1 | ||
``` | ||
|
||
**Sample Output:** | ||
|
||
``` pre | ||
restore redundancy --include-region=/region3,/region2 --exclude-region=/region1 | ||
|
||
Number of regions with zero redundant copies = 0 | ||
Number of regions with partially satisfied redundancy = 0 | ||
Number of regions with fully satisfied redundancy = 2 | ||
|
||
Redundancy is fully satisfied for regions: | ||
region3 redundancy status: SATISFIED. Desired redundancy is 2 and actual redundancy is 2. | ||
region2 redundancy status: SATISFIED. Desired redundancy is 1 and actual redundancy is 1. | ||
|
||
Total primary transfers completed = 224 | ||
Total primary transfer time (ms) = 4134 | ||
``` | ||
|
||
|
Oops, something went wrong.