From: <tho...@us...> - 2010-08-09 10:55:27
|
Revision: 3434 http://bigdata.svn.sourceforge.net/bigdata/?rev=3434&view=rev Author: thompsonbry Date: 2010-08-09 10:55:20 +0000 (Mon, 09 Aug 2010) Log Message: ----------- Added javadoc to PartitionLocator#equals(Object) describing the contract of partition equality (same partitionId for the same scale-out index) and the fact that some unit tests verify the PartitionLocator in detail. Those tests should factor out the in depth equality test so we can simplify PartitionLocator#equals(Object). Modified Paths: -------------- trunk/bigdata/src/java/com/bigdata/mdi/PartitionLocator.java Modified: trunk/bigdata/src/java/com/bigdata/mdi/PartitionLocator.java =================================================================== --- trunk/bigdata/src/java/com/bigdata/mdi/PartitionLocator.java 2010-08-08 15:57:40 UTC (rev 3433) +++ trunk/bigdata/src/java/com/bigdata/mdi/PartitionLocator.java 2010-08-09 10:55:20 UTC (rev 3434) @@ -185,6 +185,16 @@ } + /* + * @todo There are some unit tests which depend on this implementation of + * equals. However, since the partition locator Id for a given scale out + * index SHOULD be immutable, running code can rely on partitionId == + * o.partitionId. Therefore the unit tests should be modified to extract an + * "assertSamePartitionLocator" method and rely on that. We could then + * simplify this method to just test the partitionId. That would reduce the + * effort when maintaining hash tables based on the PartitionLocator since + * we would not be comparing the keys, UUIDs, etc. + */ public boolean equals(final Object o) { if (this == o) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |