hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1238127 - in /hadoop/common/branches/branch-1.0: CHANGES.txt src/core/org/apache/hadoop/HadoopVersionAnnotation.java src/core/org/apache/hadoop/util/VersionInfo.java src/saveVersion.sh
Date Tue, 31 Jan 2012 01:44:50 GMT
Author: mattf
Date: Tue Jan 31 01:44:49 2012
New Revision: 1238127

URL: http://svn.apache.org/viewvc?rev=1238127&view=rev
Log:
merge c1229029 from branch-1, HADOOP-7960 Port HADOOP-5203 to BRANCH-1, build version comparison
is too restrictive.

Modified:
    hadoop/common/branches/branch-1.0/CHANGES.txt
    hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/HadoopVersionAnnotation.java
    hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/util/VersionInfo.java
    hadoop/common/branches/branch-1.0/src/saveVersion.sh

Modified: hadoop/common/branches/branch-1.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.0/CHANGES.txt?rev=1238127&r1=1238126&r2=1238127&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.0/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1.0/CHANGES.txt Tue Jan 31 01:44:49 2012
@@ -1,6 +1,6 @@
 Hadoop Change Log
 
-Release 1.0.1 - unreleased
+Release 1.0.1 - 2012.01.30
 
   NEW FEATURES
 
@@ -15,10 +15,13 @@ Release 1.0.1 - unreleased
 
   BUG FIXES
 
+    HADOOP-7960. Port HADOOP-5203 to branch-1, build version comparison is too 
+    restrictive. (mattf)
+
     HADOOP-7964. Deadlock in NetUtils and SecurityUtil class initialization.
     (Daryn Sharp via suresh)
 
-Release 1.0.0 - 2011.11.27
+Release 1.0.0 - 2011.12.15
 
   NEW FEATURES
 

Modified: hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/HadoopVersionAnnotation.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/HadoopVersionAnnotation.java?rev=1238127&r1=1238126&r2=1238127&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/HadoopVersionAnnotation.java
(original)
+++ hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/HadoopVersionAnnotation.java
Tue Jan 31 01:44:49 2012
@@ -53,4 +53,11 @@ public @interface HadoopVersionAnnotatio
    * @return the revision number as a string (eg. "451451")
    */
   String revision();
+
+  /**
+   * Get a checksum of the source files from which
+   * Hadoop was compiled.
+   * @return a string that uniquely identifies the source
+   **/
+  String srcChecksum();
 }

Modified: hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/util/VersionInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/util/VersionInfo.java?rev=1238127&r1=1238126&r2=1238127&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/util/VersionInfo.java (original)
+++ hadoop/common/branches/branch-1.0/src/core/org/apache/hadoop/util/VersionInfo.java Tue
Jan 31 01:44:49 2012
@@ -79,6 +79,14 @@ public class VersionInfo {
   public static String getUrl() {
     return version != null ? version.url() : "Unknown";
   }
+
+  /**
+   * Get the checksum of the source files from which Hadoop was
+   * built.
+   **/
+  public static String getSrcChecksum() {
+    return version != null ? version.srcChecksum() : "Unknown";
+  }
   
   /**
    * Returns the buildVersion which includes version, 
@@ -88,12 +96,14 @@ public class VersionInfo {
     return VersionInfo.getVersion() + 
     " from " + VersionInfo.getRevision() +
     " by " + VersionInfo.getUser() + 
-    " on " + VersionInfo.getDate();
+    " source checksum " + VersionInfo.getSrcChecksum();
   }
   
   public static void main(String[] args) {
     System.out.println("Hadoop " + getVersion());
     System.out.println("Subversion " + getUrl() + " -r " + getRevision());
     System.out.println("Compiled by " + getUser() + " on " + getDate());
+    System.out.println("From source with checksum " + getSrcChecksum());
+
   }
 }

Modified: hadoop/common/branches/branch-1.0/src/saveVersion.sh
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.0/src/saveVersion.sh?rev=1238127&r1=1238126&r2=1238127&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.0/src/saveVersion.sh (original)
+++ hadoop/common/branches/branch-1.0/src/saveVersion.sh Tue Jan 31 01:44:49 2012
@@ -33,15 +33,18 @@ else
   revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
   url=`svn info | sed -n -e 's/URL: \(.*\)/\1/p'`
 fi
+srcChecksum=`find src -name '*.java' | LC_ALL=C sort | xargs md5sum | md5sum | cut -d ' '
-f 1`
+
 mkdir -p $build_dir/src/org/apache/hadoop
 cat << EOF | \
   sed -e "s/VERSION/$version/" -e "s/USER/$user/" -e "s/DATE/$date/" \
-      -e "s|URL|$url|" -e "s/REV/$revision/" \
+      -e "s|URL|$url|" -e "s/REV/$revision/" -e "s/SRCCHECKSUM/$srcChecksum/" \
       > $build_dir/src/org/apache/hadoop/package-info.java
 /*
  * Generated by src/saveVersion.sh
  */
 @HadoopVersionAnnotation(version="VERSION", revision="REV", 
-                         user="USER", date="DATE", url="URL")
+                         user="USER", date="DATE", url="URL",
+                         srcChecksum="SRCCHECKSUM")
 package org.apache.hadoop;
 EOF



Mime
View raw message