From: Bryan T. <tho...@us...> - 2007-04-25 16:05:45
|
Update of /cvsroot/cweb/bigdata/src/java/com/bigdata/scaleup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11220/src/java/com/bigdata/scaleup Modified Files: MetadataIndex.java Log Message: Implemented range count for partitioned indices. Index: MetadataIndex.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/java/com/bigdata/scaleup/MetadataIndex.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MetadataIndex.java 25 Apr 2007 14:57:11 -0000 1.11 --- MetadataIndex.java 25 Apr 2007 16:05:37 -0000 1.12 *************** *** 327,335 **** * @return The partition spanning the given key or <code>null</code> if * there are no partitions defined. - * - * FIXME offer a variant that reports the index partitions spanned by a key - * range and write tests for that. Note that the remote API for that method - * should use a result-set data model to efficiently communicate the data - * when there are a large #of spanned partitions. */ public PartitionMetadata find(byte[] key) { --- 327,330 ---- *************** *** 339,343 **** if(index == -1) return null; ! byte[] val = (byte[]) super.valueAt(index); return (PartitionMetadata) SerializerUtil.deserialize(val); --- 334,338 ---- if(index == -1) return null; ! byte[] val = (byte[]) valueAt(index); return (PartitionMetadata) SerializerUtil.deserialize(val); *************** *** 357,361 **** public PartitionMetadata get(byte[] key) { ! byte[] val = (byte[]) super.lookup(key); if(val==null) return null; --- 352,356 ---- public PartitionMetadata get(byte[] key) { ! byte[] val = (byte[]) lookup(key); if(val==null) return null; *************** *** 392,396 **** byte[] newval = SerializerUtil.serialize(val); ! byte[] oldval2 = (byte[])super.insert(key, newval); PartitionMetadata oldval = oldval2 == null ? null --- 387,391 ---- byte[] newval = SerializerUtil.serialize(val); ! byte[] oldval2 = (byte[])insert(key, newval); PartitionMetadata oldval = oldval2 == null ? null |