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);
FSDirTruncateOp.TruncateResult r = null;
try {
NameNode.stateChangeLog.debug(
NameNode.stateChangeLog.info(
"DIR* NameSystem.truncate: src={} newLength={}", src, newLength);
if (newLength < 0) {
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)
throws IOException {
checkNNStartup();
if(stateChangeLog.isDebugEnabled()) {
stateChangeLog.debug("*DIR* NameNode.truncate: " + src + " to " +
newLength);
}
stateChangeLog
.debug("*DIR* NameNode.truncate: " + src + " to " + newLength);
String clientMachine = getClientMachine();
try {
return namesystem.truncate(