Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using HDFS/ FAQ/ Why Is the Storage Type of File Copies DISK When the Tiered Storage Policy Is LAZY_PERSIST?
Updated on 2024-11-29 GMT+08:00

Why Is the Storage Type of File Copies DISK When the Tiered Storage Policy Is LAZY_PERSIST?

Question

When the storage policy of the file is set to LAZY_PERSIST, the storage type of the first replica should be RAM_DISK, and the storage type of other replicas should be DISK.

But why is the storage type of all copies shown as DISK actually?

Answer

When a user writes into a file whose storage policy is LAZY_PERSIST, three replicas are written one by one. The first replica is preferentially written into the DataNode where the client is located. The storage type of all replicas is DISK in the following scenarios:

  • If the DataNode where the client is located does not have the RAM disk, the first replica is written into the disk of the DataNode where the client is located, and other replicas are written into the disks of other nodes.
  • If the DataNode where the client is located has the RAM disk, but the value of dfs.datanode.max.locked.memory is not set or is set to a value less than dfs.blocksize, the first replica is written into the disk of the DataNode where the client is located, and other replicas are written into the disks of other nodes. (To check the parameter value, log in to FusionInsight Manager and choose Cluster > Services > HDFS. On the displayed page, click Configurations > All Configurations, and search the parameter.)