ALM-14006 Number of HDFS Files Exceeds the Threshold

Description

The system periodically checks the number of HDFS files every 30 seconds and compares the number of HDFS files with the threshold. This alarm is generated when the system detects that the number of HDFS files exceeds the threshold.

If Trigger Count is 1, this alarm is cleared when the number of HDFS files is less than or equal to the threshold. If Trigger Count is greater than 1, this alarm is cleared when the number of HDFS files is less than or equal to 90% of the threshold.

Attribute

Alarm ID

Alarm Severity

Auto Clear

14006

Minor

Yes

Parameters

Name

Meaning

Source

Specifies the cluster for which the alarm is generated.

ServiceName

Specifies the service for which the alarm is generated.

RoleName

Specifies the role for which the alarm is generated.

HostName

Specifies the host for which the alarm is generated.

NameServiceName

Specifies the NameService for which the alarm is generated.

Trigger Condition

Specifies the threshold for triggering the alarm.

Impact on the System

Disk storage space is insufficient, which may result in data import failure. The performance of the HDFS system is affected.

Possible Causes

The number of HDFS files exceeds the threshold.

Procedure

Check the number of files in the system.

  1. On FusionInsight Manager, check the number of HDFS files. Specifically, choose Cluster > Name of the desired cluster > Services > HDFS. Click the drop-down menu in the upper right corner of Chart, choose Customize > File and Block, and select HDFS File and Total Blocks.

  2. Choose Cluster > Name of the desired cluster > Services > HDFS > Configurations > All Configurations, and search for the GC_OPTS parameter under NameNode.

  3. Configure the threshold of the number of configuration file objects. Specifically, change the value of Xmx (GB) in the GC_OPTS parameter. The threshold (specified by y) is calculated as follows: y = 0.2007 x Xmx - 0.6312, where x indicates the memory capacity Xmx (GB) and y indicates the number of files (unit: kW). Adjust the memory size as required.

  4. Confirm that the value of GC_PROFILE is custom so that the GC_OPTS configuration takes effect. Click Save and choose More > Restart Instance to restart the service.

  5. Check whether the alarm is cleared.

    • If yes, no further action is required.

    • If no, go to 6.

Check whether needless files exist in the system.

  1. Log in to the HDFS client as user root. Run cd to switch to the client installation directory, and run source bigdata_env to configure the environment variables.

    If the cluster uses the security mode, perform security authentication.

    Run the kinit hdfs command and enter the password as prompted. Obtain the password from the MRS cluster administrator.

  2. Run hdfs dfs -ls file or directory to check whether the files in the directory can be deleted.

    • If yes, go to 8.

    • If no, go to 9.

  3. Run the hdfs dfs -rm -r file or directory path command. After deleting unnecessary files, wait until the files are retained in the recycle bin for a period longer than the value of fs.trash.interval on the NameNode. Then check whether the alarm is cleared.

    Note

    Deleting a file or folder is a high-risk operation. Ensure that the file or folder is no longer required before performing this operation.

    • If yes, no further action is required.

    • If no, go to 9.

Collect the fault information.

  1. On FusionInsight Manager, choose O&M > Log > Download.

  2. Expand the drop-down list next to the Service field. In the Services dialog box that is displayed, select HDFS for the target cluster.

  3. Click image1 in the upper right corner, and set Start Date and End Date for log collection to 10 minutes ahead of and after the alarm generation time, respectively. Then, click Download.

  4. Contact O&M personnel and provide the collected logs.

Alarm Clearing

This alarm is automatically cleared after the fault is rectified.