HDFS-9332. Fix Precondition failures from NameNodeEditLogRoller while saving namespace.
(cherry picked from commit 888c6245e2
)
This commit is contained in:
parent
30791cb0d0
commit
5e5e693a0a
|
@ -1361,6 +1361,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9044. Give Priority to FavouredNodes , before selecting
|
HDFS-9044. Give Priority to FavouredNodes , before selecting
|
||||||
nodes from FavouredNode's Node Group (J.Andreina via vinayakumarb)
|
nodes from FavouredNode's Node Group (J.Andreina via vinayakumarb)
|
||||||
|
|
||||||
|
HDFS-9332. Fix Precondition failures from NameNodeEditLogRoller while
|
||||||
|
saving namespace. (wang)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -3674,9 +3674,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
||||||
public void run() {
|
public void run() {
|
||||||
while (fsRunning && shouldRun) {
|
while (fsRunning && shouldRun) {
|
||||||
try {
|
try {
|
||||||
FSEditLog editLog = getFSImage().getEditLog();
|
long numEdits = getTransactionsSinceLastLogRoll();
|
||||||
long numEdits =
|
|
||||||
editLog.getLastWrittenTxId() - editLog.getCurSegmentTxId();
|
|
||||||
if (numEdits > rollThreshold) {
|
if (numEdits > rollThreshold) {
|
||||||
FSNamesystem.LOG.info("NameNode rolling its own edit log because"
|
FSNamesystem.LOG.info("NameNode rolling its own edit log because"
|
||||||
+ " number of edits in open segment exceeds threshold of "
|
+ " number of edits in open segment exceeds threshold of "
|
||||||
|
|
Loading…
Reference in New Issue