HDFS-15229. Truncate info should be logged at INFO level. Contributed by Ravuri Sushma sree.

This commit is contained in:
hemanthboyina 2020-08-02 12:02:37 +05:30
parent 5323e83edf
commit 528a799a78
2 changed files with 3 additions and 5 deletions

View File

@ -2270,7 +2270,7 @@ boolean truncate(String src, long newLength, String clientName,
requireEffectiveLayoutVersionForFeature(Feature.TRUNCATE); requireEffectiveLayoutVersionForFeature(Feature.TRUNCATE);
FSDirTruncateOp.TruncateResult r = null; FSDirTruncateOp.TruncateResult r = null;
try { try {
NameNode.stateChangeLog.debug( NameNode.stateChangeLog.info(
"DIR* NameSystem.truncate: src={} newLength={}", src, newLength); "DIR* NameSystem.truncate: src={} newLength={}", src, newLength);
if (newLength < 0) { if (newLength < 0) {
throw new HadoopIllegalArgumentException( throw new HadoopIllegalArgumentException(

View File

@ -1100,10 +1100,8 @@ public void rename2(String src, String dst, Options.Rename... options)
public boolean truncate(String src, long newLength, String clientName) public boolean truncate(String src, long newLength, String clientName)
throws IOException { throws IOException {
checkNNStartup(); checkNNStartup();
if(stateChangeLog.isDebugEnabled()) { stateChangeLog
stateChangeLog.debug("*DIR* NameNode.truncate: " + src + " to " + .debug("*DIR* NameNode.truncate: " + src + " to " + newLength);
newLength);
}
String clientMachine = getClientMachine(); String clientMachine = getClientMachine();
try { try {
return namesystem.truncate( return namesystem.truncate(