Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

File is empty but still replication is showing

File is empty but still replication is showing

Hi All, 

 

Recently I deleted a file from hdfs and it is showing empty now but still replication factor exists .. How to resolve this ? 

 

[ganta.k@hostname1~]$ hadoop fs -du -h /tmp/testing_file1
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p1464.1349/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/oracle/bda/bdcs/bdcs-rest-api-app/current/lib-hadoop/downloadcli.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
0 16.0 T /tmp/testing_file1

Thanks

Kishore

2 REPLIES 2

Re: File is empty but still replication is showing

Master Guru
Could you check also if you have snapshots held on / or /tmp that may be
referencing the older file(s)?

Snapshot administrative commands are listed here:
http://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html#Use...

Re: File is empty but still replication is showing

Hi Harsh,

 

I don't see any snapshot files/directory under snapshottable directory in my case /data which I found with command. 

 

[hadoopuser@hostname]$ hdfs lsSnapshottableDir
drwxr-xr-x 0 hdfs supergroup 0 2016-06-08 01:51 1 65536 /data

[hadoopuser@hostname]$