hdfs openforwrite recoverLease

hdfs fsck /xx/origin_table_files/ods_event/pt_date=20191016 -openforwrite | grep -v ".tmp"

 

cat 3.txt  | sed 's/OPENFORWRITE:/\n/g'| grep -o "pt_date=.* bytes" | sed 's/: MISSING/\n/g' | sed 's/.\+blocks of total size.\+//g' 

 

cat 3.txt  | sed 's/OPENFORWRITE:/\n/g'| grep -o "pt_date=.* bytes" | sed 's/\/dataplat_rom/\n\/dataplat_rom/g'

cat 3.txt  | sed 's/OPENFORWRITE:/\n/g'| grep -o "pt_date=.* bytes" | sed 's/\/dataplat_rom/\n\/dataplat_rom/g' | sed 's/^pt_date.*//g'

 

 

 sed '%s/\(\d{13}\)/\1\n/g'

 

$ cat /tmp/hdfs_errorStatus.list | sed 's/OPENFORWRITE:/\n/g' | grep -o "/PATH/.* bytes" | awk '{print $1}' | while read File;do hadoop debug recoverLease -path ${File} -retries 10;done

 

 

你可能感兴趣的:(hadoop)