Reply
Explorer
Posts: 38
Registered: ‎09-29-2015

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

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: File is empty but still replication is showing

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...
Highlighted
Explorer
Posts: 38
Registered: ‎09-29-2015

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]$