Managing and monitoring Hive ACID table replication policies

Manage and monitor the replication policies to run, disable, delete, configure, or view replication job history.

  • The Cloudera Manager > Replication > Replication Policies page displays the following details for each replication policy:
    Table 1. Replication Policies page columns
    Column Description
    ID Displays the automatically generated replication policy ID.
    Name Displays the name of the replication policy.
    Type Displays Hive ACID for Hive ACID replication policies.
    Source Displays the source cluster name used in the replication policy.
    Destination Displays the target cluster name used in the replication policy.
    Progress Displays a spinner when the replication policy job is running.
    Completed Displays the timestamp when the replication job is submitted to the Hive service.
    Next Run Displays the Managed by Hive message. Hover over the message to see more information about the next scheduled run.

    Displays None scheduled immediately after a policy is submitted. You can safely ignore this message because the replication job is managed entirely by Hive and runs automatically based on your policy configuration or Hive schedule clause. The schedules are managed by Hive.

    Message Displays the status of the replication job. The following statuses are possible:
    • Waiting for Update – Indicates that the replication policy creation is complete and is waiting for the job status completion confirmation by the Hive service.
    • Running – Indicates that the replication job is in progress.
    • Failed, Unknown, Failed_admin, Abandoned, or Cancelled – Indicates that the replication policy job has failed.
    • Skipped – Indicates that the replication job was skipped.
    • Success – Indicates that the replication job completed successfully.
  • To manage the replication policy, perform the following steps:
    1. Go to the Cloudera Manager > Replication > Replication Policies page.
    2. Select the replication policy that you want to manage.
    3. From the Actions drop-down menu, select one of the following actions:
      • Show History – Opens the Replication History page where you can view the replication policy job history. The page displays all the policy job runs for the replication policy, and is refreshed automatically every 60 seconds.
        On this page, you can view the replication policy Name, the replication policy Type, the chosen Source and Destination clusters for the policy, and the Next Run details. Additionally, the page displays the following details for each replication policy job:
        Table 2. Replication policy job details
        Field Description
        Start Time Displays the date and time when the replication job started.
        Duration Displays the time taken to complete the replication job.
        Outcome Displays the current job status, including any error messages.
        Origin Displays the origin of the collected Hive metrics.

        Select SOURCE to view DUMP operation details or TARGET to view LOAD operation details.

        Tables Displays the number of successfully replicated tables compared to the total number of tables to be replicated.
        Functions Displays the number of functions processed during DUMP and LOAD operations.
        Events Displays the number of processed events. This count increments for every DUMP and LOAD event. The counts for DUMP and LOAD operations might not match because they are distinct operations.
      • Edit Configuration – Opens the replication edit wizard where you can edit the schedule of the replication policy.
      • Run Now – Runs the replication policy job.
      • Disable – Disables the selected replication job.
      • Delete – Deletes the selected replication job.

Potential troubleshooting

The following example illustrates how Replication Manager determines the Tables count for a Hive ACID replication policy:
  1. You create a database that contains one managed table, two external tables, three virtual views, and four materialized views.
    create database sample3;
    use sample3;
    
    CREATE TABLE table_04 (id int, name string);
    
    CREATE EXTERNAL TABLE table_02 (id int, name string);
    CREATE EXTERNAL TABLE table_03 (id int, name string);
    
    #Create virtual views (these cause the mismatch)
    CREATE VIEW view_01 AS SELECT * FROM table_04;
    CREATE VIEW view_02 AS SELECT * FROM table_04;
    CREATE VIEW view_03 AS SELECT * FROM table_04;
    
    CREATE materialized VIEW mv1 AS SELECT * FROM table_04;
    CREATE materialized VIEW mv2 AS SELECT * FROM table_04;
    CREATE materialized VIEW mv3 AS SELECT * FROM table_04;
    CREATE materialized VIEW mv4 AS SELECT * FROM table_04;
  2. You create and run a Hive ACID replication policy on the sample3 database.
  3. After the replication policy run is complete, the Tables column on the Replication Policies page displays the following statistics for the replication policy:
    • The SOURCE displays the DUMP operation details in the following ways:
      • The numerator is the sum total of all the managed tables, external tables, and virtual views. In this example, the numerator is 1 + 2 + 3 = 6.

        This statistic does not include the materialized view because the hive.repl.dump.include.materialized.views advanced configuration snippet is set to false by default.

      • The denominator is the sum total of all the managed tables, external tables, virtual views, and materialized views. In this example, the denominator is 1 + 2 + 3 + 4 = 10.
    • The TARGET displays the LOAD operation details the following ways:
      • The numerator is the number of Hive ACID tables (managed tables). In this example, the numerator is 1.
      • The denominator is the number of subdirectories created in the staging location. Subdirectories are created for Hive ACID tables (managed tables) and virtual views. Therefore, in this example, the denominator is 1 + 3 = 4.