[
https://issues.apache.org/jira/browse/HDFS-7650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prateek Gaur updated HDFS-7650:
-------------------------------
Attachment: hdfs_config
> Snapshot Corruption for OPENFORWRITE files
> ------------------------------------------
>
> Key: HDFS-7650
> URL: https://issues.apache.org/jira/browse/HDFS-7650
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.5.1
> Reporter: Prateek Gaur
> Attachments: hdfs_config
>
>
> I have encountered snapshot corruption issue when creating a snapshot while
> some files were open for being written.
> Attached are the sample config and program that I have written that try to
> reproduce the issue.
> After taking the snapshot : the OPENFORWRITE file is shown as corrupted with
> size 0 and 1 block missing.
> Output of fsck :
> Command: path/to/hadoop-2.5.1/bin/hdfs fsck -conf /tmp/hdfs_config.UKhJXu
> -includeSnapshots /.snapshot/test_snapshot -files exit_code 256 Output: FSCK
> started by prateek (auth:SIMPLE) from /127.0.0.1 for path
> /.snapshot/test_snapshot at Tue Jan 20 17:34:07 PST 2015
> /.snapshot/test_snapshot <dir>
> /.snapshot/test_snapshot/b <dir>
> /.snapshot/test_snapshot/b/c 0 bytes, 1 block(s): MISSING 1 blocks of total
> size 0 B
> Status: CORRUPT
> Total size: 0 B
> Total dirs: 2
> Total files: 1
> Total symlinks: 0
> Total blocks (validated): 1 (avg. block size 0 B)
> ********************************
> CORRUPT FILES: 1
> ********************************
> Minimally replicated blocks: 0 (0.0 %)
> Over-replicated blocks: 0 (0.0 %)
> Under-replicated blocks: 0 (0.0 %)
> Mis-replicated blocks: 0 (0.0 %)
> Default replication factor: 3
> Average block replication: 0.0
> Corrupt blocks: 0
> Missing replicas: 0
> Number of data-nodes: 1
> Number of racks: 1
> FSCK ended at Tue Jan 20 17:34:07 PST 2015 in 3 milliseconds
> The filesystem under path '/.snapshot/test_snapshot' is CORRUPT
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)