Skip to content

Commit 4ad4045

Browse files
aswinmprabhuAswin M Prabhu
authored andcommitted
Retry formatting on startup as well
1 parent d1fd1c1 commit 4ad4045

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,11 @@ private boolean getOtherJournalNodeProxies() {
175175

176176
private void startSyncJournalsDaemon() {
177177
syncJournalDaemon = new Daemon(() -> {
178-
// Format the journal with namespace info from the other JNs if it is not formatted
179-
if (!journal.isFormatted()) {
180-
formatWithSyncer();
181-
}
182178
// Wait for journal to be formatted to create edits.sync directory
183179
while(!journal.isFormatted()) {
184180
try {
181+
// Format the journal with namespace info from the other JNs if it is not formatted
182+
formatWithSyncer();
185183
Thread.sleep(journalSyncInterval);
186184
} catch (InterruptedException e) {
187185
LOG.error("JournalNodeSyncer daemon received Runtime exception.", e);

0 commit comments

Comments
 (0)