Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-309

NullPointerException in StatusHttpServer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.1
    • Fix Version/s: 0.11.0
    • Component/s: None
    • Labels:
      None

      Description

      The NullPointerException happens in the constructor of StatusHttpServer because the System property "hadoop.log.dir" is undefined.
      I see it trying to start the Namenode directly without using any scripts.

      Exception in thread "main" java.lang.NullPointerException
      at org.mortbay.util.Resource.newResource(Resource.java:99)
      at org.mortbay.http.ResourceCache.setResourceBase(ResourceCache.java:140)
      at org.mortbay.http.HttpContext.setResourceBase(HttpContext.java:2207)
      at org.apache.hadoop.mapred.StatusHttpServer.<init>(StatusHttpServer.java:66)
      at org.apache.hadoop.dfs.FSNamesystem.<init>(FSNamesystem.java:172)
      at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:97)
      at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:88)
      at org.apache.hadoop.dfs.NameNode.main(NameNode.java:496)

      In general I think the sources should not rely on the system properties and environment variables defined in hadoop scripts.

        Attachments

        1. 309.patch
          1 kB
          navychen

          Activity

            People

            • Assignee:
              navychen navychen
              Reporter:
              shv Konstantin Shvachko
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: