#
# 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.
#

description: |
  A tool for managing BookKeeper.
commands:
- name: auto-recovery
  description: Runs an auto-recovery service daemon
  options:
  - flags: -c, --conf
    description: Configuration for the auto-recovery daemon
- name: bookie
  description: Starts up a BookKeeper server (aka bookie)
  options:
  - flags: -c, --conf
    description: Configuration for the bookie server
  - flags: -readOnly
    description: Force start a read-only bookie server
    default: 'false'
  - flags: -withAutoRecovery
    description: Start auto-recovery service bookie server
    default: 'false'
- name: localbookie
  description: Runs a test ensemble of N bookies locally
  argument: N
- name: upgrade
  description: Upgrade the bookie's filesystem
  options:
  - flags: -c, --conf
    description: Configuration for the bookie server
  - flags: -c, --conf
    description: Finalize the upgrade
  - flags: -c, --conf
    description: Roll the upgrade back
  - flags: -u, --upgrade
    description: Upgrade the bookie's directories
- name: shell
  description: Run shell for admin commands. To see a full listing of those commands, run `bookkeeper shell` without an argument.
  example: |
    $ bookkeeper shell bookiesanity
env_vars:
- name: BOOKIE_LOG_CONF
  description: Log4j configuration file
  default: conf/log4j2.yaml
- name: BOOKIE_CONF
  description: BookKeeper configuration file
  default: conf/bk_server.conf
- name: BOOKIE_EXTRA_OPTS
  description: Extra options to be passed to the JVM
- name: BOOKIE_EXTRA_CLASSPATH
  description: Extra paths for BookKeeper's classpath
- name: ENTRY_FORMATTER_CLASS
  description: The Java class used to format entries
- name: BOOKIE_PID_DIR
  description: Folder where the BookKeeper server PID file should be stored
- name: BOOKIE_STOP_TIMEOUT
  description: Wait time before forcefully killing the Bookie server instance if attempts to stop it are not successful
