HBASE-25146 Add extra logging at info level to HFileCorruptionChecker in order to report progress (#2503)
Signed-off-by: Wellington Chevreuil <wellington.chevreuil@gmail.com> Signed-off-by: Mate Szalay-Beko <szalay.beko.mate@gmail.com> Signed-off-by: Balazs Meszaros <meszibalu@apache.org>
This commit is contained in:
parent
9f238bd79e
commit
14b523ec98
|
@ -50,6 +50,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class marches through all of the region's hfiles and verifies that
|
* This class marches through all of the region's hfiles and verifies that
|
||||||
* they are all valid files. One just needs to instantiate the class, use
|
* they are all valid files. One just needs to instantiate the class, use
|
||||||
|
@ -180,6 +181,9 @@ public class HFileCorruptionChecker {
|
||||||
missing.add(cfDir);
|
missing.add(cfDir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("Checking Column Family Directory {}. Number of entries = {}", cfDir, hfs.size());
|
||||||
|
|
||||||
for (FileStatus hfFs : hfs) {
|
for (FileStatus hfFs : hfs) {
|
||||||
Path hf = hfFs.getPath();
|
Path hf = hfFs.getPath();
|
||||||
checkHFile(hf);
|
checkHFile(hf);
|
||||||
|
@ -213,6 +217,9 @@ public class HFileCorruptionChecker {
|
||||||
missedMobFiles.add(cfDir);
|
missedMobFiles.add(cfDir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("Checking MOB Column Family Directory {}. Number of entries = {}", cfDir, hfs.size());
|
||||||
|
|
||||||
for (FileStatus hfFs : hfs) {
|
for (FileStatus hfFs : hfs) {
|
||||||
Path hf = hfFs.getPath();
|
Path hf = hfFs.getPath();
|
||||||
checkMobFile(hf);
|
checkMobFile(hf);
|
||||||
|
@ -284,6 +291,9 @@ public class HFileCorruptionChecker {
|
||||||
missedMobFiles.add(regionDir);
|
missedMobFiles.add(regionDir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("Checking MOB Region Directory {}. Number of entries = {}", regionDir, hfs.length);
|
||||||
|
|
||||||
for (FileStatus hfFs : hfs) {
|
for (FileStatus hfFs : hfs) {
|
||||||
Path hf = hfFs.getPath();
|
Path hf = hfFs.getPath();
|
||||||
checkMobColFamDir(hf);
|
checkMobColFamDir(hf);
|
||||||
|
@ -318,6 +328,8 @@ public class HFileCorruptionChecker {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("Checking Region Directory {}. Number of entries = {}", regionDir, cfs.size());
|
||||||
|
|
||||||
for (FileStatus cfFs : cfs) {
|
for (FileStatus cfFs : cfs) {
|
||||||
Path cfDir = cfFs.getPath();
|
Path cfDir = cfFs.getPath();
|
||||||
checkColFamDir(cfDir);
|
checkColFamDir(cfDir);
|
||||||
|
@ -342,6 +354,8 @@ public class HFileCorruptionChecker {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("Checking Table Directory {}. Number of entries (including mob) = {}", tableDir, rds.size() + 1);
|
||||||
|
|
||||||
// Parallelize check at the region dir level
|
// Parallelize check at the region dir level
|
||||||
List<RegionDirChecker> rdcs = new ArrayList<>(rds.size() + 1);
|
List<RegionDirChecker> rdcs = new ArrayList<>(rds.size() + 1);
|
||||||
List<Future<Void>> rdFutures;
|
List<Future<Void>> rdFutures;
|
||||||
|
@ -546,6 +560,8 @@ public class HFileCorruptionChecker {
|
||||||
: "CORRUPTED";
|
: "CORRUPTED";
|
||||||
|
|
||||||
// print mob-related report
|
// print mob-related report
|
||||||
|
out.print("Checked " + mobFilesChecked.get() + " Mob files for corruption");
|
||||||
|
out.print(" Mob files corrupted: " + corruptedMobFiles.size());
|
||||||
if (inQuarantineMode) {
|
if (inQuarantineMode) {
|
||||||
out.print(" Mob files successfully quarantined: " + quarantinedMobFiles.size());
|
out.print(" Mob files successfully quarantined: " + quarantinedMobFiles.size());
|
||||||
for (Path sq : quarantinedMobFiles) {
|
for (Path sq : quarantinedMobFiles) {
|
||||||
|
|
Loading…
Reference in New Issue