HDFS-3918. EditLogTailer shouldn't log WARN when other node is in standby mode. Contributed by Todd Lipcon.
(cherry picked from commit cce66ba3c9ec293e8ba1afd0eb518c7ca0bbc7c9)
This commit is contained in:
parent
abf3ad988d
commit
32766b6563
@ -8,6 +8,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)
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
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 @@ private void triggerActiveLogRoll() {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user