hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r407099 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/Block.java
Date Tue, 16 May 2006 23:00:20 GMT
Author: cutting
Date: Tue May 16 16:00:10 2006
New Revision: 407099

URL: http://svn.apache.org/viewcvs?rev=407099&view=rev
Log:
HADOOP-161.  Add hashCode() method to Block.  Contributed by Milind.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/Block.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/CHANGES.txt?rev=407099&r1=407098&r2=407099&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue May 16 16:00:10 2006
@@ -38,6 +38,9 @@
  9. HADOOP-218. Avoid accessing configuration while looping through
     tasks in JobTracker.  (Mahadev Konar via cutting)
 
+10. HADOOP-161. Add hashCode() method to DFS's Block.
+    (Milind Bhandarkar via cutting)
+
 
 Release 0.2.1 - 2006-05-12
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/Block.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/Block.java?rev=407099&r1=407098&r2=407099&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/Block.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/Block.java Tue May 16 16:00:10 2006
@@ -132,4 +132,8 @@
         Block b = (Block) o;
         return (this.compareTo(b) == 0);
     }
+    
+    public int hashCode() {
+        return 37 * 17 + (int) (getBlockId()^(getBlockId()>>>32));
+    }
 }



Mime
View raw message