Created
July 1, 2015 02:19
-
-
Save xman1980/00f70f74f6c2a1919488 to your computer and use it in GitHub Desktop.
fix_replicas
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
for f in `hadoop fsck / | grep "Replica placement policy is violated" | |
| head -n3000 | awk -F: '{print $1}'`; do | |
hadoop fs -setrep 4 $f | |
hadoop fs -setrep 3 $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment