0
点赞
收藏
分享

微信扫一扫

查看 hdfs snapshot counter 值


ssh $(hdfs haadmin -getAllServiceState | grep active | awk -F ':' '{print $1}') "NN_DIR=$(hdfs getconf -confKey 'dfs.namenode.name.dir'); FSIMAGE_NAME=$(ls -t $NN_DIR/current | grep fsimage | grep -v md5 | head -n 1); hdfs oiv -i $NN_DIR/current/$FSIMAGE_NAME -o $FSIMAGE_NAME.xml -p XML -t ./; grep '<snapshotCounter>' $FSIMAGE_NAME.xml | sed  's/.*<snapshotCounter>\([0-9]*\)<\/snapshotCounter>.*/\1/g' && rm $FSIMAGE_NAME.xml"

$ hadoop version
Hadoop 3.1.1.3.1.4.0-315

查看 hdfs snapshot counter 值_hadoop

举报

相关推荐

0 条评论