Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.2.0
-
None
-
None
Description
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