Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Kudu/ Disabling the Soft Delete Feature for Kudu Tables
Updated on 2026-08-29 GMT+08:00

Disabling the Soft Delete Feature for Kudu Tables

Scenarios

This section describes how to disable the soft delete feature for Kudu. That is, after a table is deleted by performing the DELETE operation, data is deleted immediately instead of being retained in the background for a period of time before being permanently deleted.

The Kudu soft delete feature is enabled by default. When a table is deleted by performing the DELETE operation, data is not immediately and permanently deleted from Kudu. Instead, the data is retained in the background for a period of time (6 hours by default) before being permanently deleted. This feature allows you to restore tables and data in case of accidental deletions, providing a reliable layer of data protection.

As shown in the following figure, the test table is in the soft_deleted state.

You can run the following command to restore a table in the soft_deleted state. In the command, table_id represents the blue string shown in the preceding figure.
kudu table recall <kudumaster_addresses> <table_id>

If you create or delete a Kudu table in Impala, you cannot immediately recreate a table with the same name after the initial deletion when the soft delete feature is enabled. The following error message is displayed:

ERROR: ImpalaRuntimeException: Error creating Kudu table 'impala::xx.xx' CAUSED BY: ImpalaRuntimeException: Table 'impala::xx.xx' already exists in Kudu.

This indicates that the Kudu table is still within the soft delete retention period and has not been permanently deleted. In this case, you can use one of the following options:

  • Create the table using a different name.
  • Recreate the table with the same name after the retention period expires (6 hours by default).
  • Disabling the soft delete feature by following the steps provided in this section.

Notes and Constraints

This section applies only to MRS 3.6.0-LTS and later.

Disabling the Soft Delete Feature

If you need to delete a table and its data permanently and immediately, perform the following operations:

Method 1: Apply the setting globally for Kudu.

  1. Log in to FusionInsight Manager.

    For details, see Accessing FusionInsight Manager.

  2. Choose Cluster > Services > Kudu, click Configurations and then All Configurations, search for the default_deleted_table_reserve_seconds parameter, and change its value to 0.
  3. After the parameter setting is modified, click Save, perform operations as prompted, and wait until the setting is saved successfully.
  4. On the Kudu dashboard page, choose More > Restart Service or Service Rolling Restart, enter the administrator password, and wait until the service restarts.

    Components are unavailable during the restart, affecting upper-layer services in the cluster. To minimize the impact, perform this operation during off-peak hours or after confirming that the operation does not have adverse impact.

Method 2: Apply the setting globally for Impala.

  1. Log in to FusionInsight Manager.

    For details, see Accessing FusionInsight Manager.

  2. Choose Cluster > Services > Impala, click Configurations and then All Configurations, search for the default_query_options parameter, and add ,KUDU_TABLE_RESERVE_SECONDS=0 to its value.
  3. After the parameter setting is modified, click Save, perform operations as prompted, and wait until the setting is saved successfully.
  4. On the Impala instance page, select all Impalad instances with expired configurations, enter the administrator password, and restart the instances.

    Instances are unavailable during the restart, affecting upper-layer services in the cluster. To minimize the impact, perform this operation during off-peak hours or after confirming that the operation does not have adverse impact.

Method 3: Apply the setting to a single table.

  • Take the Kudu CLI as an example. You can specify -reserve_seconds=0 to delete the table immediately.
    kudu table delete <kudumaster_addresses> <table_name> -reserve_seconds=0
  • Take the Kudu Java SDK as an example. In the KuduClient.deleteTable() API, set the deletion retention time to 0 to delete the table immediately.
    KuduClient.deleteTable(<tableName>, <reserveSeconds>);
  • When deleting a Kudu table created through Impala, such as by using the impala-shell, you can configure the following query option to delete the table immediately:
    set KUDU_TABLE_RESERVE_SECONDS=0;
    drop table <impala_table_name>;