Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4210

Throw helpful exception when DNS entry for JournalNode cannot be resolved

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Setting :
      qjournal://cdh4master01:8485;cdh4master02:8485;cdh4worker03:8485/hdfscluster
      cdh4master01 and cdh4master02 JournalNode up and running,
      cdh4worker03 not yet provisionning (no DNS entrie)

      With :
      `hadoop namenode -format` fails with :
      12/11/19 14:42:42 FATAL namenode.NameNode: Exception in namenode join
      java.lang.IllegalArgumentException: Unable to construct journal, qjournal://cdh4master01:8485;cdh4master02:8485;cdh4worker03:8485/hdfscluster
      at org.apache.hadoop.hdfs.server.namenode.FSEditLog.createJournal(FSEditLog.java:1235)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:226)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:193)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:745)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1099)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1204)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.apache.hadoop.hdfs.server.namenode.FSEditLog.createJournal(FSEditLog.java:1233)
      ... 5 more
      Caused by: java.lang.NullPointerException
      at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannelMetrics.getName(IPCLoggerChannelMetrics.java:107)
      at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannelMetrics.create(IPCLoggerChannelMetrics.java:91)
      at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel.<init>(IPCLoggerChannel.java:161)
      at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$1.createLogger(IPCLoggerChannel.java:141)
      at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.createLoggers(QuorumJournalManager.java:353)
      at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.createLoggers(QuorumJournalManager.java:135)
      at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.<init>(QuorumJournalManager.java:104)
      at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.<init>(QuorumJournalManager.java:93)
      ... 10 more

      I suggest that if quorum is up format should not fails.

        Attachments

        1. HDFS-4210.004.patch
          4 kB
          John Zhuge
        2. HDFS-4210.003.patch
          4 kB
          John Zhuge
        3. HDFS-4210.002.patch
          4 kB
          John Zhuge
        4. HDFS-4210.001.patch
          3 kB
          Charles Lamb

          Issue Links

            Activity

              People

              • Assignee:
                jzhuge John Zhuge
                Reporter:
                dam_ned Damien Hardy
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: