[
https://issues.apache.org/jira/browse/HDFS-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Suresh Srinivas resolved HDFS-5765.
-----------------------------------
Resolution: Duplicate
Duplicate of HDFS-5343
> Snapshot file is broken after appending to original file
> --------------------------------------------------------
>
> Key: HDFS-5765
> URL: https://issues.apache.org/jira/browse/HDFS-5765
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 2.2.0
> Reporter: Guo Ruijing
>
> Reproduce Step
> 1) cat snapshot.sh
> sudo -u hdfs hdfs dfs -mkdir /test
> sudo -u hdfs hdfs dfsadmin -allowSnapshot /test
> rm -rf /tmp/mytest
> echo mytest > /tmp/mytest
> rm -rf /tmp/myappend
> echo myappend > /tmp/myappend
> sudo -u hdfs hdfs dfs -copyFromLocal /tmp/mytest /test
> sudo -u hdfs hdfs dfs -createSnapshot /test snap1
> sudo -u hdfs hdfs dfs -cat /test/.snapshot/snap1/mytest
> sudo -u hdfs hdfs dfs -appendToFile /tmp/myappend /test/mytest
> echo "expect mytest"
> sudo -u hdfs hdfs dfs -cat /test/.snapshot/snap1/mytest
> sudo -u hdfs hdfs dfs -deleteSnapshot /test/ snap1
> sudo -u hdfs hdfs dfsadmin -disallowSnapshot /test/
> sudo -u hdfs hdfs dfs -rm /test/mytest
> sudo -u hdfs hdfs dfs -rmdir /test/
> 2. Test result:
> [hadoop@localhost ~]$ ./snapshot.sh
> Allowing snaphot on /test succeeded
> Created snapshot /test/.snapshot/snap1
> mytest
> expect mytest
> mytest
> myappend <<< myappend is not expected
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)