You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(414) |
Apr
(123) |
May
(448) |
Jun
(180) |
Jul
(17) |
Aug
(49) |
Sep
(3) |
Oct
(92) |
Nov
(101) |
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(132) |
Feb
(230) |
Mar
(146) |
Apr
(146) |
May
|
Jun
|
Jul
(34) |
Aug
(4) |
Sep
(3) |
Oct
(10) |
Nov
(12) |
Dec
(24) |
2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(4) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Bryan T. <tho...@us...> - 2007-12-06 12:09:59
|
Update of /cvsroot/cweb/gom-for-jdbm In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv339 Modified Files: project.xml Log Message: trying to converge dependencies. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/gom-for-jdbm/project.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** project.xml 5 Dec 2007 16:41:33 -0000 1.11 --- project.xml 6 Dec 2007 12:09:53 -0000 1.12 *************** *** 241,245 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-generic-test</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 241,245 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-generic-test</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:39
|
Update of /cvsroot/cweb/generic-api In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8448 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/generic-api/project.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** project.xml 27 May 2006 21:59:01 -0000 1.18 --- project.xml 5 Dec 2007 16:41:36 -0000 1.19 *************** *** 210,214 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 210,214 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:36
|
Update of /cvsroot/cweb/gom-for-jdbm In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8436 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/gom-for-jdbm/project.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** project.xml 4 Jun 2006 23:45:05 -0000 1.10 --- project.xml 5 Dec 2007 16:41:33 -0000 1.11 *************** *** 217,221 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 217,221 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:34
|
Update of /cvsroot/cweb/generic-ctc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8427 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/generic-ctc/project.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** project.xml 30 Jul 2006 13:42:34 -0000 1.24 --- project.xml 5 Dec 2007 16:41:30 -0000 1.25 *************** *** 166,170 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 166,170 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:32
|
Update of /cvsroot/cweb/generic-test/src/java/org/CognitiveWeb/generic In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8411/src/java/org/CognitiveWeb/generic Modified Files: IObjectManagerProxyTestCase.java ILinkSetIndexProxyTestCase.java Log Message: updated dependency version for junit-ext. Index: ILinkSetIndexProxyTestCase.java =================================================================== RCS file: /cvsroot/cweb/generic-test/src/java/org/CognitiveWeb/generic/ILinkSetIndexProxyTestCase.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ILinkSetIndexProxyTestCase.java 2 Jun 2006 18:01:01 -0000 1.18 --- ILinkSetIndexProxyTestCase.java 5 Dec 2007 16:41:27 -0000 1.19 *************** *** 54,79 **** /** ! * Tests for the {@link ILinkSetIndex} interface.<p> ! * ! * @todo Develop variant of test suite for unique indices, for indices ! * over the date and number generic value types, and for at least one ! * unicode collation sequence. Note that there is no mechanisms in ! * the API to request such indices at this time. ! * ! * @todo Develop tests when all objects in the link set are being ! * indexed (so duplicate keys are supported) that checks the correct ! * ordering of the objects lacking a binding on the value property to ! * the start (or end) of the index ("sort nulls to end?"). ! * ! * @todo Add examples in which the application key is coerced into the ! * natural data type for the index. For example, a String ! * representation of a date is parsed to get a {@link Date} for a date ! * index or a {@link Number} and {@link Date} are converted into a ! * Unicode representation for a unicode index. ! * ! * @todo Can we have tests for heterogeneous key types here (a ! * DWIMIndex) or should we only test for homogeneous key types, in ! * which case we still need tests for the following core generic ! * types: number and date. */ --- 54,84 ---- /** ! * Tests for the {@link ILinkSetIndex} interface. ! * <p> ! * <p> ! * Note: These tests are not super aware of Unicode collation ordering. They ! * were originally written to use "\0" to create the successor of a String, but ! * the trailing nul is typically ignored when a sort key is created from Unicode ! * text by a collator. ! * ! * @todo Develop variant of test suite for unique indices, for indices over the ! * date and number generic value types, and for at least one unicode ! * collation sequence. Note that there is no mechanisms in the API to ! * request such indices at this time. ! * ! * @todo Develop tests when all objects in the link set are being indexed (so ! * duplicate keys are supported) that checks the correct ordering of the ! * objects lacking a binding on the value property to the start (or end) ! * of the index ("sort nulls to end?"). ! * ! * @todo Add examples in which the application key is coerced into the natural ! * data type for the index. For example, a String representation of a date ! * is parsed to get a {@link Date} for a date index or a {@link Number} ! * and {@link Date} are converted into a Unicode representation for a ! * unicode index. ! * ! * @todo Can we have tests for heterogeneous key types here (a DWIMIndex) or ! * should we only test for homogeneous key types, in which case we still ! * need tests for the following core generic types: number and date. */ *************** *** 1397,1402 **** assertSameIndexRanges // {a,a} ( new IGeneric[][]{new IGeneric[]{g2,g4}}, ! ndx.getRangeCount( "a", "a\0" ), // successor idiom ! ndx.getRange( "a", "a\0" ) // successor idiom ); --- 1402,1413 ---- assertSameIndexRanges // {a,a} ( new IGeneric[][]{new IGeneric[]{g2,g4}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getRangeCount( "a", "a\0" ), // successor idiom ! // ndx.getRange( "a", "a\0" ) // successor idiom ! ndx.getRangeCount( "a", "aa" ), // successor idiom ! ndx.getRange( "a", "aa" ) // successor idiom ); *************** *** 1418,1429 **** ( new IGeneric[][]{new IGeneric[]{g3}, new IGeneric[]{g5,g6}}, ! ndx.getRangeCount( "b", "c\0" ), // successor idiom. ! ndx.getRange( "b", "c\0" ) // successor idiom ); assertSameIndexRanges // { { c, c } } ( new IGeneric[][]{new IGeneric[]{g5,g6}}, ! ndx.getRangeCount( "c", "c\0" ), // successor idiom. ! ndx.getRange( "c", "c\0" ) // successor idiom ); --- 1429,1452 ---- ( new IGeneric[][]{new IGeneric[]{g3}, new IGeneric[]{g5,g6}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getRangeCount( "b", "c\0" ), // successor idiom. ! // ndx.getRange( "b", "c\0" ) // successor idiom ! ndx.getRangeCount( "b", "ca" ), // successor idiom. ! ndx.getRange( "b", "ca" ) // successor idiom ); assertSameIndexRanges // { { c, c } } ( new IGeneric[][]{new IGeneric[]{g5,g6}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getRangeCount( "c", "c\0" ), // successor idiom. ! // ndx.getRange( "c", "c\0" ) // successor idiom ! ndx.getRangeCount( "c", "ca" ), // successor idiom. ! ndx.getRange( "c", "ca" ) // successor idiom ); *************** *** 1493,1498 **** assertSameIndexRanges // {a,a} ( new IGeneric[][]{new IGeneric[]{g2,g4}}, ! ndx.getHeadCount( "a\0" ), // successor idiom ! ndx.getHead( "a\0" ) // successor idiom ); --- 1516,1527 ---- assertSameIndexRanges // {a,a} ( new IGeneric[][]{new IGeneric[]{g2,g4}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getHeadCount( "a\0" ), // successor idiom ! // ndx.getHead( "a\0" ) // successor idiom ! ndx.getHeadCount( "aa" ), // successor idiom ! ndx.getHead( "aa" ) // successor idiom ); *************** *** 1509,1514 **** new IGeneric[]{g3}, new IGeneric[]{g5,g6}}, ! ndx.getHeadCount( "c\0" ), // successor idiom. ! ndx.getHead( "c\0" ) // successor idiom ); --- 1538,1549 ---- new IGeneric[]{g3}, new IGeneric[]{g5,g6}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getHeadCount( "c\0" ), // successor idiom. ! // ndx.getHead( "c\0" ) // successor idiom ! ndx.getHeadCount( "ca" ), // successor idiom. ! ndx.getHead( "ca" ) // successor idiom ); *************** *** 1574,1579 **** assertSameIndexRanges // { { c, c } } ( new IGeneric[][]{new IGeneric[]{g5,g6}}, ! ndx.getTailCount( "b\0" ), // successor idiom ! ndx.getTail( "b\0" ) // successor idiom ); --- 1609,1620 ---- assertSameIndexRanges // { { c, c } } ( new IGeneric[][]{new IGeneric[]{g5,g6}}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getTailCount( "b\0" ), // successor idiom ! // ndx.getTail( "b\0" ) // successor idiom ! ndx.getTailCount( "ba" ), // successor idiom ! ndx.getTail( "ba" ) // successor idiom ); *************** *** 1586,1591 **** assertSameIndexRanges // { } ( new IGeneric[][]{}, ! ndx.getTailCount( "c\0" ), // successor idiom ! ndx.getTail( "c\0" ) // successor idiom ); --- 1627,1638 ---- assertSameIndexRanges // { } ( new IGeneric[][]{}, ! /* ! * Note: Unicode successor semantics may be based on a collation ! * order in which case appending \0 is typically ignored. ! */ ! // ndx.getTailCount( "c\0" ), // successor idiom ! // ndx.getTail( "c\0" ) // successor idiom ! ndx.getTailCount( "ca" ), // successor idiom ! ndx.getTail( "ca" ) // successor idiom ); Index: IObjectManagerProxyTestCase.java =================================================================== RCS file: /cvsroot/cweb/generic-test/src/java/org/CognitiveWeb/generic/IObjectManagerProxyTestCase.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** IObjectManagerProxyTestCase.java 20 May 2006 13:18:45 -0000 1.11 --- IObjectManagerProxyTestCase.java 5 Dec 2007 16:41:27 -0000 1.12 *************** *** 310,323 **** ILinkSet ls2 = g2.getLinkSet( linkProperty ); - ILinkSetIndex ndx2 = ls2.getExistingIndex - ( valueProperty - ); - - assertNotNull - ( "Expecting index to be registered for new link set"+ - ": linkSet(ls2)="+ls2, - ndx2 - ); - IGeneric g2a = addGeneric(); g2a.set( valueProperty, "a" ); IGeneric g2b = addGeneric(); g2b.set( valueProperty, "b" ); --- 310,313 ---- *************** *** 325,331 **** ls2.add( g2a ); ls2.add( g2b ); ls2.add( g2c ); ! ILinkSetProxyTestCase.assertLinkSet ( new IGeneric[]{g2a,g2b,g2c}, --- 315,329 ---- ls2.add( g2a ); + /* + * Note: The index may be lazily created so we don't test until we add an + * object to the link set with an attribute that is used by the index. At + * that point the index MUST exist since it was registered in advance. + */ + assertNotNull("Expecting index to be registered for new link set" + + ": linkSet(ls2)=" + ls2, ls2.getExistingIndex(valueProperty)); + // ls2.add( g2b ); ls2.add( g2c ); ! ILinkSetProxyTestCase.assertLinkSet ( new IGeneric[]{g2a,g2b,g2c}, *************** *** 333,336 **** --- 331,337 ---- ); + // index is known to exist. + ILinkSetIndex ndx2 = ls2.getExistingIndex(valueProperty); + ILinkSetIndexProxyTestCase.assertSameIndexRanges ( new IGeneric[][]{new IGeneric[]{g2a}, |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:24
|
Update of /cvsroot/cweb/generic-native In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8401 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/generic-native/project.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** project.xml 27 May 2006 21:58:40 -0000 1.34 --- project.xml 5 Dec 2007 16:41:21 -0000 1.35 *************** *** 166,170 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 166,170 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:22
|
Update of /cvsroot/cweb/generic-native-test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8391 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/generic-native-test/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.xml 6 Jun 2006 12:32:54 -0000 1.2 --- project.xml 5 Dec 2007 16:41:18 -0000 1.3 *************** *** 162,166 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 162,166 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:41:21
|
Update of /cvsroot/cweb/generic-mem In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8378 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/generic-mem/project.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** project.xml 27 May 2006 21:59:04 -0000 1.12 --- project.xml 5 Dec 2007 16:41:15 -0000 1.13 *************** *** 165,169 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> --- 165,169 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.cognitiveweb.org/</url> </dependency> |
From: Bryan T. <tho...@us...> - 2007-12-05 16:40:50
|
Update of /cvsroot/cweb/rdf-generic In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7997 Modified Files: project.xml Log Message: updated dependency version for junit-ext. Index: project.xml =================================================================== RCS file: /cvsroot/cweb/rdf-generic/project.xml,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** project.xml 13 Jul 2007 22:23:52 -0000 1.67 --- project.xml 5 Dec 2007 16:40:45 -0000 1.68 *************** *** 268,272 **** <!-- @release comment out this dependency for release. --> ! <!-- junit - for testing only, but included for uberjar <dependency> <groupId>junit</groupId> --- 268,272 ---- <!-- @release comment out this dependency for release. --> ! <!-- junit - for testing only, but included for uberjar --> <dependency> <groupId>junit</groupId> *************** *** 275,279 **** <url>http://www.junit.org/</url> </dependency> - --> <!-- Our junit extensions - for testing only. --> --- 275,278 ---- *************** *** 281,285 **** <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b2-dev</version> <url>http://www.sourceforge.net/projects/cweb</url> </dependency> --- 280,284 ---- <groupId>org.CognitiveWeb</groupId> <artifactId>cweb-junit-ext</artifactId> ! <version>1.1-b3-dev</version> <url>http://www.sourceforge.net/projects/cweb</url> </dependency> *************** *** 526,530 **** Note: you MUST (re-)compile the tests in order for all tests to be ! bundled! <resource> <directory>${basedir}/target/test-classes</directory> --- 525,529 ---- Note: you MUST (re-)compile the tests in order for all tests to be ! bundled! --> <resource> <directory>${basedir}/target/test-classes</directory> *************** *** 541,545 **** </includes> </resource> ! --> </resources> --- 540,544 ---- </includes> </resource> ! <!-- --> </resources> *************** *** 550,552 **** </build> ! </project> --- 549,551 ---- </build> ! </project> \ No newline at end of file |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:36
|
Update of /cvsroot/cweb/generic-api/src/java/org/CognitiveWeb/generic/gql In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6215/src/java/org/CognitiveWeb/generic/gql Modified Files: GValue.java Log Message: bigdata-gom is now running. Index: GValue.java =================================================================== RCS file: /cvsroot/cweb/generic-api/src/java/org/CognitiveWeb/generic/gql/GValue.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GValue.java 28 Mar 2006 15:52:47 -0000 1.14 --- GValue.java 5 Dec 2007 15:11:33 -0000 1.15 *************** *** 446,450 **** ); ! m_value = value.toString(); m_type = GConvert.UNICODE; --- 446,450 ---- ); ! m_value = new UnicodeValue(value.toString()); m_type = GConvert.UNICODE; *************** *** 926,930 **** { ! if( isNumber() ) { return new GValue --- 926,934 ---- { ! if(isBoolean()) { ! ! return new GValue(""+getRawValue()); ! ! } else if( isNumber() ) { return new GValue *************** *** 958,962 **** } else { ! throw new AssertionError(); } --- 962,966 ---- } else { ! throw new AssertionError("type=" + m_type + ", value=" + m_value+", class="+(m_value==null?"null":m_value.getClass().getName())); } |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:27
|
Update of /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6025/src/java/org/CognitiveWeb/generic/core Modified Files: LinkSetIndexSerializationTestCase.java Log Message: bigdata-gom is now running. Index: LinkSetIndexSerializationTestCase.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/LinkSetIndexSerializationTestCase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** LinkSetIndexSerializationTestCase.java 30 Nov 2007 21:53:57 -0000 1.7 --- LinkSetIndexSerializationTestCase.java 5 Dec 2007 15:11:09 -0000 1.8 *************** *** 373,384 **** */ ! // if (expectedDuplicateKeys) { ! // ! // assertNotNull("coercer is null with duplicate key support enabled", ! // ndx.getBTree().getCoercer()); ! // ! // } ! if (type != null) { assertNotNull("successor for " + type.getName(), ndx.getBTree() --- 373,384 ---- */ ! if (expectedCoercer != null) { ! ! assertNotNull("coercer is null with duplicate key support enabled", ! ndx.getBTree().getCoercer()); ! ! } ! if (expectedSuccessor != null) { assertNotNull("successor for " + type.getName(), ndx.getBTree() *************** *** 387,396 **** } ! // if (type != null) { ! // ! // assertNotNull("comparator for " + type.getName(), ndx.getBTree() ! // .getComparator()); ! // ! // } /* --- 387,396 ---- } ! if (expectedComparator != null) { ! ! assertNotNull("comparator for " + type.getName(), ndx.getBTree() ! .getComparator()); ! ! } /* |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:27
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6183/src/java/org/CognitiveWeb/generic/core/om Modified Files: ObjectManager.java Log Message: bigdata-gom is now running. Index: ObjectManager.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/ObjectManager.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ObjectManager.java 4 Dec 2007 20:30:41 -0000 1.12 --- ObjectManager.java 5 Dec 2007 15:11:16 -0000 1.13 *************** *** 584,587 **** --- 584,589 ---- // + int counter = beginNativeTransaction(); + propertyClass = (PropertyClass) delegate.getPropertyClass( property, insert ); *************** *** 592,595 **** --- 594,599 ---- } + commitNativeTransaction(counter); + return propertyClass; *************** *** 686,698 **** { ! if( linkPropertyClass == null ) { ! throw new IllegalArgumentException(); ! } ! ! ((PropertyClass)linkPropertyClass).addIndexClass ! ( (PropertyClass) valuePropertyClass ! ); } --- 690,705 ---- { ! if (linkPropertyClass == null) { ! throw new IllegalArgumentException(); ! } ! ! int counter = beginNativeTransaction(); ! ! ((PropertyClass) linkPropertyClass) ! .addIndexClass((PropertyClass) valuePropertyClass); ! ! commitNativeTransaction(counter); } *************** *** 1082,1086 **** checkIfOpen(); ! return delegate.intern(s); } --- 1089,1099 ---- checkIfOpen(); ! int counter = beginNativeTransaction(); ! ! int ret = delegate.intern(s); ! ! commitNativeTransaction(counter); ! ! return ret; } *************** *** 1570,1573 **** --- 1583,1587 ---- synchronized public void setNamedObject(String name, Object value) { checkIfOpen(); + int counter = beginNativeTransaction(); if( value == null ) { delegate.setNamedObject( name, 0L ); *************** *** 1575,1578 **** --- 1589,1593 ---- delegate.setNamedObject( name, ((BaseObject)value).getOID() ); } + commitNativeTransaction(counter); } |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:25
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6183/src/java/org/CognitiveWeb/generic/core/ndx Modified Files: NoSuccessorException.java Log Message: bigdata-gom is now running. Index: NoSuccessorException.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/NoSuccessorException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NoSuccessorException.java 22 May 2006 14:40:23 -0000 1.1 --- NoSuccessorException.java 5 Dec 2007 15:11:16 -0000 1.2 *************** *** 52,56 **** */ ! public class NoSuccessorException extends Exception { --- 52,56 ---- */ ! public class NoSuccessorException extends RuntimeException { |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:23
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6183/src/java/org/CognitiveWeb/generic/core Modified Files: LinkSetIndex.java AbstractBTree.java Log Message: bigdata-gom is now running. Index: AbstractBTree.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/AbstractBTree.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractBTree.java 4 Dec 2007 20:30:42 -0000 1.7 --- AbstractBTree.java 5 Dec 2007 15:11:16 -0000 1.8 *************** *** 338,341 **** --- 338,451 ---- } + /** + * <p> + * Helper method returns the internal key for the generic object for this + * index. The internal key is produced from the coerced key and is used to + * break ties when duplicate keys are supported by the index. When + * {@link #getStoreOidOnly()} is true, then the internal form of the key is + * simply the generic object and the comparator will have been choosen to + * extract the current property value from the generic object and perform + * coercion iff the index is not strongly typed. + * </p> + * + * @param indexEverything + * from {@link LinkSetIndex#getIndexEverything()} + * @param duplicateKeys + * from {@link LinkSetIndex#getDuplicateKeys()} + * @param coerce + * When <code>true</code>, the <i>key</i> will be coerced. + * When <code>false</code> the caller is asserting that the + * <i>key</i> is already in its coerced form. + * @param key + * Either the external or coerced form of the key. There are + * several possible sources for the <i>key</i> + * <ol> + * <li>The current value of the {@link #getValuePropertyClass()} + * property value extracted from <i>what</i> during an index + * build operation;</li> + * <li>The pre- or post-modification property value for that + * property as reported by a property change event;</li> + * <li>An application supplied external key that is being used + * to query the index.</li> + * <li>The successor of a <em>coerced</em> application + * supplied key that is being used to bound a key range scan.</li> + * </ol> + * @param what + * The generic object that is being added to, or dropped from, + * the index. The various methods that query the index, e.g., + * {@link #getPoints( Object externalKey )}, specify <i>what + * </i> as <code>null</code>. When duplicate keys are + * supported this results in a {@link ICompositeKey} whose {@link + * ICompositeKey#getObjectIdentity()} returns <code>0L</code>. + * + * @return The internal form of the key used to index <i>what </i>. It will + * be <code>null</code> iff the generic object will NOT be + * included in the index. Otherwise the returned key should be + * suitable for direct comparison with other keys in the index using + * the selected {@link Comparator} -or- the comparison semantics of + * the backend btree if custom comparators are not supported. If + * {@link #getStoreOidOnly()} is <code>true</code> then the + * returned key will be <i>what</i> (the generic object whose + * property value will be indexed). + * + * @see #getDuplicateKeys() + * @see #getIndexEverything() + * @see #getStoreOidOnly() + */ + protected Object getInternalKey(// + final boolean indexEverything,// + final boolean duplicateKeys,// + final boolean coerce,// + final boolean successor,// + /*final*/ Object key,// + final Generic what// + ) { + + if(successor) { + + if( _successor == null) { + + throw new UnsupportedOperationException("special successor semantics"); + + } + + key = _successor.successor(key); + + } + + final Object coercedKey = ( coerce && _coercer != null ? _coercer.coerce(key) : key ); + // final Object coercedKey = ( coerce ? _coercer.coerce(key) : key ); + + if (coercedKey == null && !indexEverything) { + + /* + * Note: Unless we are indexing everything we will drop out keys + * that coerce to [null]. + */ + + return null; + + } + + Object internalKey = coercedKey; + + if (duplicateKeys) { + + /* + * Note: If we are permitting duplicate external keys, then we + * always wrap the coerced key as a composite key. This let's us + * impose a total ordering over the index even when the external + * (and coerced) keys are not unique. + */ + + internalKey = newCompositeKey(coercedKey, (what == null ? 0L : what + .getOID())); + + } + + return internalKey; + + } + //************************************************************ //********************* Externalizable *********************** Index: LinkSetIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/LinkSetIndex.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** LinkSetIndex.java 4 Dec 2007 20:30:42 -0000 1.19 --- LinkSetIndex.java 5 Dec 2007 15:11:16 -0000 1.20 *************** *** 526,529 **** --- 526,533 ---- private boolean m_indexEverything; private boolean m_sortNullsToEnd; + + /** + * @deprecated this feature will be dropped. + */ private boolean m_storeOidOnly; *************** *** 798,801 **** --- 802,807 ---- * property on the generic object, but only the object identifier of the * indexed generic object. + * + * @deprecated this feature will be dropped. */ public boolean getStoreOidOnly() { *************** *** 1449,1453 **** log.debug("what="+gx+", value="+theValue); ! add(getInternalKey(true, theValue, gx), gx); } // synchronized( gx ) --- 1455,1459 ---- log.debug("what="+gx+", value="+theValue); ! add(getInternalKey(true, false/*successor*/,theValue, gx), gx); } // synchronized( gx ) *************** *** 1657,1661 **** log.debug("what="+what+", value="+value); ! drop(getInternalKey(true, value, what), what); what.removePropertyChangeListener(valuePropertyClass, this); --- 1663,1667 ---- log.debug("what="+what+", value="+value); ! drop(getInternalKey(true, false/*successor*/,value, what), what); what.removePropertyChangeListener(valuePropertyClass, this); *************** *** 1783,1787 **** // Add LSM to the index. ! add(getInternalKey(true, what.get(valuePropertyClass), what), what); commitNativeTransaction(counter); --- 1789,1793 ---- // Add LSM to the index. ! add(getInternalKey(true, false/*successor*/,what.get(valuePropertyClass), what), what); commitNativeTransaction(counter); *************** *** 1824,1828 **** // Drop LSM from the index. ! drop(getInternalKey(true, what.get(valuePropertyClass), what), what); // Drop the property change listener. --- 1830,1834 ---- // Drop LSM from the index. ! drop(getInternalKey(true, false/*successor*/,what.get(valuePropertyClass), what), what); // Drop the property change listener. *************** *** 1890,1896 **** * of object for that OID -- it will have to be the glueObject * in GOM for Objectivity and some flyweight OID in GOM for ! * JDBM. */ ! drop(getInternalKey(true, oldValue, source), source); } --- 1896,1902 ---- * of object for that OID -- it will have to be the glueObject * in GOM for Objectivity and some flyweight OID in GOM for ! * JDBM (actually, just drop [storeOidOnly] as a feature). */ ! drop(getInternalKey(true, false/*successor*/,oldValue, source), source); } *************** *** 1908,1912 **** } else { ! add(getInternalKey(true, newValue, source), source); } --- 1914,1918 ---- } else { ! add(getInternalKey(true, false/*successor*/,newValue, source), source); } *************** *** 1934,1938 **** try { ! drop(getInternalKey(true, is, source), source); } --- 1940,1944 ---- try { ! drop(getInternalKey(true, false/*successor*/,is, source), source); } *************** *** 1960,1964 **** try { ! drop(getInternalKey(true, r, source), source); } --- 1966,1970 ---- try { ! drop(getInternalKey(true, false/*successor*/,r, source), source); } *************** *** 2007,2011 **** try { ! add(getInternalKey(true, is, source), source); } --- 2013,2017 ---- try { ! add(getInternalKey(true, false/*successor*/,is, source), source); } *************** *** 2033,2037 **** try { ! add(getInternalKey(true, r, source), source); } --- 2039,2043 ---- try { ! add(getInternalKey(true, false/*successor*/,r, source), source); } *************** *** 2104,2116 **** * included in the index. Otherwise the returned key should be * suitable for direct comparison with other keys in the index using ! * the selected {@link Comparator}.<br> ! * The return value will be an {@link ICompositeKey} iff {@link ! * #getDuplicateKeys()} returns <code>true</code> and ! * {@link #getStoreOidOnly()} returns <code>false</code>. Iff * {@link #getStoreOidOnly()} is <code>true</code> then the ! * returned key will either by <i>what</i> (the generic object ! * whose property value will be indexed) or a simple data type that ! * must be compared to the coerced property value extracted from ! * generic objects in the index. * * @see #getDuplicateKeys() --- 2110,2118 ---- * included in the index. Otherwise the returned key should be * suitable for direct comparison with other keys in the index using ! * the selected {@link Comparator} -or- the comparison semantics of ! * the backend btree if custom comparators are not supported. If * {@link #getStoreOidOnly()} is <code>true</code> then the ! * returned key will be <i>what</i> (the generic object whose ! * property value will be indexed). * * @see #getDuplicateKeys() *************** *** 2118,2170 **** * @see #getStoreOidOnly() */ ! protected Object getInternalKey(final boolean coerce, final Object key, ! final Generic what) { ! ! if( getStoreOidOnly() ) { ! ! if( what == null ) { ! ! return ( coerce ? coerce(key) : key ); ! ! } else { ! ! return what; ! ! } ! ! } ! ! final Object coercedKey = ( coerce ? coerce(key) : key ); ! ! if (coercedKey == null && !getIndexEverything()) { ! ! /* ! * Note: Unless we are indexing everything we will drop out keys ! * that coerce to [null]. ! */ ! ! return null; ! } ! Object internalKey = coercedKey; ! if (getDuplicateKeys()) { ! /* ! * Note: If we are permitting duplicate external keys, then we ! * always wrap the coerced key as a composite key. This let's us ! * impose a total ordering over the index even when the external ! * (and coerced) keys are not unique. ! */ ! internalKey = getBTree().newCompositeKey(coercedKey, ! (what == null ? 0L : what.getOID())); } ! return internalKey; } --- 2120,2152 ---- * @see #getStoreOidOnly() */ + protected Object getInternalKey(// + final boolean coerce,// + final boolean successor,// + final Object key,// + final Generic what// + ) { ! if (getStoreOidOnly()) { ! if (what == null) { ! return (coerce ? coerce(key) : key); ! } else { ! return what; ! } } ! /* ! * delegate to the AbstractBTree so that the behavior may be customized ! * for the backend. ! */ + return getBTree().getInternalKey(m_indexEverything, + m_duplicateKeys, coerce, successor, key, what); + } *************** *** 2175,2181 **** * the constructor. * </p> */ ! ! protected final Object coerce(Object externalKey) { indexed(); --- 2157,2165 ---- * the constructor. * </p> + * + * @deprecated only used when {@link #getStoreOidOnly()} is <code>true</code> + * and that feature is being dropped. */ ! private final Object coerce(Object externalKey) { indexed(); *************** *** 2543,2555 **** ILinkSetIndexIterator itr = (ILinkSetIndexIterator) iterator(); ! Generic g = (Generic) itr.next(); ! return g.get( getValuePropertyClass() ); ! ! // Iterator itr = iterator(); ! // ! // itr.next(); ! // ! // return getExternalKey(((ILinkSetIndexIterator) itr).getInternalKey()); } --- 2527,2541 ---- ILinkSetIndexIterator itr = (ILinkSetIndexIterator) iterator(); ! try { ! Generic g = (Generic) itr.next(); ! ! return g.get(getValuePropertyClass()); ! ! } finally { ! ! itr.close(); ! ! } } *************** *** 2572,2579 **** */ public Iterator iterator() { ! return getBTree().iterator(this,null, // fromKey null, // toKey ! true // resolve Topics. ); } --- 2558,2568 ---- */ public Iterator iterator() { ! ! return getBTree().iterator(this,// ! null, // fromKey null, // toKey ! true // resolve ); + } *************** *** 2595,2605 **** try { ! final Object fromKey = coerce(key); ! final Object toKey = getBTree().getSuccessor().successor(fromKey); itr = getBTree().iterator(this, ! getInternalKey(false/* coerce */, fromKey, null/* what */), ! getInternalKey(false/* coerce */, toKey, null/* what */), true // resolve values. ); --- 2584,2594 ---- try { ! // final Object fromKey = coerce(key); ! // final Object toKey = getBTree().getSuccessor().successor(fromKey); itr = getBTree().iterator(this, ! getInternalKey(true/* coerce */, false/*successor*/,key, null/* what */), ! getInternalKey(true/* coerce */, true/*successor*/,key, null/* what */), true // resolve values. ); *************** *** 2657,2667 **** try { ! Object fromKey = coerce(key); ! Object toKey = getBTree().getSuccessor().successor(fromKey); return getBTree().iterator(this, ! getInternalKey(false/* coerce */, fromKey, null/* what */), ! getInternalKey(false/* coerce */, toKey, null/* what */), true // resolve values. ); --- 2646,2656 ---- try { ! // Object fromKey = coerce(key); ! // Object toKey = getBTree().getSuccessor().successor(fromKey); return getBTree().iterator(this, ! getInternalKey(true/* coerce */, false/*successor*/,key, null/* what */), ! getInternalKey(true/* coerce */, true/*successor*/,key, null/* what */), true // resolve values. ); *************** *** 2711,2721 **** try { ! final Object fromKey = coerce(key); ! final Object toKey = getBTree().getSuccessor().successor(fromKey); Iterator itr = getBTree().iterator(this, ! getInternalKey(false,fromKey, null), ! getInternalKey(false,toKey, null), false // do not resolve values. ); --- 2700,2710 ---- try { ! // final Object fromKey = coerce(key); ! // final Object toKey = getBTree().getSuccessor().successor(fromKey); Iterator itr = getBTree().iterator(this, ! getInternalKey(true/*coerce*/,false/*successor*/,key, null), ! getInternalKey(true/*coerce*/,true/*successor*/,key, null), false // do not resolve values. ); *************** *** 2755,2760 **** return getBTree().iterator(this, ! getInternalKey(true, fromKey, null), ! getInternalKey(true, toKey, null), true // resolve values. ); --- 2744,2749 ---- return getBTree().iterator(this, ! getInternalKey(true, false/*successor*/,fromKey, null), ! getInternalKey(true, false/*successor*/,toKey, null), true // resolve values. ); *************** *** 2790,2795 **** Iterator itr = getBTree().iterator(this, ! getInternalKey(true, fromKey, null), ! getInternalKey(true, toKey, null), false // do not resolve values. ); --- 2779,2784 ---- Iterator itr = getBTree().iterator(this, ! getInternalKey(true, false/*successor*/,fromKey, null), ! getInternalKey(true, false/*successor*/,toKey, null), false // do not resolve values. ); *************** *** 2817,2821 **** return getBTree().iterator(this, null, // fromKey ! getInternalKey(true,toKey, null), // toKey true // resolve values. ); --- 2806,2810 ---- return getBTree().iterator(this, null, // fromKey ! getInternalKey(true,false/*successor*/,toKey, null), // toKey true // resolve values. ); *************** *** 2850,2854 **** Iterator itr = getBTree().iterator(this, null, // fromKey ! getInternalKey(true, toKey, null), // toKey false // do not resolve values. ); --- 2839,2843 ---- Iterator itr = getBTree().iterator(this, null, // fromKey ! getInternalKey(true, false/*successor*/,toKey, null), // toKey false // do not resolve values. ); *************** *** 2875,2879 **** return getBTree().iterator(this, ! getInternalKey(true, fromKey, null), null, // toKey true // resolve values. --- 2864,2868 ---- return getBTree().iterator(this, ! getInternalKey(true, false/*successor*/,fromKey, null), null, // toKey true // resolve values. *************** *** 2908,2912 **** Iterator itr = getBTree().iterator(this, ! getInternalKey(true, fromKey, null), // fromKey null, // toKey false // do not resolve values. --- 2897,2901 ---- Iterator itr = getBTree().iterator(this, ! getInternalKey(true, false/*successor*/,fromKey, null), // fromKey null, // toKey false // do not resolve values. |
Update of /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6025/src/java/org/CognitiveWeb/generic/core/ndx Modified Files: TestUntypedHomogenousFloatIndex.java AbstractUntypedIndexTest.java TestDoubleTypeIndex.java TestByteTypeIndex.java TestFloatTypeIndex.java TestUntypedHomogenousStringIndex.java TestUntypedHomogenousIntegerIndex.java TestIntegerTypeIndex.java TestShortTypeIndex.java AbstractIndexTest.java TestStringTypeIndex.java TestCharacterTypeIndex.java TestLongTypeIndex.java Log Message: bigdata-gom is now running. Index: TestByteTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestByteTypeIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestByteTypeIndex.java 10 Jun 2006 18:15:53 -0000 1.2 --- TestByteTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.3 *************** *** 59,63 **** public class TestByteTypeIndex extends AbstractIndexTest { ! Class getType() { return Byte.class; } --- 59,63 ---- public class TestByteTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Byte.class; } Index: TestDoubleTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestDoubleTypeIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestDoubleTypeIndex.java 10 Jun 2006 18:15:53 -0000 1.2 --- TestDoubleTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.3 *************** *** 59,63 **** public class TestDoubleTypeIndex extends AbstractIndexTest { ! Class getType() { return Double.class; } --- 59,63 ---- public class TestDoubleTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Double.class; } Index: AbstractUntypedIndexTest.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/AbstractUntypedIndexTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractUntypedIndexTest.java 10 Jun 2006 18:15:53 -0000 1.1 --- AbstractUntypedIndexTest.java 5 Dec 2007 15:11:08 -0000 1.2 *************** *** 77,81 **** * Returns <code>null</code>. */ ! final Class getType() { return null; } --- 77,81 ---- * Returns <code>null</code>. */ ! final Class getTypeConstraint() { return null; } *************** *** 86,90 **** */ final Object successor(Object key) throws NoSuccessorException { ! return SuccessorUtil.successor( new GValue( key ).getString() ); } --- 86,101 ---- */ final Object successor(Object key) throws NoSuccessorException { ! ! // return SuccessorUtil.successor( new GValue( key ).getString() ); ! ! /* ! * Note: Since the trailing nul character is often ignored when ! * producing a Unicode sort key I have followed it with a series of ! * characters designed to sort lower in practice than the other values ! * to which the successor will be compared. ! */ ! ! return new GValue( key ).getString()+"\0 aaaaaa"; ! } Index: TestFloatTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestFloatTypeIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestFloatTypeIndex.java 10 Jun 2006 18:15:53 -0000 1.2 --- TestFloatTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.3 *************** *** 59,63 **** public class TestFloatTypeIndex extends AbstractIndexTest { ! Class getType() { return Float.class; } --- 59,63 ---- public class TestFloatTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Float.class; } Index: TestIntegerTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestIntegerTypeIndex.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestIntegerTypeIndex.java 15 Jun 2006 15:47:01 -0000 1.4 --- TestIntegerTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.5 *************** *** 59,63 **** public class TestIntegerTypeIndex extends AbstractIndexTest { ! Class getType() { return Integer.class; } --- 59,63 ---- public class TestIntegerTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Integer.class; } Index: TestUntypedHomogenousFloatIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestUntypedHomogenousFloatIndex.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestUntypedHomogenousFloatIndex.java 10 Jun 2006 18:15:53 -0000 1.1 --- TestUntypedHomogenousFloatIndex.java 5 Dec 2007 15:11:08 -0000 1.2 *************** *** 71,74 **** --- 71,80 ---- } + final Class getKeyConstraint() { + + return Float.class; + + } + Object[] getValues() { return new Float[] { new Float(1f), new Float(2f), new Float(3f) }; Index: TestUntypedHomogenousIntegerIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestUntypedHomogenousIntegerIndex.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestUntypedHomogenousIntegerIndex.java 10 Jun 2006 18:15:53 -0000 1.1 --- TestUntypedHomogenousIntegerIndex.java 5 Dec 2007 15:11:08 -0000 1.2 *************** *** 55,63 **** * @version $Id$ */ - public class TestUntypedHomogenousIntegerIndex extends AbstractUntypedIndexTest { Object[] getValues() { ! return new Object[] { new Integer(10), new Integer(20), new Integer(30) }; } --- 55,74 ---- * @version $Id$ */ public class TestUntypedHomogenousIntegerIndex extends AbstractUntypedIndexTest { + final Class getKeyConstraint() { + + return Integer.class; + + } + Object[] getValues() { ! ! return new Object[] {// ! new Integer(10),// ! new Integer(20),// ! new Integer(30)// ! }; ! } Index: TestShortTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestShortTypeIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestShortTypeIndex.java 10 Jun 2006 18:15:53 -0000 1.2 --- TestShortTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.3 *************** *** 59,63 **** public class TestShortTypeIndex extends AbstractIndexTest { ! Class getType() { return Short.class; } --- 59,63 ---- public class TestShortTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Short.class; } Index: TestStringTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestStringTypeIndex.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestStringTypeIndex.java 30 Nov 2007 21:53:57 -0000 1.7 --- TestStringTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.8 *************** *** 49,52 **** --- 49,53 ---- import org.CognitiveWeb.generic.core.LinkSetIndex; + import org.CognitiveWeb.generic.gql.GValue; /** *************** *** 59,63 **** public class TestStringTypeIndex extends AbstractIndexTest { ! Class getType() { return String.class; --- 60,64 ---- public class TestStringTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return String.class; *************** *** 73,78 **** Object successor(Object key) throws NoSuccessorException { ! return SuccessorUtil.successor((String) key); } --- 74,88 ---- Object successor(Object key) throws NoSuccessorException { ! // return SuccessorUtil.successor((String) key); ! ! /* ! * Note: Since the trailing nul character is often ignored when ! * producing a Unicode sort key I have followed it with a series of ! * characters designed to sort lower in practice than the other values ! * to which the successor will be compared. ! */ + return new GValue( key ).getString()+"\0 aaaaaa"; + } Index: TestUntypedHomogenousStringIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestUntypedHomogenousStringIndex.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestUntypedHomogenousStringIndex.java 10 Jun 2006 18:15:53 -0000 1.1 --- TestUntypedHomogenousStringIndex.java 5 Dec 2007 15:11:08 -0000 1.2 *************** *** 55,63 **** * @version $Id$ */ - public class TestUntypedHomogenousStringIndex extends AbstractUntypedIndexTest { Object[] getValues() { return new Object[]{"a","b","c"}; } --- 55,70 ---- * @version $Id$ */ public class TestUntypedHomogenousStringIndex extends AbstractUntypedIndexTest { + final Class getKeyConstraint() { + + return String.class; + + } + Object[] getValues() { + return new Object[]{"a","b","c"}; + } Index: AbstractIndexTest.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/AbstractIndexTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AbstractIndexTest.java 4 Dec 2007 20:30:32 -0000 1.8 --- AbstractIndexTest.java 5 Dec 2007 15:11:08 -0000 1.9 *************** *** 77,84 **** * @version $Id$ * - * FIXME {@link TestUntypedHomogenousIntegerIndex} and friends should select their - * keys randomly from the appropriate value type rather than choosing the value - * type randomly. - * * @todo Add tests for more of the methods on the ILinkSetIndex API. Are there * features being tested by <code>generic-test</code> that are not being --- 77,80 ---- *************** *** 122,128 **** * untyped. */ ! abstract Class getType(); /** * <p> * Return an array of three values that are consistent with the index type. --- 118,142 ---- * untyped. */ ! abstract Class getTypeConstraint(); /** + * Return the type constraint on the generated keys. For strongly typed + * indices this MUST be the same non-<code>null</code> value returned by + * {@link #getTypeConstraint()} (this is the default behavior). For an + * untyped index, this MAY be non-<code>null</code> in order to in + * constrain the generated keys without imposing a type constraint on the + * index itself. + * + * @return The type constraint on the generated keys or <code>null</code> + * if the generated keys will not be constraint to a specific data + * type. + */ + Class getKeyConstraint() { + + return getTypeConstraint(); + + } + + /** * <p> * Return an array of three values that are consistent with the index type. *************** *** 151,158 **** * computing the successor. * </p> * * @param key * A non-null key consistent with the type returned by ! * {@link #getType()} * * @return The sucessor of the key. --- 165,179 ---- * computing the successor. * </p> + * <p> + * Note: The precise formulation of the successor of a key is in fact + * backend specific. However, it is sufficient for the purposes of this test + * suite if this method returns an application key that is the successor of + * the given key where the given key is one of those returned by + * {@link #getValues()}. + * </p> * * @param key * A non-null key consistent with the type returned by ! * {@link #getTypeConstraint()} * * @return The sucessor of the key. *************** *** 186,190 **** * the explicit intention for this test. */ ! pc.setType( getType() ); // Collects link set. --- 207,211 ---- * the explicit intention for this test. */ ! pc.setType( getTypeConstraint() ); // Collects link set. *************** *** 321,325 **** * Test case for an index constrained to NOT allow duplicate keys. */ - public void test_distinctKeys() throws NoSuccessorException { --- 342,345 ---- *************** *** 334,338 **** * the explicit intention for this test. */ ! pc.setType( getType() ); // Collects link set. --- 354,358 ---- * the explicit intention for this test. */ ! pc.setType( getTypeConstraint() ); // Collects link set. *************** *** 376,382 **** // verify the total ordering. assertSameIndexRanges( ! new IGeneric[][] { new IGeneric[] { g1 }, ! new IGeneric[] { g2 }, new IGeneric[] { g3 } }, 3, ndx ! .iterator()); // verify fromKey == toKey yeilds empty range. --- 396,407 ---- // verify the total ordering. assertSameIndexRanges( ! new IGeneric[][] { ! new IGeneric[] { g1 }, ! new IGeneric[] { g2 }, ! new IGeneric[] { g3 } ! }, ! 3, ! ndx.iterator() ! ); // verify fromKey == toKey yeilds empty range. *************** *** 385,410 **** /* * We use getPoints() to verify successor is computed correctly. ! * getPoints() is written to use the successor semantics of the key. We ! * add an entry under the successor of the key. getPoints() will pull ! * back exactly the entry(s) for the specified key but not the entry ! * under the successor of the key iff the index successor semantics are ! * correct. * ! * The index now contains: (v1=>g1),(v2=>g2), (v3=>g3) */ ! Object key = v1; ! Object successor = successor( v1 ); assertSameIndexRanges(new IGeneric[][] { new IGeneric[] { g1 } }, 1, ! ndx.getPoints(key)); assertSameIndexRanges(new IGeneric[][] { new IGeneric[] { g1 } }, 1, ! ndx.getRange(key, successor)); /* * Verify specific points. Since the keys are distinct it is not ! * possible for their to be more than one value for any given key. */ assertTrue( ndx.contains( v1 ) ); assertTrue( ndx.contains( v2 ) ); assertTrue( ndx.contains( v3 ) ); assertFalse( ndx.contains( successor(v2) ) ); assertParanoidEquals( g1, ndx.getPoint(v1)); --- 410,436 ---- /* * We use getPoints() to verify successor is computed correctly. ! * getPoints() is written to use the successor semantics of the key. * ! * Note: The index now contains: (v1=>g1),(v2=>g2), (v3=>g3) */ ! showLinkSet(g.getLinkSet(ac), pc); ! showIndex(ndx, pc); assertSameIndexRanges(new IGeneric[][] { new IGeneric[] { g1 } }, 1, ! ndx.getPoints(v1)); assertSameIndexRanges(new IGeneric[][] { new IGeneric[] { g1 } }, 1, ! ndx.getRange(v1, successor(v1))); /* * Verify specific points. Since the keys are distinct it is not ! * possible for there to be more than one value for any given key. */ assertTrue( ndx.contains( v1 ) ); assertTrue( ndx.contains( v2 ) ); assertTrue( ndx.contains( v3 ) ); + /* + * Note: This test can not be written since the manner in which + * successor of a key that is coerced to a String is specific to the + * backend. + */ assertFalse( ndx.contains( successor(v2) ) ); assertParanoidEquals( g1, ndx.getPoint(v1)); *************** *** 435,439 **** * Set the index type constraint (if any). */ ! pc.setType( getType() ); // Collects link set. --- 461,465 ---- * Set the index type constraint (if any). */ ! pc.setType( getTypeConstraint() ); // Collects link set. *************** *** 1041,1044 **** --- 1067,1072 ---- final ObjectManager om = getNativeObjectManager(); + + int counter = om.beginNativeTransaction(); final PropertyClass ac = (PropertyClass) om.getPropertyClass( getUniquePropertyName("assoc")); *************** *** 1046,1055 **** final PropertyClass pc = (PropertyClass) om.getPropertyClass( getUniquePropertyName("value")); ! final Class cls = getType(); ! ! final IKeyGenerator keyGen = new KeyGenerator(ntrials/* maxDistinct */, cls); pc.setType( cls ); ! Generic g = new Generic( om ); --- 1074,1083 ---- final PropertyClass pc = (PropertyClass) om.getPropertyClass( getUniquePropertyName("value")); ! final Class cls = getTypeConstraint(); pc.setType( cls ); ! ! final IKeyGenerator keyGen = new KeyGenerator(ntrials/* maxDistinct */, getKeyConstraint()); ! Generic g = new Generic( om ); *************** *** 1151,1154 **** --- 1179,1184 ---- verify(linkSet, ndx); } + + counter = om.commitNativeTransaction(counter); } *************** *** 1250,1259 **** */ ! final Class cls = getType(); ! ! final IKeyGenerator keyGen = new KeyGenerator(maxCreated/* maxDistinct */, cls); valueClass.setType( cls ); ! /* * @todo indexEverything, duplicateKeys, sortNullsToEnd --- 1280,1289 ---- */ ! final Class cls = getTypeConstraint(); valueClass.setType( cls ); ! ! final IKeyGenerator keyGen = new KeyGenerator(maxCreated/* maxDistinct */, getKeyConstraint()); ! /* * @todo indexEverything, duplicateKeys, sortNullsToEnd *************** *** 1271,1280 **** final Vector oids = new Vector(); // of created objects. - boolean done = false; int[] opsum = new int[Op.lastOp + 1]; // #of times we do each // operation. ! long optotal = 0; ! while (!done && (maxCreated == 0 || oids.size() < maxCreated)) { // next operation. always an insert if there are no records in the --- 1301,1310 ---- final Vector oids = new Vector(); // of created objects. int[] opsum = new int[Op.lastOp + 1]; // #of times we do each // operation. ! int optotal = 0; ! while ((maxCreated == 0 || oids.size() < maxCreated) ! && (maxOps == 0 || optotal < maxOps)) { // next operation. always an insert if there are no records in the *************** *** 1825,1828 **** } ! } --- 1855,1858 ---- } ! } Index: TestCharacterTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestCharacterTypeIndex.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestCharacterTypeIndex.java 30 Nov 2007 21:53:57 -0000 1.3 --- TestCharacterTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.4 *************** *** 59,63 **** public class TestCharacterTypeIndex extends AbstractIndexTest { ! Class getType() { return Character.class; --- 59,63 ---- public class TestCharacterTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Character.class; Index: TestLongTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestLongTypeIndex.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestLongTypeIndex.java 4 Dec 2007 20:30:32 -0000 1.4 --- TestLongTypeIndex.java 5 Dec 2007 15:11:08 -0000 1.5 *************** *** 64,68 **** public class TestLongTypeIndex extends AbstractIndexTest { ! Class getType() { return Long.class; } --- 64,68 ---- public class TestLongTypeIndex extends AbstractIndexTest { ! Class getTypeConstraint() { return Long.class; } *************** *** 161,165 **** */ ! final Class cls = getType(); valueClass.setType( cls ); --- 161,165 ---- */ ! final Class cls = getTypeConstraint(); valueClass.setType( cls ); |
From: Bryan T. <tho...@us...> - 2007-12-05 15:11:12
|
Update of /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/om In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6025/src/java/org/CognitiveWeb/generic/core/om Modified Files: ObjectManagerTestCase.java Log Message: bigdata-gom is now running. Index: ObjectManagerTestCase.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/om/ObjectManagerTestCase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ObjectManagerTestCase.java 30 Nov 2007 21:53:57 -0000 1.4 --- ObjectManagerTestCase.java 5 Dec 2007 15:11:09 -0000 1.5 *************** *** 312,316 **** PropertyClass propertyClass2 = om.getPropertyClass ( property, ! false ); --- 312,316 ---- PropertyClass propertyClass2 = om.getPropertyClass ( property, ! false//insert ); *************** *** 340,347 **** // Speed up this test case by running in a native transaction. ! final int counter = om.beginNativeTransaction(); for( int i=0; i<M; i++ ) { final String property = getUniquePropertyName("i="+i); --- 340,350 ---- // Speed up this test case by running in a native transaction. ! int counter = om.beginNativeTransaction(); for( int i=0; i<M; i++ ) { + if(i%100==0) System.err.println(""); + System.err.print("."); + final String property = getUniquePropertyName("i="+i); *************** *** 387,392 **** --- 390,403 ---- om = reopenNativeStore(); + System.err.println("Reopened store - confirming property classes"); + + // speed up test by using a native transaction. + counter = om.beginNativeTransaction(); + for( int i=0; i<M; i++ ) { + if(i%100==0) System.err.println(""); + System.err.print("."); + final String property = propertyNames[ i ]; *************** *** 410,413 **** --- 421,426 ---- } + om.commitNativeTransaction(counter); + closeStore(); |
From: Bryan T. <tho...@us...> - 2007-12-04 20:30:46
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26710/src/java/org/CognitiveWeb/generic/core/om Modified Files: ObjectManager.java Log Message: working through changes to variable length text fields embedded within multi-field keys to support GOM and the sparse row store. Index: ObjectManager.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/ObjectManager.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ObjectManager.java 30 Nov 2007 21:54:05 -0000 1.11 --- ObjectManager.java 4 Dec 2007 20:30:41 -0000 1.12 *************** *** 778,782 **** obj.init( this, delegate.insert(container,obj) ); ! m_createCountThisTransaction++; // Collect statistics. removeClearedLazily(); --- 778,790 ---- obj.init( this, delegate.insert(container,obj) ); ! if(m_nativeTransactionCounter==0) { ! ! delegate.commit(); ! ! } else { ! ! m_createCountThisTransaction++; // Collect statistics. ! ! } removeClearedLazily(); *************** *** 807,811 **** _removeLazily.remove(new Long(oid)); ! m_removeCountThisTransaction++; // Collect statistics. removeClearedLazily(); --- 815,827 ---- _removeLazily.remove(new Long(oid)); ! if(m_nativeTransactionCounter==0) { ! ! delegate.commit(); ! ! } else { ! ! m_removeCountThisTransaction++; // Collect statistics. ! ! } removeClearedLazily(); *************** *** 1042,1046 **** delegate.update( obj ); ! m_updateCountThisTransaction++; // Collect statistics. } --- 1058,1070 ---- delegate.update( obj ); ! if(m_nativeTransactionCounter==0) { ! ! delegate.commit(); ! ! } else { ! ! m_updateCountThisTransaction++; // Collect statistics. ! ! } } *************** *** 1362,1376 **** checkIfOpen(); ! int counter = getNativeTransactionCounter(); ! ! if (counter > 0) { ! log.warn("Native transaction is open: counter=" + counter, ! new RuntimeException("Warning")); ! } - try { - commit(); // force commit. } finally { --- 1386,1402 ---- checkIfOpen(); ! try { ! int counter = getNativeTransactionCounter(); ! if (counter > 0) { ! ! log.warn("Native transaction is open: counter=" + counter, ! new RuntimeException("Warning")); ! ! commit(); // force commit. ! ! } } finally { |
From: Bryan T. <tho...@us...> - 2007-12-04 20:30:46
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26710/src/java/org/CognitiveWeb/generic/core Modified Files: LinkSetIndex.java AbstractBTree.java Log Message: working through changes to variable length text fields embedded within multi-field keys to support GOM and the sparse row store. Index: AbstractBTree.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/AbstractBTree.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractBTree.java 30 Nov 2007 21:54:08 -0000 1.6 --- AbstractBTree.java 4 Dec 2007 20:30:42 -0000 1.7 *************** *** 63,66 **** --- 63,67 ---- import org.CognitiveWeb.generic.core.ndx.Successor; import org.CognitiveWeb.generic.core.om.BaseObject; + import org.apache.log4j.Logger; /** *************** *** 78,81 **** --- 79,84 ---- public abstract class AbstractBTree extends BaseObject { + + protected static final Logger log = Logger.getLogger(AbstractBTree.class); // *************** *** 325,328 **** --- 328,341 ---- } + /** + * Method offers an opportunity to flush the backend BTree object to the + * store (default is NOP). If necessary, you can replace the + * {@link #_nativeBTreeId} in this method. The method is invoked whever the + * {@link AbstractBTree} object is serialized. + */ + protected void saveBTree() { + + } + //************************************************************ //********************* Externalizable *********************** *************** *** 331,340 **** /** * <p> ! * This class has NO persistent state - concrete classes MUST extend this ! * method to write out any additional persistent state. * </p> */ public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); --- 344,354 ---- /** * <p> ! * Extended to write out the metadata associated with the BTree. * </p> */ public void writeExternal(ObjectOutput out) throws IOException { + saveBTree(); + super.writeExternal(out); *************** *** 347,352 **** /** ! * This class has NO persistent state - concrete classes MUST extend this ! * method to read in any additional persistent state. */ public void readExternal(ObjectInput in) throws IOException, --- 361,367 ---- /** ! * <p> ! * Extended to read in the metadata associated with the BTree. ! * </p> */ public void readExternal(ObjectInput in) throws IOException, *************** *** 386,389 **** --- 401,406 ---- AbstractBTree tmp = (AbstractBTree) obj; + tmp.saveBTree(); + out.writePackedOId(tmp._nativeBTreeId); out.serialize(tmp._coercer); Index: LinkSetIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/LinkSetIndex.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** LinkSetIndex.java 30 Nov 2007 21:54:08 -0000 1.18 --- LinkSetIndex.java 4 Dec 2007 20:30:42 -0000 1.19 *************** *** 1447,1450 **** --- 1447,1452 ---- // returns theValue is non-null). + log.debug("what="+gx+", value="+theValue); + add(getInternalKey(true, theValue, gx), gx); *************** *** 1582,1585 **** --- 1584,1589 ---- m_btreeId = m_btree.getOID(); // Save the oid of the BTree. + + log.info("btreeId="+m_btreeId+", nentries="+m_btree.size()); /* *************** *** 1610,1613 **** --- 1614,1618 ---- } + log.info(""); getBTree(); // make sure that the btree object is loaded. *************** *** 1638,1641 **** --- 1643,1648 ---- } + log.info("linkSetSize=" + getLinkSet().size() + ", indexSize=" + size()); + final IPropertyClass valuePropertyClass = getValuePropertyClass(); *************** *** 1644,1650 **** while (itr.hasNext()) { ! Generic what = (Generic) itr.next(); ! drop(getInternalKey(true, what.get(valuePropertyClass), what), what); what.removePropertyChangeListener(valuePropertyClass, this); --- 1651,1661 ---- while (itr.hasNext()) { ! final Generic what = (Generic) itr.next(); ! final Object value = what.get(valuePropertyClass); ! ! log.debug("what="+what+", value="+value); ! ! drop(getInternalKey(true, value, what), what); what.removePropertyChangeListener(valuePropertyClass, this); |
From: Bryan T. <tho...@us...> - 2007-12-04 20:30:36
|
Update of /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26687/src/java/org/CognitiveWeb/generic/core/ndx Modified Files: TestAll.java AbstractIndexTest.java TestLongTypeIndex.java Log Message: working through changes to variable length text fields embedded within multi-field keys to support GOM and the sparse row store. Index: AbstractIndexTest.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/AbstractIndexTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractIndexTest.java 1 Dec 2007 10:57:59 -0000 1.7 --- AbstractIndexTest.java 4 Dec 2007 20:30:32 -0000 1.8 *************** *** 77,80 **** --- 77,84 ---- * @version $Id$ * + * FIXME {@link TestUntypedHomogenousIntegerIndex} and friends should select their + * keys randomly from the appropriate value type rather than choosing the value + * type randomly. + * * @todo Add tests for more of the methods on the ILinkSetIndex API. Are there * features being tested by <code>generic-test</code> that are not being *************** *** 939,943 **** * reopen. */ ! Op gen = new Op(.2f, .05f, .2f, .005f, .2f, .005f, .001f, .001f, .005f, .0005f); return gen; --- 943,947 ---- * reopen. */ ! Op gen = new Op(.2f, .05f, .2f, .005f, .2f, .005f, .001f, .001f, .0001f, .0005f); return gen; *************** *** 1255,1262 **** * @todo indexEverything, duplicateKeys, sortNullsToEnd */ ! ILinkSetIndexClass indexClass = assocClass.addIndexClass(valueClass); Generic g = new Generic(om); LinkSet linkSet = g.getLinkSet(assocClass); LinkSetIndex ndx = (LinkSetIndex) linkSet.getIndex(valueClass); --- 1259,1271 ---- * @todo indexEverything, duplicateKeys, sortNullsToEnd */ ! // ILinkSetIndexClass indexClass = assocClass.addIndexClass(valueClass); + // object collects the link set. Generic g = new Generic(om); + + // the link set. LinkSet linkSet = g.getLinkSet(assocClass); + + // the link set index. LinkSetIndex ndx = (LinkSetIndex) linkSet.getIndex(valueClass); *************** *** 1293,1303 **** // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); - // delete the object. - t.remove(); - oids.remove(oid); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } break; --- 1302,1312 ---- // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } + // delete the object. + t.remove(); + oids.remove(oid); break; *************** *** 1314,1325 **** // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); - // add to the link set. - t.set(assocClass, g); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } break; } case Op.unlink: { /* --- 1323,1335 ---- // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } + // add to the link set. + t.set(assocClass, g); break; } + case Op.unlink: { /* *************** *** 1332,1341 **** // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); - // remove from the link set. - t.set(assocClass, null); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } break; } --- 1342,1351 ---- // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } + // remove from the link set. + t.set(assocClass, null); break; } *************** *** 1347,1357 **** Generic t = (Generic) om.fetch(oid.longValue()); // set the property value ! t.set(valueClass, keyGen.nextKey() ); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" ! + gen.getName(op) + ", oid=" + oid); } break; } case Op.clear: { // randomly choose an existing object. --- 1357,1370 ---- Generic t = (Generic) om.fetch(oid.longValue()); // set the property value ! final Object newValue = keyGen.nextKey(); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" ! + gen.getName(op) + ", oid=" + oid + ", newValue=[" ! + newValue + "]"); } + final Object oldValue = t.set(valueClass, newValue ); break; } + case Op.clear: { // randomly choose an existing object. *************** *** 1359,1368 **** // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); - // clear the property value - t.set(valueClass, null); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } break; } --- 1372,1381 ---- // fetch the object. Generic t = (Generic) om.fetch(oid.longValue()); if (logOps) { System.err.println("log: op#" + (optotal + 1) + "=" + gen.getName(op) + ", oid=" + oid); } + // clear the property value + final Object oldValue = t.set(valueClass, null); break; } *************** *** 1371,1375 **** if (logOps||true) { System.err.println("log: op#" + (optotal + 1) + "=" ! + gen.getName(op)); } ndx.rebuildIndex(); --- 1384,1388 ---- if (logOps||true) { System.err.println("log: op#" + (optotal + 1) + "=" ! + gen.getName(op)+", nentries="+ndx.size()); } ndx.rebuildIndex(); *************** *** 1378,1381 **** --- 1391,1398 ---- case Op.verify: { + if (logOps) { + System.err.println("log: op#" + (optotal + 1) + "=" + + gen.getName(op)); + } verify(linkSet, ndx); break; *************** *** 1794,1801 **** */ public void test_stress() { doStressTest(// ! 10000,// maxCreated ! 100000,// maxOps getOpGenerator(),// true//logOps --- 1811,1823 ---- */ public void test_stress() { + + final int maxCreated = 10000; + + final int maxOps = 10000; + // final int maxOps = 100000; doStressTest(// ! maxCreated, ! maxOps, getOpGenerator(),// true//logOps Index: TestAll.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestAll.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestAll.java 14 Jun 2006 15:27:53 -0000 1.4 --- TestAll.java 4 Dec 2007 20:30:32 -0000 1.5 *************** *** 48,51 **** --- 48,53 ---- package org.CognitiveWeb.generic.core.ndx; + import org.CognitiveWeb.generic.core.ndx.AbstractIndexTest.TestOp; + import junit.framework.Test; import junit.framework.TestCase; *************** *** 83,86 **** --- 85,92 ---- TestSuite suite = new TestSuite(TestAll.class.getName()); + // test suite for a test helper class. + suite.addTestSuite(TestOp.class); + + // strongly typed link set index test suites. suite.addTestSuite(TestByteTypeIndex.class); suite.addTestSuite(TestCharacterTypeIndex.class); *************** *** 92,99 **** suite.addTestSuite(TestStringTypeIndex.class); suite.addTestSuite(TestUntypedHomogenousStringIndex.class); suite.addTestSuite(TestUntypedHomogenousIntegerIndex.class); suite.addTestSuite(TestUntypedHomogenousFloatIndex.class); ! suite.addTestSuite(TestUntypedHeterogenousIndex.class); --- 98,107 ---- suite.addTestSuite(TestStringTypeIndex.class); + // untyped link set index test suites where all values are a specific type. suite.addTestSuite(TestUntypedHomogenousStringIndex.class); suite.addTestSuite(TestUntypedHomogenousIntegerIndex.class); suite.addTestSuite(TestUntypedHomogenousFloatIndex.class); ! ! // untyped link set index test suite where value types are random. suite.addTestSuite(TestUntypedHeterogenousIndex.class); Index: TestLongTypeIndex.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/TestLongTypeIndex.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestLongTypeIndex.java 10 Jun 2006 18:15:53 -0000 1.3 --- TestLongTypeIndex.java 4 Dec 2007 20:30:32 -0000 1.4 *************** *** 48,52 **** --- 48,57 ---- package org.CognitiveWeb.generic.core.ndx; + import org.CognitiveWeb.generic.core.AbstractBTree; + import org.CognitiveWeb.generic.core.Generic; + import org.CognitiveWeb.generic.core.LinkSet; import org.CognitiveWeb.generic.core.LinkSetIndex; + import org.CognitiveWeb.generic.core.PropertyClass; + import org.CognitiveWeb.generic.core.om.ObjectManager; /** *************** *** 72,74 **** --- 77,235 ---- } + /** + * Test for a bug appearing during the stress tests. The bug has been + * resolved. The source of the problem was that the bigdata btree object + * needed to be explicitly flushed to the backing store and the native long + * identifer for the btree updated to the new btree metadata record. This + * was done by adding {@link AbstractBTree#saveBTree()} + * <p> + * The log of relevant events was: + * + * <pre> + * log: op#833=create, oid=237 + * log: op#911=set, oid=237, newValue=[-1239459367612892870] + * log: op#922=set, oid=237, newValue=[5701148150371898969] + * log: op#1200=set, oid=237, newValue=[7448135811865118996] + * log: op#2483=set, oid=237, newValue=[5130596228767878500] + * log: op#2498=link, oid=237 + * log: op#2726=set, oid=237, newValue=[1751842764225356122] + * + * log: op#1939=verify + * log: op#2553=rebuild + * log: op#2703=reopen + * + * lots of commits: + * ... + * log: op#2281=commit + * log: op#2339=commit + * log: op#2479=commit + * log: op#2578=commit + * </pre> + * + * and resulted in an {@link IllegalStateException} on op#2726. + * <p> + * This test explores the same sequence of operations on a generic object in + * an attempt to an exception similar to + * + * <pre> + * java.lang.IllegalStateException: key=[-57, 51, -118, 22, 69, -85, 13, 100, -128, 0, 0, 0, 0, 0, 0, -19] + * at com.bigdata.gom.MyBTree.remove(MyBTree.java:229) + * at org.CognitiveWeb.generic.core.LinkSetIndex.removeInternalKey(LinkSetIndex.java:2339) + * at org.CognitiveWeb.generic.core.LinkSetIndex.drop(LinkSetIndex.java:2469) + * at org.CognitiveWeb.generic.core.LinkSetIndex.propertyChange(LinkSetIndex.java:1883) + * at org.CognitiveWeb.generic.core.GenericData.firePropertyChangeEvent(GenericData.java:1764) + * at org.CognitiveWeb.generic.core.Generic.firePropertyChangeEvent(Generic.java:2053) + * at org.CognitiveWeb.generic.core.GenericData.set(GenericData.java:966) + * at org.CognitiveWeb.generic.core.Generic.set(Generic.java:772) + * at org.CognitiveWeb.generic.core.ndx.AbstractIndexTest.doStressTest(AbstractIndexTest.java:1356) + * at org.CognitiveWeb.generic.core.ndx.AbstractIndexTest.test_stress(AbstractIndexTest.java:1801) + * at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) + * at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) + * at junit.framework.TestCase.runTest(TestCase.java:154) + * at junit.framework.TestCase.runBare(TestCase.java:127) + * at junit.framework.TestResult$1.protect(TestResult.java:106) + * at junit.framework.TestResult.runProtected(TestResult.java:124) + * at junit.framework.TestResult.run(TestResult.java:109) + * at junit.framework.TestCase.run(TestCase.java:118) + * at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) + * at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) + * at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) + * at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) + * at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) + * at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) + * </pre> + */ + public void test_bug01() { + + ObjectManager om = getNativeObjectManager(); + + /* + * Enter a nested native transaction. + */ + int counter = om.beginNativeTransaction(); + + PropertyClass assocClass = (PropertyClass) om + .getPropertyClass(getUniquePropertyName("assoc")); + + PropertyClass valueClass = (PropertyClass) om + .getPropertyClass(getUniquePropertyName("value")); + + /* + * Set the property type constraint (if any) specified by the test + * class. When set to a non-null value this makes the index strongly + * typed. + */ + + final Class cls = getType(); + + valueClass.setType( cls ); + + // object collects the link set. + Generic g = new Generic(om); + + // the link set. + LinkSet linkSet = g.getLinkSet(assocClass); + + // the link set index. + LinkSetIndex ndx = (LinkSetIndex) linkSet.getIndex(valueClass); + + /* + * + * log: op#833=create, oid=237 + * log: op#911=set, oid=237, newValue=[-1239459367612892870] + * log: op#922=set, oid=237, newValue=[5701148150371898969] + * log: op#1200=set, oid=237, newValue=[7448135811865118996] + * log: op#1939=verify + * log: op#2483=set, oid=237, newValue=[5130596228767878500] + * log: op#2498=link, oid=237 + * log: op#2553=rebuild + * log: op#2703=reopen + * log: op#2726=set, oid=237, newValue=[1751842764225356122] + */ + { + + // create + Generic t = new Generic(om); + // set + t.set(valueClass,Long.valueOf(-1239459367612892870L)); + // set + t.set(valueClass,Long.valueOf(5701148150371898969L)); + // set + t.set(valueClass,Long.valueOf(7448135811865118996L)); + // set + t.set(valueClass,Long.valueOf(5130596228767878500L)); + // link + t.set(assocClass,g); + // rebuild + ((LinkSetIndex)g.getLinkSet(assocClass).getExistingIndex(valueClass)).rebuildIndex(); + // reopen + { + /* + * Incantation to reopen the store and fetch the various + * objects. + */ + counter = om.commitNativeTransaction( counter ); + assertEquals("counter",0,counter); + om = reopenNativeStore(); + counter = om.beginNativeTransaction(); + assertEquals("counter",1,counter); + g = (Generic) om.fetch(g.getOID()); + assocClass = (PropertyClass) om.fetch(assocClass.getOID()); + valueClass = (PropertyClass) om.fetch(valueClass.getOID()); + linkSet = g.getLinkSet(assocClass); + ndx = (LinkSetIndex) linkSet.getIndex(valueClass); + + t = (Generic) om.fetch(t.getOID()); + } + /* + * set - caused exception since (a) the BTree has not been flushed + * to the store; and (b) the address of the BTree metadata record + * had not been updated on the GOM AbstractBTree implementation. + */ + t.set(valueClass,Long.valueOf(1751842764225356122L)); + + } + + } + } |
From: Bryan T. <tho...@us...> - 2007-12-04 15:03:07
|
Update of /cvsroot/cweb/junit-ext/src/java/junit/framework In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv750/src/java/junit/framework Modified Files: TestCase2.java Log Message: replace StringBuffer with StringBuilder Index: TestCase2.java =================================================================== RCS file: /cvsroot/cweb/junit-ext/src/java/junit/framework/TestCase2.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** TestCase2.java 30 Nov 2007 21:53:39 -0000 1.27 --- TestCase2.java 4 Dec 2007 15:03:03 -0000 1.28 *************** *** 1136,1140 **** int n = getNormalInt(len); ! StringBuffer sb = new StringBuffer(n); int index = 0; --- 1136,1140 ---- int n = getNormalInt(len); ! StringBuilder sb = new StringBuilder(n); int index = 0; *************** *** 1587,1591 **** ); ! StringBuffer sb = new StringBuffer(); while( true ) { --- 1587,1591 ---- ); ! StringBuilder sb = new StringBuilder(); while( true ) { *************** *** 1992,1996 **** { ! StringBuffer sb = new StringBuffer(); sb.append --- 1992,1996 ---- { ! StringBuilder sb = new StringBuilder(); sb.append *************** *** 2057,2061 **** if( level == 0 ) return ""; ! StringBuffer sb = new StringBuffer ( level * s.length() ); --- 2057,2061 ---- if( level == 0 ) return ""; ! StringBuilder sb = new StringBuilder ( level * s.length() ); |
From: Bryan T. <tho...@us...> - 2007-12-01 11:01:37
|
Update of /cvsroot/cweb/generic-native/src/test/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28807/src/test/org/CognitiveWeb/generic/core/ndx Modified Files: TestComparators.java Log Message: removed autobox for 1.4 compatibility Index: TestComparators.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/test/org/CognitiveWeb/generic/core/ndx/TestComparators.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestComparators.java 30 Nov 2007 21:54:06 -0000 1.1 --- TestComparators.java 1 Dec 2007 11:01:33 -0000 1.2 *************** *** 74,82 **** public void test_intComparator() { ! final int lmin = Integer.MIN_VALUE; ! final int lm1 = -1; ! final int l0 = 0; ! final int lp1 = 1; ! final int lmax = Integer.MAX_VALUE; // values out of order. --- 74,82 ---- public void test_intComparator() { ! final Integer lmin = new Integer(Integer.MIN_VALUE); ! final Integer lm1 = new Integer(-1); ! final Integer l0 = new Integer(0); ! final Integer lp1 = new Integer(1); ! final Integer lmax = new Integer(Integer.MAX_VALUE); // values out of order. *************** *** 99,107 **** public void test_longComparator() { ! final long lmin = Long.MIN_VALUE; ! final long lm1 = -1L; ! final long l0 = 0L; ! final long lp1 = 1L; ! final long lmax = Long.MAX_VALUE; // values out of order. --- 99,107 ---- public void test_longComparator() { ! final Long lmin = new Long(Long.MIN_VALUE); ! final Long lm1 = new Long(-1L); ! final Long l0 = new Long(0L); ! final Long lp1 = new Long(1L); ! final Long lmax = new Long(Long.MAX_VALUE); // values out of order. |
From: Bryan T. <tho...@us...> - 2007-12-01 10:58:06
|
Update of /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27305/src/java/org/CognitiveWeb/generic/core/ndx Modified Files: AbstractIndexTest.java Log Message: removed use of generics for 1.4 compatibility Index: AbstractIndexTest.java =================================================================== RCS file: /cvsroot/cweb/generic-native-test/src/java/org/CognitiveWeb/generic/core/ndx/AbstractIndexTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractIndexTest.java 30 Nov 2007 21:53:57 -0000 1.6 --- AbstractIndexTest.java 1 Dec 2007 10:57:59 -0000 1.7 *************** *** 1261,1265 **** LinkSetIndex ndx = (LinkSetIndex) linkSet.getIndex(valueClass); ! final Vector<Long> oids = new Vector<Long>(); // of created objects. boolean done = false; int[] opsum = new int[Op.lastOp + 1]; // #of times we do each --- 1261,1265 ---- LinkSetIndex ndx = (LinkSetIndex) linkSet.getIndex(valueClass); ! final Vector oids = new Vector(); // of created objects. boolean done = false; int[] opsum = new int[Op.lastOp + 1]; // #of times we do each |
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29240/src/java/org/CognitiveWeb/generic/core/ndx Modified Files: CharacterComparator.java SuccessorUtil.java ShortComparator.java IntegerComparator.java ByteComparator.java Log Message: Work on the bigdata-GOM integration. Index: ShortComparator.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/ShortComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShortComparator.java 22 May 2006 14:40:24 -0000 1.1 --- ShortComparator.java 30 Nov 2007 21:54:05 -0000 1.2 *************** *** 72,77 **** public int compare(Object obj1, Object obj2) { ! short v1 = ((Short) obj1).shortValue(); ! short v2 = ((Short) obj2).shortValue(); return v1 - v2; --- 72,79 ---- public int compare(Object obj1, Object obj2) { ! ! // note: promote to int to avoid overflow. ! int v1 = ((Short) obj1).shortValue(); ! int v2 = ((Short) obj2).shortValue(); return v1 - v2; Index: CharacterComparator.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/CharacterComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CharacterComparator.java 22 May 2006 14:40:23 -0000 1.1 --- CharacterComparator.java 30 Nov 2007 21:54:05 -0000 1.2 *************** *** 69,74 **** public int compare(Object obj1, Object obj2) { ! char v1 = ((Character) obj1).charValue(); ! char v2 = ((Character) obj2).charValue(); return v1 - v2; --- 69,76 ---- public int compare(Object obj1, Object obj2) { ! ! // Note: convert to int to avoid overflow problems. ! int v1 = ((Character) obj1).charValue(); ! int v2 = ((Character) obj2).charValue(); return v1 - v2; Index: SuccessorUtil.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/SuccessorUtil.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SuccessorUtil.java 11 Jun 2006 10:05:00 -0000 1.3 --- SuccessorUtil.java 30 Nov 2007 21:54:05 -0000 1.4 *************** *** 48,52 **** package org.CognitiveWeb.generic.core.ndx; - /** * Utility methods for calculating the sucessor for various data types. --- 48,51 ---- *************** *** 363,367 **** if (s == null) ! return "\0"; return s + "\0"; --- 362,367 ---- if (s == null) ! // return "\0"; ! return ""; return s + "\0"; Index: IntegerComparator.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/IntegerComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IntegerComparator.java 22 May 2006 14:40:23 -0000 1.1 --- IntegerComparator.java 30 Nov 2007 21:54:05 -0000 1.2 *************** *** 75,82 **** public int compare( Object obj1, Object obj2 ) { ! int v1 = ( (Integer) obj1 ).intValue(); ! int v2 = ( (Integer) obj2 ).intValue(); ! return v1 - v2; } --- 75,85 ---- public int compare( Object obj1, Object obj2 ) { ! final int v1 = ( (Integer) obj1 ).intValue(); ! final int v2 = ( (Integer) obj2 ).intValue(); ! // Note: avoids possible overflow problems. ! if(v1<v2) return -1; ! if(v2>v1) return 1; ! return 0; } Index: ByteComparator.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/ndx/ByteComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ByteComparator.java 22 May 2006 14:40:23 -0000 1.1 --- ByteComparator.java 30 Nov 2007 21:54:05 -0000 1.2 *************** *** 71,76 **** public int compare(Object obj1, Object obj2) { ! byte v1 = ((Byte) obj1).byteValue(); ! byte v2 = ((Byte) obj2).byteValue(); return v1 - v2; --- 71,78 ---- public int compare(Object obj1, Object obj2) { ! ! // convert to int to avoid overflow problems. ! int v1 = ((Byte) obj1).byteValue(); ! int v2 = ((Byte) obj2).byteValue(); return v1 - v2; |
From: Bryan T. <tho...@us...> - 2007-11-30 21:54:40
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/cache In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29240/src/java/org/CognitiveWeb/generic/core/om/cache Modified Files: LRUCache.java Log Message: Work on the bigdata-GOM integration. Index: LRUCache.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/cache/LRUCache.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LRUCache.java 2 Jun 2006 12:58:51 -0000 1.4 --- LRUCache.java 30 Nov 2007 21:54:05 -0000 1.5 *************** *** 61,64 **** --- 61,73 ---- * @author <a href="mailto:tho...@us...">Bryan Thompson * </a> + * + * @todo This can be replaced by a hard reference ring buffer that scans the + * last N entries to minimize churn. This has been implemented in another + * module.<br> + * That same module now includes a generic version of the classes in this + * package. Backport the use of the generic version into the OM (except + * that it may wind up being unsynchronized for use in single threaded + * contexts, so we either need to add a synchronization wapper or not + * reintegrate the two versions). */ |
From: Bryan T. <tho...@us...> - 2007-11-30 21:54:40
|
Update of /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29240/src/java/org/CognitiveWeb/generic/core/om Modified Files: RuntimeOptions.java ObjectManager.java Log Message: Work on the bigdata-GOM integration. Index: ObjectManager.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/ObjectManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ObjectManager.java 15 Jun 2006 15:46:50 -0000 1.10 --- ObjectManager.java 30 Nov 2007 21:54:05 -0000 1.11 *************** *** 1344,1347 **** --- 1344,1348 ---- _removeLazily.clear(); _removeQueue = new ReferenceQueue(); + m_propertyClassCache.clear(); } Index: RuntimeOptions.java =================================================================== RCS file: /cvsroot/cweb/generic-native/src/java/org/CognitiveWeb/generic/core/om/RuntimeOptions.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RuntimeOptions.java 27 May 2006 19:45:35 -0000 1.2 --- RuntimeOptions.java 30 Nov 2007 21:54:05 -0000 1.3 *************** *** 84,87 **** --- 84,92 ---- /** + * Integration with bigdata. + */ + public static final String PERSISTENT_STORE_BIGDATA = "com.bigdata.gom.PersistenceStore"; + + /** * Integration with Objectivity/DB. */ |