Hadoop Common
  1. Hadoop Common
  2. HADOOP-6175

Incorret version compilation with es_ES.ISO8859-15 locale on Solaris 10

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.0
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • Environment:

      SunOS 5.10
      Locale:
      LC_CTYPE=es_ES.ISO8859-15
      LC_NUMERIC=es_ES.ISO8859-15
      LC_TIME=es_ES.ISO8859-15
      LC_COLLATE=es_ES.ISO8859-15
      LC_MONETARY=es_ES.ISO8859-15
      LC_MESSAGES=es

    • Hadoop Flags:
      Reviewed

      Description

      When you compile hadoop on Solaris 10 with locale es_ES.ISO8859-15 the src/saveVersion.sh script generates incorrect date on build/src/org/apache/hadoop/package-info.java

      The ploblem is that the saveVersion.sh script unsets the LC_CTYPE to avoid the problem, but on Solaris the date command uses the LC_TIME enviroment variable as you can see at the man page

      Specifications of native language translations of month  and
      weekday  names  are  supported.  The month and weekday names
      used for a language are based on the locale specified by the
      environment variable LC_TIME. See environ(5).
      

      Here's an example about date on Solaris

      $ echo $LC_CTYPE
      es_ES.ISO8859-15
      $ echo $LC_TIME
      es_ES.ISO8859-15
      $ date
      lunes 3 de agosto de 2009 11H10'25" CEST
      $ unset LC_TYPE
      $ date
      lunes 3 de agosto de 2009 11H10'31" CEST
      $ unset LC_TIME
      $ date
      Mon Aug 3 11:10:35 CEST 2009

      So the saveVersion.sh script creates the package-info.java file as

      /*
       * Generated by src/saveVersion.sh
       */
      @HadoopVersionAnnotation(version="0.20.1-dev", revision="",
                               user="itily", date="lunes  3 de agosto de 2009 11H16'01" CEST", url="http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.0")
      package org.apache.hadoop;
      

      And if you run hadoop with version argument it's says "Unknow", here's an example

      $ hadoop version
      Hadoop Unknown
      Subversion Unknown -r Unknown
      Compiled by Unknown on Unknown

      To solve this issue is as simple as adding

      unset LC_TIME

      to saveVersion.sh script, and the output is as C locale as

      /*
       * Generated by src/saveVersion.sh
       */
      @HadoopVersionAnnotation(version="0.20.1-dev", revision="",
                               user="itily", date="Mon Aug  3 11:19:41 CEST 2009", url="http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.0")
      package org.apache.hadoop;
      
      1. HADOOP-6175.patch
        0.3 kB
        Urko Benito

        Activity

        Hide
        Urko Benito added a comment -

        Here's a patch to solve the issue, adding
        unset LC_TIME

        Show
        Urko Benito added a comment - Here's a patch to solve the issue, adding unset LC_TIME
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12415330/HADOOP-6175.patch
        against trunk revision 921980.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

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

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

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

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/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/12415330/HADOOP-6175.patch against trunk revision 921980. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/34/console This message is automatically generated.
        Hide
        Tom White added a comment -

        +1 I've just committed this. Thanks Urko!

        Show
        Tom White added a comment - +1 I've just committed this. Thanks Urko!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #285 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/285/)
        . Incorrect version compilation with es_ES.ISO8859-15 locale on Solaris 10. Contributed by Urko Benito.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #285 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/285/ ) . Incorrect version compilation with es_ES.ISO8859-15 locale on Solaris 10. Contributed by Urko Benito.

          People

          • Assignee:
            Urko Benito
            Reporter:
            Urko Benito
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development