Return-Path: X-Original-To: apmail-incubator-jena-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-jena-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B02168C7 for ; Fri, 15 Jul 2011 15:00:47 +0000 (UTC) Received: (qmail 96578 invoked by uid 500); 15 Jul 2011 15:00:47 -0000 Delivered-To: apmail-incubator-jena-commits-archive@incubator.apache.org Received: (qmail 96556 invoked by uid 500); 15 Jul 2011 15:00:47 -0000 Mailing-List: contact jena-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jena-dev@incubator.apache.org Delivered-To: mailing list jena-commits@incubator.apache.org Received: (qmail 96518 invoked by uid 99); 15 Jul 2011 15:00:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 15:00:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 15:00:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1ED8323889EC; Fri, 15 Jul 2011 15:00:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1147178 - in /incubator/jena/Experimental/TxTDB/trunk: ./ src/main/java/com/hp/hpl/jena/tdb/transaction/ src/test/java/com/hp/hpl/jena/tdb/transaction/ Date: Fri, 15 Jul 2011 15:00:18 -0000 To: jena-commits@incubator.apache.org From: andy@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110715150019.1ED8323889EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: andy Date: Fri Jul 15 15:00:17 2011 New Revision: 1147178 URL: http://svn.apache.org/viewvc?rev=1147178&view=rev Log: (empty) Added: incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml (with props) Modified: incubator/jena/Experimental/TxTDB/trunk/log4j.properties incubator/jena/Experimental/TxTDB/trunk/pom.xml incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Journal.java incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/JournalControl.java incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestObjectFileTrans.java Added: incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml?rev=1147178&view=auto ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml (added) +++ incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml Fri Jul 15 15:00:17 2011 @@ -0,0 +1,30 @@ + + + + tests + ${project.name}-${project.version} + + + zip + + + + + + testing + + + + + test.sh + + + + + + Propchange: incubator/jena/Experimental/TxTDB/trunk/assembly-testing.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: incubator/jena/Experimental/TxTDB/trunk/log4j.properties URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/log4j.properties?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/log4j.properties (original) +++ incubator/jena/Experimental/TxTDB/trunk/log4j.properties Fri Jul 15 15:00:17 2011 @@ -18,8 +18,7 @@ log4j.logger.org.openjena.riot=INFO # TDB log4j.logger.com.hp.hpl.jena.tdb=INFO -log4j.logger.com.hp.hpl.jena.tdb.transaction=ALL -log4j.logger.com.hp.hpl.jena.sparql.core.DatasetPrefixStorage=INFO +#log4j.logger.com.hp.hpl.jena.tdb.transaction=ALL # Joseki server log4j.logger.org.joseki=INFO Modified: incubator/jena/Experimental/TxTDB/trunk/pom.xml URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/pom.xml?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/pom.xml (original) +++ incubator/jena/Experimental/TxTDB/trunk/pom.xml Fri Jul 15 15:00:17 2011 @@ -16,9 +16,10 @@ http://openjena.org/TDB - OpenJena - http://www.openjena.org/ + Apache Jena + http://incubator.apache.org/jena + Andy Seaborne @@ -30,14 +31,18 @@ - BSD-style license - http://openjena.org/license.html + Apache 2.0 License + http://www.apache.org/licenses/LICENSE-2.0 - scm:svn:https://jena.svn.sourceforge.net/svnroot/jena/TDB/ - http://jena.svn.sourceforge.net/viewvc/jena/TDB/ + + scm:svn:https://svn.apache.org/repos/asf/incubator/jena/Experimental/TxTDB/ + http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/ @@ -401,7 +406,6 @@ build.time.txt=${build.time.txt} - http://openjena.org/repo-dev jena-repo @@ -414,14 +418,59 @@ build.time.txt=${build.time.txt} default + + jena-repo-dev Jena development repo sftp://openjena.org/var/repo-dev - default + + JIRA + http://issues.apache.org/jira/browse/JENA + + + + + Users + jena-users@incubator.apache.org + jena-users-subscribe@incubator.apache.org + jena-users-unsubscribe@incubator.apache.org + http://mail-archives.apache.org/mod_mbox/incubator-jena-users/ + + http://incubator.apache.org/mail/jena-users/ + + + + Development + jena-dev@incubator.apache.org + jena-dev-subscribe@incubator.apache.org + jena-dev-unsubscribe@incubator.apache.org + http://mail-archives.apache.org/mod_mbox/incubator-jena-dev/ + + http://incubator.apache.org/mail/jena-dev/ + + + + Commits + jena-commits@incubator.apache.org + jena-commits-subscribe@incubator.apache.org + jena-commits-unsubscribe@incubator.apache.org + http://mail-archives.apache.org/mod_mbox/incubator-jena-commits/ + + http://incubator.apache.org/mail/jena-commits/ + + + + Modified: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Journal.java URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Journal.java?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Journal.java (original) +++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Journal.java Fri Jul 15 15:00:17 2011 @@ -14,6 +14,7 @@ import java.util.Iterator ; import org.openjena.atlas.iterator.IteratorSlotted ; import org.openjena.atlas.lib.Closeable ; +import org.openjena.atlas.lib.FileOps ; import org.openjena.atlas.lib.Sync ; import org.slf4j.Logger ; import org.slf4j.LoggerFactory ; @@ -21,7 +22,10 @@ import org.slf4j.LoggerFactory ; import com.hp.hpl.jena.tdb.base.block.Block ; import com.hp.hpl.jena.tdb.base.file.BufferChannel ; import com.hp.hpl.jena.tdb.base.file.BufferChannelFile ; +import com.hp.hpl.jena.tdb.base.file.BufferChannelMem ; +import com.hp.hpl.jena.tdb.base.file.Location ; import com.hp.hpl.jena.tdb.sys.FileRef ; +import com.hp.hpl.jena.tdb.sys.Names ; /** The Journal is slightly odd - it is append-only for write but random read. * The write performance is more important than read; reads only happen @@ -45,14 +49,32 @@ class Journal implements Iterable 0 ) { - Journal jrnl = new Journal(journalFilename) ; + Journal jrnl = Journal.create(loc) ; // Scan for commit. boolean committed = false ; for ( JournalEntry e : jrnl ) Modified: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java (original) +++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/Transaction.java Fri Jul 15 15:00:17 2011 @@ -51,7 +51,7 @@ public class Transaction this.txnMgr = txnMgr ; this.basedsg = dsg ; this.mode = mode ; - this.journal = txnMgr.getJournal() ; + this.journal = ( txnMgr == null ) ? null : txnMgr.getJournal() ; activedsg = null ; // Don't know yet. this.iterators = new ArrayList>() ; state = TxnState.ACTIVE ; Modified: incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java (original) +++ incubator/jena/Experimental/TxTDB/trunk/src/main/java/com/hp/hpl/jena/tdb/transaction/TransactionManager.java Fri Jul 15 15:00:17 2011 @@ -24,11 +24,7 @@ import org.slf4j.LoggerFactory ; import com.hp.hpl.jena.tdb.DatasetGraphTxn ; import com.hp.hpl.jena.tdb.ReadWrite ; -import com.hp.hpl.jena.tdb.base.file.BufferChannel ; -import com.hp.hpl.jena.tdb.base.file.BufferChannelFile ; -import com.hp.hpl.jena.tdb.base.file.BufferChannelMem ; import com.hp.hpl.jena.tdb.store.DatasetGraphTDB ; -import com.hp.hpl.jena.tdb.sys.Names ; import com.hp.hpl.jena.tdb.sys.SystemTDB ; public class TransactionManager @@ -68,16 +64,8 @@ public class TransactionManager public TransactionManager(DatasetGraphTDB dsg) { -// if ( ! ( dsg instanceof DatasetGraphTDB ) ) -// throw new TDBException("Not a TDB-backed dataset") ; this.baseDataset = dsg ; - - BufferChannel chan ; - if ( dsg.getLocation().isMem() ) - chan = BufferChannelMem.create() ; - else - chan = new BufferChannelFile(dsg.getLocation().absolute(Names.journalFile)) ; - this.journal = new Journal(chan) ; + this.journal = Journal.create(dsg.getLocation()) ; // LATER // Committer c = new Committer() ; // this.committerThread = new Thread(c) ; @@ -206,7 +194,7 @@ public class TransactionManager // Process any pending commits held up due to a reader. if ( readers == 0 && writers == 0 ) { - // Given this is sync'ed to the TransactionManager, + // Given this is sync'ed to this TransactionManager, // the query never blocks, nor does it need to be concurrent-safe. // later ... while ( queue.size() > 0 ) @@ -236,7 +224,6 @@ public class TransactionManager else writers-- ; activeTransactions.remove(transaction) ; - } public Journal getJournal() Modified: incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestObjectFileTrans.java URL: http://svn.apache.org/viewvc/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestObjectFileTrans.java?rev=1147178&r1=1147177&r2=1147178&view=diff ============================================================================== --- incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestObjectFileTrans.java (original) +++ incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/AbstractTestObjectFileTrans.java Fri Jul 15 15:00:17 2011 @@ -32,10 +32,12 @@ public abstract class AbstractTestObject abstract ObjectFile createFile(String basename) ; abstract void deleteFile(String basename) ; + TransactionManager tm = null ; + @Before public void setup() { - txn = new Transaction(null, WRITE, ++count, null, null) ; + txn = new Transaction(null, WRITE, ++count, null, tm) ; file1 = createFile("base") ; file2 = createFile("log") ; }