Hadoop Common
  1. Hadoop Common
  2. HADOOP-2456

German locale makes NameNode web interface crash

    Details

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

      Ubuntu Linux 7.10

      Description

      When starting the NameNode with a German locale (or some other that uses "," as the decimal separator), the web interface (dfshealth.jsp) crashes with a NumberFormatException.

      To reproduce:

      $ LC_ALL=de_DE bin/start-dfs.sh

      Then copy some data to the store so that the percentage of used space is above 0%. Load the web interface in your browser and you'll get a HTTP 500 error message.

      The problem is that FsShell gives you a localized number (eg. "0,7") which can't be parsed by Double.parseDouble().

      1. number-format-fix.patch
        1.0 kB
        Matthias Friedrich
      2. namenode-log.txt
        2 kB
        Matthias Friedrich

        Activity

        Hide
        Matthias Friedrich added a comment -

        The stack trace from my namenode log.

        Show
        Matthias Friedrich added a comment - The stack trace from my namenode log.
        Hide
        Matthias Friedrich added a comment -

        A quick fix to hardcode the locale to English. It's not nice, but I think the whole FsShell and dfshealth.jsp page could use a bit of love.

        Show
        Matthias Friedrich added a comment - A quick fix to hardcode the locale to English. It's not nice, but I think the whole FsShell and dfshealth.jsp page could use a bit of love.
        Hide
        Matthias Friedrich added a comment -

        Upload patch again, this time with correct file suffix.

        Show
        Matthias Friedrich added a comment - Upload patch again, this time with correct file suffix.
        Hide
        Matthias Friedrich added a comment -

        Quick fix patch to use English locale to avoid number formatting trouble.

        Show
        Matthias Friedrich added a comment - Quick fix patch to use English locale to avoid number formatting trouble.
        Hide
        Raghu Angadi added a comment -

        If it is better, you can declare decimalFormat as a numberformat, then we don't need a cast.

        Show
        Raghu Angadi added a comment - If it is better, you can declare decimalFormat as a numberformat, then we don't need a cast.
        Hide
        Matthias Friedrich added a comment -

        Unfortunately, NumberFormat doesn't have the applyPattern() method. So I'm afraid, we can't get rid of the cast.

        Show
        Matthias Friedrich added a comment - Unfortunately, NumberFormat doesn't have the applyPattern() method. So I'm afraid, we can't get rid of the cast.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12372034/number-format-fix.patch
        against trunk revision r605976.

        @author +1. The patch does not contain any @author tags.

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new compiler warnings.

        findbugs +1. The patch does not introduce any new Findbugs warnings.

        core tests +1. The patch passed core unit tests.

        contrib tests +1. The patch passed contrib unit tests.

        Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/testReport/
        Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12372034/number-format-fix.patch against trunk revision r605976. @author +1. The patch does not contain any @author tags. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new compiler warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/testReport/ Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/artifact/trunk/build/test/checkstyle-errors.html Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1410/console This message is automatically generated.
        Hide
        Raghu Angadi added a comment -

        +1.

        Show
        Raghu Angadi added a comment - +1.
        Hide
        Manuel Meßner added a comment -

        +1

        Show
        Manuel Meßner added a comment - +1
        Hide
        Nigel Daley added a comment -

        I just committed this. Thanks Matthias!

        Show
        Nigel Daley added a comment - I just committed this. Thanks Matthias!
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-Nightly #349 (See http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/349/ )

          People

          • Assignee:
            Matthias Friedrich
            Reporter:
            Matthias Friedrich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development