Skip to content

Commit c0271a7

Browse files
authored
docs: add BookKeeper AutoRecovery administration page (#1138)
1 parent 437b898 commit c0271a7

3 files changed

Lines changed: 162 additions & 0 deletions

File tree

docs/administration-zk-bk.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,60 @@ bin/bookkeeper shell listbookies -rw -h
261261
bin/bookkeeper shell listbookies -ro -h
262262
```
263263

264+
### AutoRecovery
265+
266+
BookKeeper AutoRecovery automatically detects unavailable bookies and rereplicated under-replicated ledger fragments to healthy bookies — without manual intervention. For a full explanation of how AutoRecovery works, see the [BookKeeper AutoRecovery documentation](https://bookkeeper.apache.org/docs/next/admin/autorecovery).
267+
268+
#### Deploy AutoRecovery
269+
270+
AutoRecovery can run embedded within each bookie process (default) or on dedicated nodes:
271+
272+
- **Embedded (default)**: `autoRecoveryDaemonEnabled=true` in `conf/bookkeeper.conf` — each bookie runs an AutoRecovery thread alongside normal bookie operations.
273+
- **Dedicated nodes**: Set `autoRecoveryDaemonEnabled=false` on all bookies and run AutoRecovery as a separate process. Recommended for large clusters to isolate recovery I/O from bookie traffic.
274+
275+
To start AutoRecovery as a standalone process:
276+
277+
```shell
278+
bin/bookkeeper autorecovery
279+
```
280+
281+
Or as a background daemon:
282+
283+
```shell
284+
bin/pulsar-daemon start autorecovery
285+
```
286+
287+
#### Enable and disable AutoRecovery
288+
289+
You can temporarily disable AutoRecovery cluster-wide during planned maintenance and re-enable it afterward:
290+
291+
```shell
292+
# Disable AutoRecovery
293+
bin/bookkeeper shell autorecovery -disable
294+
295+
# Enable AutoRecovery
296+
bin/bookkeeper shell autorecovery -enable
297+
298+
# Check current status
299+
bin/bookkeeper shell autorecovery -status
300+
```
301+
302+
#### Pulsar-specific configuration
303+
304+
Set `lostBookieRecoveryDelay` in `conf/bookkeeper.conf` to a value greater than `0` (for example, `60` seconds) in production clusters that undergo rolling restarts. This prevents AutoRecovery from triggering unnecessary rereplication for bookies that are only temporarily unavailable.
305+
306+
To enable Prometheus metrics on a bookie or AutoRecovery node, set the following in `conf/bookkeeper.conf`:
307+
308+
```properties
309+
statsProviderClass=org.apache.pulsar.metrics.prometheus.bookkeeper.PrometheusMetricsProvider
310+
```
311+
312+
:::note
313+
314+
This Pulsar-specific stats provider class is required since Pulsar 4.2.0 / 4.0.10. See the [Pulsar 4.0.10 release notes](https://pulsar.apache.org/release-notes/versioned/pulsar-4.0.10/) for details.
315+
316+
:::
317+
264318
## BookKeeper persistence policies
265319

266320
In Pulsar, you can set *persistence policies* at the namespace level, which determines how BookKeeper handles persistent storage of messages. Policies determine four things:

versioned_docs/version-4.0.x/administration-zk-bk.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,60 @@ bin/bookkeeper shell listbookies -rw -h
261261
bin/bookkeeper shell listbookies -ro -h
262262
```
263263

264+
### AutoRecovery
265+
266+
BookKeeper AutoRecovery automatically detects unavailable bookies and rereplicated under-replicated ledger fragments to healthy bookies — without manual intervention. For a full explanation of how AutoRecovery works, see the [BookKeeper AutoRecovery documentation](https://bookkeeper.apache.org/docs/next/admin/autorecovery).
267+
268+
#### Deploy AutoRecovery
269+
270+
AutoRecovery can run embedded within each bookie process (default) or on dedicated nodes:
271+
272+
- **Embedded (default)**: `autoRecoveryDaemonEnabled=true` in `conf/bookkeeper.conf` — each bookie runs an AutoRecovery thread alongside normal bookie operations.
273+
- **Dedicated nodes**: Set `autoRecoveryDaemonEnabled=false` on all bookies and run AutoRecovery as a separate process. Recommended for large clusters to isolate recovery I/O from bookie traffic.
274+
275+
To start AutoRecovery as a standalone process:
276+
277+
```shell
278+
bin/bookkeeper autorecovery
279+
```
280+
281+
Or as a background daemon:
282+
283+
```shell
284+
bin/pulsar-daemon start autorecovery
285+
```
286+
287+
#### Enable and disable AutoRecovery
288+
289+
You can temporarily disable AutoRecovery cluster-wide during planned maintenance and re-enable it afterward:
290+
291+
```shell
292+
# Disable AutoRecovery
293+
bin/bookkeeper shell autorecovery -disable
294+
295+
# Enable AutoRecovery
296+
bin/bookkeeper shell autorecovery -enable
297+
298+
# Check current status
299+
bin/bookkeeper shell autorecovery -status
300+
```
301+
302+
#### Pulsar-specific configuration
303+
304+
Set `lostBookieRecoveryDelay` in `conf/bookkeeper.conf` to a value greater than `0` (for example, `60` seconds) in production clusters that undergo rolling restarts. This prevents AutoRecovery from triggering unnecessary rereplication for bookies that are only temporarily unavailable.
305+
306+
To enable Prometheus metrics on a bookie or AutoRecovery node, set the following in `conf/bookkeeper.conf`:
307+
308+
```properties
309+
statsProviderClass=org.apache.pulsar.metrics.prometheus.bookkeeper.PrometheusMetricsProvider
310+
```
311+
312+
:::note
313+
314+
This Pulsar-specific stats provider class is required since Pulsar 4.2.0 / 4.0.10. See the [Pulsar 4.0.10 release notes](https://pulsar.apache.org/release-notes/versioned/pulsar-4.0.10/) for details.
315+
316+
:::
317+
264318
## BookKeeper persistence policies
265319

266320
In Pulsar, you can set *persistence policies* at the namespace level, which determines how BookKeeper handles persistent storage of messages. Policies determine four things:

versioned_docs/version-4.2.x/administration-zk-bk.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,60 @@ bin/bookkeeper shell listbookies -rw -h
261261
bin/bookkeeper shell listbookies -ro -h
262262
```
263263

264+
### AutoRecovery
265+
266+
BookKeeper AutoRecovery automatically detects unavailable bookies and rereplicated under-replicated ledger fragments to healthy bookies — without manual intervention. For a full explanation of how AutoRecovery works, see the [BookKeeper AutoRecovery documentation](https://bookkeeper.apache.org/docs/next/admin/autorecovery).
267+
268+
#### Deploy AutoRecovery
269+
270+
AutoRecovery can run embedded within each bookie process (default) or on dedicated nodes:
271+
272+
- **Embedded (default)**: `autoRecoveryDaemonEnabled=true` in `conf/bookkeeper.conf` — each bookie runs an AutoRecovery thread alongside normal bookie operations.
273+
- **Dedicated nodes**: Set `autoRecoveryDaemonEnabled=false` on all bookies and run AutoRecovery as a separate process. Recommended for large clusters to isolate recovery I/O from bookie traffic.
274+
275+
To start AutoRecovery as a standalone process:
276+
277+
```shell
278+
bin/bookkeeper autorecovery
279+
```
280+
281+
Or as a background daemon:
282+
283+
```shell
284+
bin/pulsar-daemon start autorecovery
285+
```
286+
287+
#### Enable and disable AutoRecovery
288+
289+
You can temporarily disable AutoRecovery cluster-wide during planned maintenance and re-enable it afterward:
290+
291+
```shell
292+
# Disable AutoRecovery
293+
bin/bookkeeper shell autorecovery -disable
294+
295+
# Enable AutoRecovery
296+
bin/bookkeeper shell autorecovery -enable
297+
298+
# Check current status
299+
bin/bookkeeper shell autorecovery -status
300+
```
301+
302+
#### Pulsar-specific configuration
303+
304+
Set `lostBookieRecoveryDelay` in `conf/bookkeeper.conf` to a value greater than `0` (for example, `60` seconds) in production clusters that undergo rolling restarts. This prevents AutoRecovery from triggering unnecessary rereplication for bookies that are only temporarily unavailable.
305+
306+
To enable Prometheus metrics on a bookie or AutoRecovery node, set the following in `conf/bookkeeper.conf`:
307+
308+
```properties
309+
statsProviderClass=org.apache.pulsar.metrics.prometheus.bookkeeper.PrometheusMetricsProvider
310+
```
311+
312+
:::note
313+
314+
This Pulsar-specific stats provider class is required since Pulsar 4.2.0 / 4.0.10. See the [Pulsar 4.0.10 release notes](https://pulsar.apache.org/release-notes/versioned/pulsar-4.0.10/) for details.
315+
316+
:::
317+
264318
## BookKeeper persistence policies
265319

266320
In Pulsar, you can set *persistence policies* at the namespace level, which determines how BookKeeper handles persistent storage of messages. Policies determine four things:

0 commit comments

Comments
 (0)