HDFS-15229. Truncate info should be logged at INFO level. Contributed by Ravuri Sushma sree.
This commit is contained in:
parent
5323e83edf
commit
528a799a78
@ -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(
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user