Created
April 7, 2016 18:06
-
-
Save gbraccialli/352da50e0773f8db25728b79c5e3bb32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadoop fs -rm -r -f /tmp/test_snapshot | |
hadoop fs -mkdir /tmp/test_snapshot | |
hadoop fs -put x.txt /tmp/test_snapshot | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
(execute as hdfs user) | |
hdfs dfsadmin -allowSnapshot /tmp/test_snapshot/ | |
hadoop fs -createSnapshot /tmp/test_snapshot/ snapshot1 | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -rm /tmp/test_snapshot/x.txt | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -put x.txt /tmp/test_snapshot | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -rm /tmp/test_snapshot/x.txt | |
hadoop fs -put x.txt /tmp/test_snapshot/y.txt | |
hadoop fs -put x.txt /tmp/test_snapshot/z.txt | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -createSnapshot /tmp/test_snapshot/ snapshot2 | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -cp /tmp/test_snapshot/.snapshot/snapshot1/x.txt /tmp/test_snapshot | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -deleteSnapshot /tmp/test_snapshot/ snapshot1 | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots | |
hadoop fs -rm /tmp/test_snapshot/x.txt | |
hadoop fsck /tmp/test_snapshot/ -files -blocks -locations -includeSnapshots |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment