Using Apache Phoenix to store and access data
Also available as:
PDF

Run the Phoenix repair tool

You can run the Phoenix repair tool to gather information about the components of the table. The tool provide capabilities to fix certain problems.

Note
Note

Run the HDFS fsck and HBase hbck tools before running the Phoenix repair tool. Checking the condition of HDFS and HBase is highly recommended because the Phoenix repair tool does not run on HDFS and HBase, both of which must be in working order for the repair tool to fix Phoenix problems.

  • The Phoenix repair tool looks for table records in the system catalog and collects all corresponding information about columns and indexes. If certain inconsistencies are detected, then the tool prompts you to verify that it should proceed with fixing the problems. The tool can fix the following problems:
  • Missing or disabled physical table

  • Incorrect number of columns in table metadata information

  • Table record has columns with an internal index that is out of range

  • The tool performs a cross-reference check between user tables and indexes. If a user table has an index that misses a physical table, the tool offers to delete the link to this index as well as to delete the index table record from the system catalog. If the physical table is disabled, the tool asks whether it needs to be enabled.
  • If you allow the Phoenix repair tool to fix an issue, the tool creates a snapshot of the SYSTEM.CATALOG table. The snapshot is created in case you want to rollback the repair operation.

Prerequisites

Verify that no concurrent execution of the Phoenix repair tool launches or runs while you run the tool. Also, ensure that no other clients modify the system catalog data while the tool runs.

  1. Run the psl.py utility with the -r option:
    /usr/hdp/current/phoenix-client/psql.py -r
  2. If the tool detects previously stored snapshots on the system, respond to the Restore dialogue prompt:
    • Respond whether the tool should delete or retain the previously recorded snapshots.

    • Indicate whether the tool should proceed with the integrity check or restore a table from the one of the snapshots.

After the tool completes the check, you can consider the SYSTEM.CATALOG table as validated. You can proceed with SQL operations in the Phoenix CLI.