HDFS-3918. EditLogTailer shouldn't log WARN when other node is in standby mode. Contributed by Todd Lipcon.

This commit is contained in:
Harsh J 2015-03-31 08:04:18 +05:30
parent 1a495fbb48
commit cce66ba3c9
2 changed files with 14 additions and 0 deletions

View File

@ -323,6 +323,9 @@ Release 2.8.0 - UNRELEASED
IMPROVEMENTS IMPROVEMENTS
HDFS-3918. EditLogTailer shouldn't log WARN when other node
is in standby mode (todd via harsh)
HDFS-4396. Add START_MSG/SHUTDOWN_MSG for ZKFC HDFS-4396. Add START_MSG/SHUTDOWN_MSG for ZKFC
(Liang Xie via harsh) (Liang Xie via harsh)

View File

@ -42,6 +42,8 @@ import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol; import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
import org.apache.hadoop.ipc.RPC; import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.ipc.StandbyException;
import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.security.SecurityUtil;
import static org.apache.hadoop.util.Time.monotonicNow; import static org.apache.hadoop.util.Time.monotonicNow;
@ -273,6 +275,15 @@ public class EditLogTailer {
getActiveNodeProxy().rollEditLog(); getActiveNodeProxy().rollEditLog();
lastRollTriggerTxId = lastLoadedTxnId; lastRollTriggerTxId = lastLoadedTxnId;
} catch (IOException ioe) { } catch (IOException ioe) {
if (ioe instanceof RemoteException) {
ioe = ((RemoteException)ioe).unwrapRemoteException();
if (ioe instanceof StandbyException) {
LOG.info("Skipping log roll. Remote node is not in Active state: " +
ioe.getMessage().split("\n")[0]);
return;
}
}
LOG.warn("Unable to trigger a roll of the active NN", ioe); LOG.warn("Unable to trigger a roll of the active NN", ioe);
} }
} }