Ke Han created HDFS-17207:
-----------------------------
Summary: Negative REM_DISK_QUOTA when using COUNT command
Key: HDFS-17207
URL: https://issues.apache.org/jira/browse/HDFS-17207
Project: Hadoop HDFS
Issue Type: Bug
Affects Versions: 3.3.6, 3.2.4
Reporter: Ke Han
When running HDFS 4 node cluster, I noticed an incorrect REM_DISK_QUOTA when
using count command. I only uploaded a 32K file, but the remaining disk quota
becomes a strange negative large value.
h1. Reproduce
Start up HDFS 3.3.6 cluster, and execute the following commands
{code:java}
bin/hdfs dfs -mkdir /GvvSzRSH
bin/hdfs dfs -put -p /tmp/dBJShMmu/G /GvvSzRSH/
bin/hdfs dfsadmin -setSpaceQuota 10K -storageType PROVIDED /GvvSzRSH/
bin/hdfs dfs -appendToFile /tmp/dBJShMmu/G /GvvSzRSH/G
bin/hdfs dfsadmin -setSpaceQuota 80K -storageType DISK /GvvSzRSH/
bin/hdfs dfs -count -q -h -v -x -t DISK /GvvSzRSH/{code}
The local file system contains /tmp/dBJShMmu/G file whose size is 32KB.
The result from the count is strange: -255.9 M. A large negative value.
{code:java}
root@e112913e4d39:/# bin/hdfs dfs -count -q -h -v -x -t DISK /GvvSzRSH/
q or u option is given, the -x option is ignored.
DISK_QUOTA REM_DISK_QUOTA PATHNAME
80 K -255.9 M /GvvSzRSH{code}
The cluster only contains the file I just uploaded.
If I restart the namenode, the value of REM_DISK_QUOTA changes to 80KB. But it
seems still incorrect because it doesn't count the file I just uploaded. The
value should be 48 KB.
The commands above have been minimized. Setting PROVIDED quota and append
operations are both required to trigger it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]