2017年2月12日日曜日

備忘録:もしNumber of Under-Replicated Blocksが減らない場合チェックすること

NameNodeログ
INFO  BlockStateChange (BlockManager.java:computeReplicationWorkForBlocks(1527)) - BLOCK* neededReplications = 2030564, pendingReplications = 1497.
INFO  blockmanagement.BlockManager (BlockManager.java:computeReplicationWorkForBlocks(1534)) - Blocks chosen but could not be replicated = 20; of which 0 have no target, 20 have no source, 0 are UC, 0 are abandoned, 0 already have enough replicas.



最終手段的に、再度Replicateしてみる
https://community.hortonworks.com/articles/4427/fix-under-replicated-blocks-in-hdfs-manually.html

su - <$hdfs_user>

hdfs fsck / | grep 'Under replicated' | awk -F':' '{print $1}' >> /tmp/under_replicated_files 

for hdfsfile in `cat /tmp/under_replicated_files`; do echo "Fixing $hdfsfile :" ;  hadoop fs -setrep 3 $hdfsfile; done



0 件のコメント:

コメントを投稿