|
@@ -147,7 +147,6 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
|
|
private boolean showLocations = false;
|
|
private boolean showLocations = false;
|
|
private boolean showRacks = false;
|
|
private boolean showRacks = false;
|
|
private boolean showStoragePolcies = false;
|
|
private boolean showStoragePolcies = false;
|
|
- private boolean showprogress = false;
|
|
|
|
private boolean showCorruptFileBlocks = false;
|
|
private boolean showCorruptFileBlocks = false;
|
|
|
|
|
|
private boolean showReplicaDetails = false;
|
|
private boolean showReplicaDetails = false;
|
|
@@ -249,7 +248,10 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
|
|
} else if (key.equals("storagepolicies")) {
|
|
} else if (key.equals("storagepolicies")) {
|
|
this.showStoragePolcies = true;
|
|
this.showStoragePolcies = true;
|
|
} else if (key.equals("showprogress")) {
|
|
} else if (key.equals("showprogress")) {
|
|
- this.showprogress = true;
|
|
|
|
|
|
+ out.println("The fsck switch -showprogress is deprecated and no " +
|
|
|
|
+ "longer has any effect. Progress is now shown by default.");
|
|
|
|
+ LOG.warn("The fsck switch -showprogress is deprecated and no longer " +
|
|
|
|
+ "has any effect. Progress is now shown by default.");
|
|
} else if (key.equals("openforwrite")) {
|
|
} else if (key.equals("openforwrite")) {
|
|
this.showOpenFiles = true;
|
|
this.showOpenFiles = true;
|
|
} else if (key.equals("listcorruptfileblocks")) {
|
|
} else if (key.equals("listcorruptfileblocks")) {
|
|
@@ -501,9 +503,8 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
|
|
void check(String parent, HdfsFileStatus file, Result replRes, Result ecRes)
|
|
void check(String parent, HdfsFileStatus file, Result replRes, Result ecRes)
|
|
throws IOException {
|
|
throws IOException {
|
|
String path = file.getFullName(parent);
|
|
String path = file.getFullName(parent);
|
|
- if (showprogress &&
|
|
|
|
- (totalDirs + totalSymlinks + replRes.totalFiles + ecRes.totalFiles)
|
|
|
|
- % 100 == 0) {
|
|
|
|
|
|
+ if ((totalDirs + totalSymlinks + replRes.totalFiles + ecRes.totalFiles)
|
|
|
|
+ % 1000 == 0) {
|
|
out.println();
|
|
out.println();
|
|
out.flush();
|
|
out.flush();
|
|
}
|
|
}
|
|
@@ -607,7 +608,7 @@ public class NamenodeFsck implements DataEncryptionKeyFactory {
|
|
} else if (showFiles) {
|
|
} else if (showFiles) {
|
|
out.print(path + " " + fileLen + " bytes, " + redundancyPolicy + " " +
|
|
out.print(path + " " + fileLen + " bytes, " + redundancyPolicy + " " +
|
|
blocks.locatedBlockCount() + " block(s): ");
|
|
blocks.locatedBlockCount() + " block(s): ");
|
|
- } else if (showprogress) {
|
|
|
|
|
|
+ } else if (res.totalFiles % 100 == 0) {
|
|
out.print('.');
|
|
out.print('.');
|
|
}
|
|
}
|
|
}
|
|
}
|