From: <tho...@us...> - 2011-01-20 22:06:01
|
Revision: 4149 http://bigdata.svn.sourceforge.net/bigdata/?rev=4149&view=rev Author: thompsonbry Date: 2011-01-20 22:05:55 +0000 (Thu, 20 Jan 2011) Log Message: ----------- Fixed build broken by commit of the memory manager with a missing interface (I just commented out the references to the interface -- see the detailed commit log). Added the addr for which a problem was reported to the runtime exception thrown by the RWStore. Added the TestMemoryManager into the automated test suite runs (TestAll). Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/MemoryManager.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/SectorAllocator.java branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestAll.java Added Paths: ----------- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/sector/TestAll.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2011-01-20 21:54:50 UTC (rev 4148) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2011-01-20 22:05:55 UTC (rev 4149) @@ -1441,7 +1441,7 @@ // log.error(e,e); // throw new IllegalArgumentException("Unable to read data: "+e, e); - throw new RuntimeException(e); + throw new RuntimeException("addr=" + addr + " : cause=" + e, e); } } finally { Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/MemoryManager.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/MemoryManager.java 2011-01-20 21:54:50 UTC (rev 4148) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/MemoryManager.java 2011-01-20 22:05:55 UTC (rev 4149) @@ -82,7 +82,7 @@ if ((m_allocation + m_sectorSize) > m_maxResource) { throw new MemoryManagerResourceError(); } - SectorAllocator sector = new SectorAllocator(this, null); + SectorAllocator sector = new SectorAllocator(this);//, null); sector.setSectorAddress(m_allocation, m_sectorSize); sector.setIndex(m_sectors.size()); m_sectors.add(sector); Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/SectorAllocator.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/SectorAllocator.java 2011-01-20 21:54:50 UTC (rev 4148) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/rwstore/sector/SectorAllocator.java 2011-01-20 22:05:55 UTC (rev 4149) @@ -33,7 +33,7 @@ import com.bigdata.io.DirectBufferPool; import com.bigdata.rwstore.FixedOutputStream; -import com.bigdata.rwstore.IWriteCacheManager; +//import com.bigdata.rwstore.IWriteCacheManager; /** * The SectorAllocator is designed as an alternative the the standard RWStore @@ -126,11 +126,11 @@ final ISectorManager m_store; boolean m_onFreeList = false; private long m_diskAddr; - private final IWriteCacheManager m_writes; +// private final IWriteCacheManager m_writes; - public SectorAllocator(ISectorManager store, IWriteCacheManager writes) { + public SectorAllocator(ISectorManager store) {//, IWriteCacheManager writes) { m_store = store; - m_writes = writes; +// m_writes = writes; } /** @@ -276,10 +276,10 @@ m_store.addToFreeList(this); } - if (m_writes != null && m_writes.removeWriteToAddr(getPhysicalAddress(bit))) { - if (log.isTraceEnabled()) - log.trace("Removed potential DUPLICATE"); - } +// if (m_writes != null && m_writes.removeWriteToAddr(getPhysicalAddress(bit))) { +// if (log.isTraceEnabled()) +// log.trace("Removed potential DUPLICATE"); +// } } return false; Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestAll.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestAll.java 2011-01-20 21:54:50 UTC (rev 4148) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/TestAll.java 2011-01-20 22:05:55 UTC (rev 4149) @@ -63,6 +63,8 @@ suite.addTest(com.bigdata.rwstore.TestRWJournal.suite()); + suite.addTest(com.bigdata.rwstore.sector.TestAll.suite()); + return suite; } Added: branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/sector/TestAll.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/sector/TestAll.java (rev 0) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/rwstore/sector/TestAll.java 2011-01-20 22:05:55 UTC (rev 4149) @@ -0,0 +1,70 @@ +/** + +Copyright (C) SYSTAP, LLC 2006-2007. 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 Oct 14, 2006 + */ + +package com.bigdata.rwstore.sector; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Runs all tests for all journal implementations. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * @version $Id: TestAll.java 4069 2011-01-09 20:58:02Z thompsonbry $ + */ +public class TestAll extends TestCase { + + /** + * + */ + public TestAll() { + } + + /** + * @param arg0 + */ + public TestAll(String arg0) { + super(arg0); + } + + /** + * Returns a test that will run each of the implementation specific test + * suites in turn. + */ + public static Test suite() + { + + final TestSuite suite = new TestSuite("memory manager"); + + suite.addTestSuite(com.bigdata.rwstore.sector.TestMemoryManager.class); + + return suite; + + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |