Details
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;