From: <tho...@us...> - 2010-11-23 14:17:35
|
Revision: 3977 http://bigdata.svn.sourceforge.net/bigdata/?rev=3977&view=rev Author: thompsonbry Date: 2010-11-23 14:17:27 +0000 (Tue, 23 Nov 2010) Log Message: ----------- Merge from TRUNK to BRANCH (r3608:r3976). merge -r3608:HEAD https://bigdata.svn.sourceforge.net/svnroot/bigdata/trunk /root/workspace/bigdata-change-set-branch {{{ --- Merging r3608 through r3976 into /root/workspace/bigdata-change-set-branch U /root/workspace/bigdata-change-set-branch/bigdata-perf/README.txt U /root/workspace/bigdata-change-set-branch/build.xml A /root/workspace/bigdata-change-set-branch/bigdata-compatibility A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src/test A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src/test/com A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src/test/com/bigdata A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src/test/com/bigdata/journal A /root/workspace/bigdata-change-set-branch/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java U /root/workspace/bigdata-change-set-branch/bigdata-sails/src/test/com/bigdata/rdf/sail/TestSids.java A /root/workspace/bigdata-change-set-branch/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPORelation.java U /root/workspace/bigdata-change-set-branch/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabulary.java Merge complete. ===== File Statistics: ===== Added: 7 Updated: 4 }}} This change set incorporates the following: - BaseVocabulary: change to use the as generated serialVersionUID from the last release. - TestSids: javadoc. - bigdata-perf/README.txt: note concerning the use of the ant bundleJar target. - build.xml: removed the jini dependencies from the Sesame WAR deployment target "install-sesame-server". - bigdata-compatibility: some initial steps towards https://sourceforge.net/apps/trac/bigdata/ticket/171 (binary compatibility test suite). Modified Paths: -------------- branches/CHANGE_SET_BRANCH/bigdata-perf/README.txt branches/CHANGE_SET_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabulary.java branches/CHANGE_SET_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestSids.java branches/CHANGE_SET_BRANCH/build.xml Added Paths: ----------- branches/CHANGE_SET_BRANCH/bigdata-compatibility/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java Removed Paths: ------------- branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java Deleted: branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java =================================================================== --- trunk/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java 2010-11-22 21:12:22 UTC (rev 3976) +++ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java 2010-11-23 14:17:27 UTC (rev 3977) @@ -1,276 +0,0 @@ -/* - -Copyright (C) SYSTAP, LLC 2006-2008. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ -/* - * Created on Nov 19, 2010 - */ -package com.bigdata.journal; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; -import java.util.UUID; - -import junit.framework.TestCase2; - -import com.bigdata.Banner; -import com.bigdata.btree.IIndex; -import com.bigdata.btree.IndexMetadata; - -/** - * Test suite for binary compatibility, portability, and forward compatibility - * or automated migration of persistent stores and persistence or serialization - * capable objects across different bigdata releases. The tests in this suite - * rely on artifacts which are archived within SVN. - * - * @todo create w/ small extent and truncate (RW store does not support - * truncate). - * - * @todo test binary migration and forward compatibility. - * - * @todo stubs to create and organize artifacts,etc. - * - * @todo data driven test suite? - * - * @todo create artifact for each release, name the artifacts systematically, - * e.g., test.release.(RW|WORM).jnl or test.release.seg. Collect a list of - * the created artifacts and run each test against each of the versions of - * the artifact. - * - * @todo Force artifact file name case for file system compatibility? - * - * @todo test journal (WORM and RW), btree, index segment, row store, persistent - * data structures (checkpoints, index metadata, tuple serializers, etc.), - * RDF layer, RMI message formats, etc. - * - * @todo Specific tests for - * <p> - * Name2Addr and DefaultKeyBuilderFactory portability problem. See - * https://sourceforge.net/apps/trac/bigdata/ticket/193 - * <p> - * WORM global row store resolution problem introduced in the - * JOURNAL_HA_BRANCH. See - * https://sourceforge.net/apps/trac/bigdata/ticket/171#comment:5 - * <p> - * Sparse row store JDK encoding problem: - * https://sourceforge.net/apps/trac/bigdata/ticket/107 - */ -public class TestBinaryCompatibility extends TestCase2 { - - /** - * - */ - public TestBinaryCompatibility() { - } - - /** - * @param name - */ - public TestBinaryCompatibility(String name) { - super(name); - } - - /** - * @todo munge the release version into a name that is compatibility with - * the file system ("." to "_"). Store artifacts at each release? At - * each release in which an incompatibility is introduced? At each - * release in which a persistence capable data structure or change is - * introduced? - */ - static protected final File artifactDir = new File( - "bigdata-compatibility/src/resources/artifacts"); - - protected static class Version { - private final String version; - private final String revision; - public Version(String version,String revision) { - this.version = version; - this.revision = revision; - } - - /** - * The bigdata version number associated with the release. This is in - * the form <code>xx.yy.zz</code> - */ - public String getVersion() { - return version; - } - - /** - * The SVN repository revision associated with the release. This is in - * the form <code>####</code>. - */ - public String getRevision() { - return revision; - } - } - - /** - * Known release versions. - */ - protected static Version V_0_83_2 = new Version("0.83.2", "3349"); - - /** - * Tested Versions. - */ - protected Version[] versions = new Version[] { - V_0_83_2 - }; - - protected void setUp() throws Exception { - - Banner.banner(); - - super.setUp(); - - if (!artifactDir.exists()) { - - if (!artifactDir.mkdirs()) { - - throw new IOException("Could not create: " + artifactDir); - - } - - } - - for (Version version : versions) { - - final File versionDir = new File(artifactDir, version.getVersion()); - - if (!versionDir.exists()) { - - if (!versionDir.mkdirs()) { - - throw new IOException("Could not create: " + versionDir); - - } - - } - - } - - } - - protected void tearDown() throws Exception { - - super.tearDown(); - - } - - /** - * @throws Throwable - * - * @todo Each 'test' should run an instance of a class which knows how to - * create the appropriate artifacts and how to test them. - */ - public void test_WORM_compatibility_with_JOURNAL_HA_BRANCH() - throws Throwable { - - final Version version = V_0_83_2; - - final File versionDir = new File(artifactDir, version.getVersion()); - - final File artifactFile = new File(versionDir, getName() - + BufferMode.DiskWORM + Journal.Options.JNL); - - if (!artifactFile.exists()) { - - createArtifact(artifactFile); - - } - - verifyArtifact(artifactFile); - - } - - protected void createArtifact(final File artifactFile) throws Throwable { - - if (log.isInfoEnabled()) - log.info("Creating: " + artifactFile); - - final Properties properties = new Properties(); - - properties.setProperty(Journal.Options.FILE, artifactFile.toString()); - - properties.setProperty(Journal.Options.INITIAL_EXTENT, "" - + Journal.Options.minimumInitialExtent); - - final Journal journal = new Journal(properties); - - try { - - final IndexMetadata md = new IndexMetadata(UUID.randomUUID()); - - final IIndex ndx = journal.registerIndex("kb.spo.SPO", md); - - ndx.insert(1,1); - - journal.commit(); - - // reduce to minimum footprint. - journal.truncate(); - - } catch (Throwable t) { - - journal.destroy(); - - throw new RuntimeException(t); - - } finally { - - if (journal.isOpen()) - journal.close(); - - } - - } - - protected void verifyArtifact(final File artifactFile) throws Throwable { - - if (log.isInfoEnabled()) - log.info("Verifying: " + artifactFile); - - final Properties properties = new Properties(); - - properties.setProperty(Journal.Options.FILE, artifactFile.toString()); - - final Journal journal = new Journal(properties); - - try { - - final IIndex ndx = journal.getIndex("kb.spo.SPO"); - - assertNotNull(ndx); - - assertEquals(1,ndx.lookup(1)); - - } finally { - - journal.close(); - - } - - } - -} Copied: branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java (from rev 3976, trunk/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java) =================================================================== --- branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java (rev 0) +++ branches/CHANGE_SET_BRANCH/bigdata-compatibility/src/test/com/bigdata/journal/TestBinaryCompatibility.java 2010-11-23 14:17:27 UTC (rev 3977) @@ -0,0 +1,276 @@ +/* + +Copyright (C) SYSTAP, LLC 2006-2008. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ +/* + * Created on Nov 19, 2010 + */ +package com.bigdata.journal; + +import java.io.File; +import java.io.IOException; +import java.util.Properties; +import java.util.UUID; + +import junit.framework.TestCase2; + +import com.bigdata.Banner; +import com.bigdata.btree.IIndex; +import com.bigdata.btree.IndexMetadata; + +/** + * Test suite for binary compatibility, portability, and forward compatibility + * or automated migration of persistent stores and persistence or serialization + * capable objects across different bigdata releases. The tests in this suite + * rely on artifacts which are archived within SVN. + * + * @todo create w/ small extent and truncate (RW store does not support + * truncate). + * + * @todo test binary migration and forward compatibility. + * + * @todo stubs to create and organize artifacts,etc. + * + * @todo data driven test suite? + * + * @todo create artifact for each release, name the artifacts systematically, + * e.g., test.release.(RW|WORM).jnl or test.release.seg. Collect a list of + * the created artifacts and run each test against each of the versions of + * the artifact. + * + * @todo Force artifact file name case for file system compatibility? + * + * @todo test journal (WORM and RW), btree, index segment, row store, persistent + * data structures (checkpoints, index metadata, tuple serializers, etc.), + * RDF layer, RMI message formats, etc. + * + * @todo Specific tests for + * <p> + * Name2Addr and DefaultKeyBuilderFactory portability problem. See + * https://sourceforge.net/apps/trac/bigdata/ticket/193 + * <p> + * WORM global row store resolution problem introduced in the + * JOURNAL_HA_BRANCH. See + * https://sourceforge.net/apps/trac/bigdata/ticket/171#comment:5 + * <p> + * Sparse row store JDK encoding problem: + * https://sourceforge.net/apps/trac/bigdata/ticket/107 + */ +public class TestBinaryCompatibility extends TestCase2 { + + /** + * + */ + public TestBinaryCompatibility() { + } + + /** + * @param name + */ + public TestBinaryCompatibility(String name) { + super(name); + } + + /** + * @todo munge the release version into a name that is compatibility with + * the file system ("." to "_"). Store artifacts at each release? At + * each release in which an incompatibility is introduced? At each + * release in which a persistence capable data structure or change is + * introduced? + */ + static protected final File artifactDir = new File( + "bigdata-compatibility/src/resources/artifacts"); + + protected static class Version { + private final String version; + private final String revision; + public Version(String version,String revision) { + this.version = version; + this.revision = revision; + } + + /** + * The bigdata version number associated with the release. This is in + * the form <code>xx.yy.zz</code> + */ + public String getVersion() { + return version; + } + + /** + * The SVN repository revision associated with the release. This is in + * the form <code>####</code>. + */ + public String getRevision() { + return revision; + } + } + + /** + * Known release versions. + */ + protected static Version V_0_83_2 = new Version("0.83.2", "3349"); + + /** + * Tested Versions. + */ + protected Version[] versions = new Version[] { + V_0_83_2 + }; + + protected void setUp() throws Exception { + + Banner.banner(); + + super.setUp(); + + if (!artifactDir.exists()) { + + if (!artifactDir.mkdirs()) { + + throw new IOException("Could not create: " + artifactDir); + + } + + } + + for (Version version : versions) { + + final File versionDir = new File(artifactDir, version.getVersion()); + + if (!versionDir.exists()) { + + if (!versionDir.mkdirs()) { + + throw new IOException("Could not create: " + versionDir); + + } + + } + + } + + } + + protected void tearDown() throws Exception { + + super.tearDown(); + + } + + /** + * @throws Throwable + * + * @todo Each 'test' should run an instance of a class which knows how to + * create the appropriate artifacts and how to test them. + */ + public void test_WORM_compatibility_with_JOURNAL_HA_BRANCH() + throws Throwable { + + final Version version = V_0_83_2; + + final File versionDir = new File(artifactDir, version.getVersion()); + + final File artifactFile = new File(versionDir, getName() + + BufferMode.DiskWORM + Journal.Options.JNL); + + if (!artifactFile.exists()) { + + createArtifact(artifactFile); + + } + + verifyArtifact(artifactFile); + + } + + protected void createArtifact(final File artifactFile) throws Throwable { + + if (log.isInfoEnabled()) + log.info("Creating: " + artifactFile); + + final Properties properties = new Properties(); + + properties.setProperty(Journal.Options.FILE, artifactFile.toString()); + + properties.setProperty(Journal.Options.INITIAL_EXTENT, "" + + Journal.Options.minimumInitialExtent); + + final Journal journal = new Journal(properties); + + try { + + final IndexMetadata md = new IndexMetadata(UUID.randomUUID()); + + final IIndex ndx = journal.registerIndex("kb.spo.SPO", md); + + ndx.insert(1,1); + + journal.commit(); + + // reduce to minimum footprint. + journal.truncate(); + + } catch (Throwable t) { + + journal.destroy(); + + throw new RuntimeException(t); + + } finally { + + if (journal.isOpen()) + journal.close(); + + } + + } + + protected void verifyArtifact(final File artifactFile) throws Throwable { + + if (log.isInfoEnabled()) + log.info("Verifying: " + artifactFile); + + final Properties properties = new Properties(); + + properties.setProperty(Journal.Options.FILE, artifactFile.toString()); + + final Journal journal = new Journal(properties); + + try { + + final IIndex ndx = journal.getIndex("kb.spo.SPO"); + + assertNotNull(ndx); + + assertEquals(1,ndx.lookup(1)); + + } finally { + + journal.close(); + + } + + } + +} Modified: branches/CHANGE_SET_BRANCH/bigdata-perf/README.txt =================================================================== --- branches/CHANGE_SET_BRANCH/bigdata-perf/README.txt 2010-11-22 21:12:22 UTC (rev 3976) +++ branches/CHANGE_SET_BRANCH/bigdata-perf/README.txt 2010-11-23 14:17:27 UTC (rev 3977) @@ -1,2 +1,6 @@ This module contains drivers for a variety of data sets and benchmarks used as -part of a performance test suite. \ No newline at end of file +part of a performance test suite. + +Note: You must run "ant bundleJar" in the top-level directory first. This will +build the bigdata code base and bundle together the various dependencies so they +will be available for the ant scripts in this module. Modified: branches/CHANGE_SET_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabulary.java =================================================================== --- branches/CHANGE_SET_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabulary.java 2010-11-22 21:12:22 UTC (rev 3976) +++ branches/CHANGE_SET_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/vocab/BaseVocabulary.java 2010-11-23 14:17:27 UTC (rev 3977) @@ -65,6 +65,11 @@ final static public Logger log = Logger.getLogger(BaseVocabulary.class); /** + * The serialVersionUID as reported by the trunk on Oct 6, 2010. + */ + private static final long serialVersionUID = 1560142397515291331L; + + /** * The database that is the authority for the defined terms and term * identifiers. This will be <code>null</code> when the de-serialization * ctor is used. Modified: branches/CHANGE_SET_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestSids.java =================================================================== --- branches/CHANGE_SET_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestSids.java 2010-11-22 21:12:22 UTC (rev 3976) +++ branches/CHANGE_SET_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestSids.java 2010-11-23 14:17:27 UTC (rev 3977) @@ -44,6 +44,8 @@ import com.bigdata.rdf.vocab.NoVocabulary; /** + * Test case for reverse lookup from SID to statement. + * * @author <a href="mailto:mrp...@us...">Mike Personick</a> * @version $Id$ */ Modified: branches/CHANGE_SET_BRANCH/build.xml =================================================================== --- branches/CHANGE_SET_BRANCH/build.xml 2010-11-22 21:12:22 UTC (rev 3976) +++ branches/CHANGE_SET_BRANCH/build.xml 2010-11-23 14:17:27 UTC (rev 3977) @@ -1992,10 +1992,12 @@ <fileset dir="${bigdata.dir}/bigdata/lib"> <include name="**/*.jar" /> </fileset> +<!-- Jini should not be required for the Sesame WAR. <fileset dir="${bigdata.dir}/bigdata-jini/lib/jini/lib"> <include name="jini-core.jar" /> <include name="jini-ext.jar" /> </fileset> + --> </copy> <!-- copy resources to Workbench webapp. --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |