Repairing a cluster with HBCK2

HBCK2 is the repair tool for Apache HBase clusters. It is included in the hbase-operator-tools. The hbase-operator-tools are installed in the Docker image provided by Stackable in the directory /stackable/hbase-operator-tools/. HBCK2 can be executed via the wrapper script hbck2.

For instance, if you followed the First steps then you have a cluster called simple-hbase running. Let us assume that the HBase user interface reports unknown RegionServers, then you can schedule the ServerCrashProcedure for these RegionServers by applying the following Job:

---
apiVersion: batch/v1
kind: Job
metadata:
  name: hbck2-recover-unknown
spec:
  template:
    spec:
      containers:
      - name: hbck2
        image: docker.stackable.tech/stackable/hbase:2.4.17-stackable0.0.0-dev
        volumeMounts:
        - name: hbase-config
          mountPath: /stackable/conf
        env:
        - name: HBASE_CONF_DIR
          value: /stackable/conf
        - name: HADOOP_CONF_DIR
          value: /stackable/conf
        command:
        - hbck2
        args:
        - recoverUnknown
      volumes:
      - name: hbase-config
        projected:
          sources:
          - configMap:
              name: simple-hdfs
          - configMap:
              name: simple-hbase-master-default