Added: activemq/trunk/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBStoreTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBStoreTest.java?rev=1476719&view=auto ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBStoreTest.java (added) +++ activemq/trunk/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ReplicatedLevelDBStoreTest.java Sun Apr 28 03:53:57 2013 @@ -0,0 +1,164 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.leveldb.test; + +import junit.framework.TestCase; +import org.apache.activemq.broker.ConnectionContext; +import org.apache.activemq.command.ActiveMQQueue; +import org.apache.activemq.command.ActiveMQTextMessage; +import org.apache.activemq.command.Message; +import org.apache.activemq.command.MessageId; +import org.apache.activemq.leveldb.replicated.MasterLevelDBStore; +import org.apache.activemq.leveldb.replicated.SlaveLevelDBStore; +import org.apache.activemq.leveldb.util.FileSupport; +import org.apache.activemq.store.MessageRecoveryListener; +import org.apache.activemq.store.MessageStore; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.jms.JMSException; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; + +/** + */ +public class ReplicatedLevelDBStoreTest extends TestCase { + protected static final Logger LOG = LoggerFactory.getLogger(ReplicatedLevelDBStoreTest.class); + + public void testReplication() throws Exception { + LinkedList<File> directories = new LinkedList<File>(); + directories.add(new File("target/activemq-data/leveldb-node1")); + directories.add(new File("target/activemq-data/leveldb-node2")); + directories.add(new File("target/activemq-data/leveldb-node3")); + + for( File f: directories) { + FileSupport.toRichFile(f).recursiveDelete(); + } + + ArrayList<String> expected_list = new ArrayList<String>(); + final int LOG_SIZE = 1023*200; + // We will rotate between 3 nodes the task of being the master. + for( int j=0; j < 10; j++) { + + MasterLevelDBStore master = new MasterLevelDBStore(); + master.setDirectory(directories.get(0)); + master.setBind("tcp://0.0.0.0:0"); + master.setSecurityToken("foo"); + master.setMinReplica(1); + master.setLogSize(LOG_SIZE); + LOG.info("Starting master: "+master.replicaId()); + master.start(); + + SlaveLevelDBStore slave1 = new SlaveLevelDBStore(); + slave1.setDirectory(directories.get(1)); + slave1.setConnect("tcp://127.0.0.1:" + master.getPort()); + slave1.setSecurityToken("foo"); + slave1.setLogSize(LOG_SIZE); + LOG.info("Starting slave: "+slave1.replicaId()); + slave1.start(); + + SlaveLevelDBStore slave2 = new SlaveLevelDBStore(); + slave2.setDirectory(directories.get(2)); + slave2.setConnect("tcp://127.0.0.1:" + master.getPort()); + slave2.setSecurityToken("foo"); + slave2.setLogSize(LOG_SIZE); + + LOG.info("Adding messages..."); + MessageStore ms = master.createQueueMessageStore(new ActiveMQQueue("TEST")); + final int TOTAL = 500; + for (int i = 0; i < TOTAL; i++) { + if ( i % ((int) (TOTAL * 0.10)) == 0) { + LOG.info("" + (100*i/TOTAL) + "% done"); + } + + if( i == 100 ) { + LOG.info("Starting slave: "+slave2.replicaId()); + slave2.start(); + } + + if( i == 200 ) { + LOG.info("Stopping slave: "+slave2.replicaId()); + slave2.stop(); + } + + String msgid = "m:" + j + ":" + i; + addMessage(ms, msgid); + expected_list.add(msgid); + } + + LOG.info("Checking master state"); + assertEquals(expected_list, getMessages(ms)); + + LOG.info("Stopping master: "+master.replicaId()); + master.stop(); + LOG.info("Stopping slave: "+slave1.replicaId()); + slave1.stop(); + + // Rotate the dir order so that slave1 becomes the master next. + directories.addLast(directories.removeFirst()); + } + } + + long id_counter = 0L; + String payload = ""; + { + for (int i = 0; i < 1024; i++) { + payload += "x"; + } + } + + public ActiveMQTextMessage addMessage(MessageStore ms, String body) throws JMSException, IOException { + ActiveMQTextMessage message = new ActiveMQTextMessage(); + message.setPersistent(true); + message.setResponseRequired(true); + message.setStringProperty("id", body); + message.setText(payload); + id_counter += 1; + MessageId messageId = new MessageId("ID:localhost-56913-1254499826208-0:0:1:1:" + id_counter); + messageId.setBrokerSequenceId(id_counter); + message.setMessageId(messageId); + ms.addMessage(new ConnectionContext(), message); + return message; + } + + public ArrayList<String> getMessages(MessageStore ms) throws Exception { + final ArrayList<String> rc = new ArrayList<String>(); + ms.recover(new MessageRecoveryListener() { + public boolean recoverMessage(Message message) throws Exception { + rc.add(((ActiveMQTextMessage) message).getStringProperty("id")); + return true; + } + + public boolean hasSpace() { + return true; + } + + public boolean recoverMessageReference(MessageId ref) throws Exception { + return true; + } + + public boolean isDuplicate(MessageId ref) { + return false; + } + }); + return rc; + } + +}
Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBClient.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBClient.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBClient.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBClient.scala&p1=activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBClient.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBClient.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBClient.scala Sun Apr 28 03:53:57 2013 @@ -15,62 +15,25 @@ * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.dfs import org.apache.activemq.leveldb.util._ import org.fusesource.leveldbjni.internal.Util import FileSupport._ -import org.codehaus.jackson.map.ObjectMapper import java.io._ import scala.collection.mutable._ import scala.collection.immutable.TreeMap -import org.fusesource.hawtbuf.{ByteArrayOutputStream, Buffer} +import org.fusesource.hawtbuf.Buffer import org.apache.hadoop.fs.{FileSystem, Path} +import org.apache.activemq.leveldb.{RecordLog, LevelDBClient} +import scala.Some -/** - * - * - * @author <a href="http://hiramchirino.com">Hiram Chirino</a> - */ -object JsonCodec { - - final val mapper: ObjectMapper = new ObjectMapper - - def decode[T](buffer: Buffer, clazz: Class[T]): T = { - val original = Thread.currentThread.getContextClassLoader - Thread.currentThread.setContextClassLoader(this.getClass.getClassLoader) - try { - return mapper.readValue(buffer.in, clazz) - } finally { - Thread.currentThread.setContextClassLoader(original) - } - } - - def decode[T](is: InputStream, clazz : Class[T]): T = { - var original: ClassLoader = Thread.currentThread.getContextClassLoader - Thread.currentThread.setContextClassLoader(this.getClass.getClassLoader) - try { - return JsonCodec.mapper.readValue(is, clazz) - } - finally { - Thread.currentThread.setContextClassLoader(original) - } - } - - - def encode(value: AnyRef): Buffer = { - var baos = new ByteArrayOutputStream - mapper.writeValue(baos, value) - return baos.toBuffer - } - -} /** * @author <a href="http://hiramchirino.com">Hiram Chirino</a> */ -object HALevelDBClient extends Log { +object DFSLevelDBClient extends Log { val MANIFEST_SUFFIX = ".mf" val LOG_SUFFIX = LevelDBClient.LOG_SUFFIX @@ -102,8 +65,8 @@ object HALevelDBClient extends Log { * * @author <a href="http://hiramchirino.com">Hiram Chirino</a> */ -class HALevelDBClient(val store:HALevelDBStore) extends LevelDBClient(store) { - import HALevelDBClient._ +class DFSLevelDBClient(val store:DFSLevelDBStore) extends LevelDBClient(store) { + import DFSLevelDBClient._ case class Snapshot(current_manifest:String, files:Set[String]) var snapshots = TreeMap[Long, Snapshot]() @@ -352,8 +315,8 @@ class HALevelDBClient(val store:HALevelD dfs.delete(new Path(dfsDirectory, file.getName), false) } - override def create_log_appender(position: Long) = { - new LogAppender(next_log(position), position) { + override def create_log_appender(position: Long, offset:Long) = { + new LogAppender(next_log(position), position, offset) { val dfs_path = new Path(dfsDirectory, file.getName) debug("Opening DFS log file for append: "+dfs_path.getName) Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBStore.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBStore.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBStore.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBStore.scala&p1=activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBStore.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/HALevelDBStore.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/DFSLevelDBStore.scala Sun Apr 28 03:53:57 2013 @@ -15,13 +15,14 @@ * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.dfs import org.apache.hadoop.conf.Configuration import org.apache.activemq.util.ServiceStopper import org.apache.hadoop.fs.FileSystem import scala.reflect.BeanProperty import java.net.InetAddress +import org.apache.activemq.leveldb.LevelDBStore /** * <p> @@ -29,7 +30,7 @@ import java.net.InetAddress * * @author <a href="http://hiramchirino.com">Hiram Chirino</a> */ -class HALevelDBStore extends LevelDBStore { +class DFSLevelDBStore extends LevelDBStore { @BeanProperty var dfsUrl:String = _ @@ -70,5 +71,5 @@ class HALevelDBStore extends LevelDBStor } } - override def createClient = new HALevelDBClient(this) + override def createClient = new DFSLevelDBClient(this) } \ No newline at end of file Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/IndexManifestDTO.java (from r1476433, activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/IndexManifestDTO.java) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/IndexManifestDTO.java?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/IndexManifestDTO.java&p1=activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/IndexManifestDTO.java&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/IndexManifestDTO.java (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/dfs/IndexManifestDTO.java Sun Apr 28 03:53:57 2013 @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.activemq.leveldb; +package org.apache.activemq.leveldb.dfs; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/ActiveMQScenario.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/ActiveMQScenario.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/ActiveMQScenario.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/ActiveMQScenario.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/ActiveMQScenario.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/ActiveMQScenario.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/ActiveMQScenario.scala Sun Apr 28 03:53:57 2013 @@ -14,11 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.activemq.ActiveMQConnectionFactory import javax.jms.{Destination, ConnectionFactory} import org.apache.activemq.command.{ActiveMQTopic, ActiveMQQueue} +import org.apache.activemq.leveldb.test.JMSClientScenario /** * <p> Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBFastEnqueueTest.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBFastEnqueueTest.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBFastEnqueueTest.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBFastEnqueueTest.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBFastEnqueueTest.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBFastEnqueueTest.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBFastEnqueueTest.scala Sun Apr 28 03:53:57 2013 @@ -14,11 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.hadoop.fs.FileUtil import java.io.File import java.util.concurrent.TimeUnit +import org.apache.activemq.leveldb.{LevelDBStore} +import org.apache.activemq.leveldb.dfs.DFSLevelDBStore /** * <p> @@ -26,7 +28,7 @@ import java.util.concurrent.TimeUnit * * @author <a href="http://hiramchirino.com">Hiram Chirino</a> */ -class HALevelDBFastEnqueueTest extends LevelDBFastEnqueueTest { +class DFSLevelDBFastEnqueueTest extends LevelDBFastEnqueueTest { override def setUp: Unit = { TestingHDFSServer.start @@ -39,7 +41,7 @@ class HALevelDBFastEnqueueTest extends L } override protected def createStore: LevelDBStore = { - var store: HALevelDBStore = new HALevelDBStore + var store: DFSLevelDBStore = new DFSLevelDBStore store.setDirectory(dataDirectory) store.setDfsDirectory("target/activemq-data/hdfs-leveldb") return store Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBStoreTest.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBStoreTest.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBStoreTest.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBStoreTest.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBStoreTest.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/HALevelDBStoreTest.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/DFSLevelDBStoreTest.scala Sun Apr 28 03:53:57 2013 @@ -14,10 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.activemq.store.PersistenceAdapter import java.io.File +import org.apache.activemq.leveldb.dfs.DFSLevelDBStore /** * <p> @@ -25,7 +26,7 @@ import java.io.File * * @author <a href="http://hiramchirino.com">Hiram Chirino</a> */ -class HALevelDBStoreTest extends LevelDBStoreTest { +class DFSLevelDBStoreTest extends LevelDBStoreTest { override protected def setUp: Unit = { TestingHDFSServer.start super.setUp @@ -37,7 +38,7 @@ class HALevelDBStoreTest extends LevelDB } override protected def createPersistenceAdapter(delete: Boolean): PersistenceAdapter = { - var store: HALevelDBStore = new HALevelDBStore + var store: DFSLevelDBStore = new DFSLevelDBStore store.setDirectory(new File("target/activemq-data/haleveldb")) store.setDfsDirectory("localhost") if (delete) { Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/EnqueueRateScenariosTest.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/EnqueueRateScenariosTest.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/EnqueueRateScenariosTest.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/EnqueueRateScenariosTest.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/EnqueueRateScenariosTest.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/EnqueueRateScenariosTest.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/EnqueueRateScenariosTest.scala Sun Apr 28 03:53:57 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import junit.framework.TestCase import org.apache.activemq.broker._ @@ -23,6 +23,7 @@ import java.io.File import junit.framework.Assert._ import org.apache.commons.math.stat.descriptive.DescriptiveStatistics import region.policy.{PolicyEntry, PolicyMap} +import org.apache.activemq.leveldb.{LevelDBStore} /** * <p> Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/JMSClientScenario.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/JMSClientScenario.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/JMSClientScenario.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/JMSClientScenario.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/JMSClientScenario.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/JMSClientScenario.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/JMSClientScenario.scala Sun Apr 28 03:53:57 2013 @@ -14,10 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import java.lang.Thread import javax.jms._ +import org.apache.activemq.leveldb.test.Scenario /** * <p> Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBFastEnqueueTest.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBFastEnqueueTest.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBFastEnqueueTest.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBFastEnqueueTest.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBFastEnqueueTest.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBFastEnqueueTest.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBFastEnqueueTest.scala Sun Apr 28 03:53:57 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.activemq.ActiveMQConnection import org.apache.activemq.ActiveMQConnectionFactory @@ -34,6 +34,7 @@ import java.util.concurrent.atomic.Atomi import junit.framework.Assert._ import org.apache.activemq.leveldb.util.Log import junit.framework.TestCase +import org.apache.activemq.leveldb.LevelDBStore object LevelDBFastEnqueueTest extends Log class LevelDBFastEnqueueTest extends TestCase { Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBPlistTest.java (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBPlistTest.java) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBPlistTest.java?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBPlistTest.java&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBPlistTest.java&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBPlistTest.java (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBPlistTest.java Sun Apr 28 03:53:57 2013 @@ -14,8 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb; +package org.apache.activemq.leveldb.test; +import org.apache.activemq.leveldb.LevelDBStore; import org.apache.activemq.store.PListTestSupport; /** Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBStoreTest.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBStoreTest.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBStoreTest.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBStoreTest.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBStoreTest.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/LevelDBStoreTest.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/LevelDBStoreTest.scala Sun Apr 28 03:53:57 2013 @@ -14,11 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.activemq.store.PersistenceAdapter import org.apache.activemq.store.PersistenceAdapterTestSupport import java.io.File +import org.apache.activemq.leveldb.LevelDBStore /** * <p> Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/Scenario.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/Scenario.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/Scenario.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/Scenario.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/Scenario.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/Scenario.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/Scenario.scala Sun Apr 28 03:53:57 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import java.util.concurrent.atomic._ import java.util.concurrent.TimeUnit._ Copied: activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/TestingHDFSServer.scala (from r1476433, activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/TestingHDFSServer.scala) URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/TestingHDFSServer.scala?p2=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/TestingHDFSServer.scala&p1=activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/TestingHDFSServer.scala&r1=1476433&r2=1476719&rev=1476719&view=diff ============================================================================== --- activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/TestingHDFSServer.scala (original) +++ activemq/trunk/activemq-leveldb-store/src/test/scala/org/apache/activemq/leveldb/test/TestingHDFSServer.scala Sun Apr 28 03:53:57 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.leveldb +package org.apache.activemq.leveldb.test import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.FileSystem Modified: activemq/trunk/pom.xml URL: http://svn.apache.org/viewvc/activemq/trunk/pom.xml?rev=1476719&r1=1476718&r2=1476719&view=diff ============================================================================== --- activemq/trunk/pom.xml (original) +++ activemq/trunk/pom.xml Sun Apr 28 03:53:57 2013 @@ -65,7 +65,7 @@ <geronimo-version>1.0</geronimo-version> <hadoop-version>1.0.0</hadoop-version> <hawtbuf-version>1.9</hawtbuf-version> - <hawtdispatch-version>1.14</hawtdispatch-version> + <hawtdispatch-version>1.15</hawtdispatch-version> <howl-version>0.1.8</howl-version> <hsqldb-version>1.8.0.12</hsqldb-version> <httpclient-version>4.2.3</httpclient-version> @@ -101,7 +101,7 @@ <saxon-version>9.4</saxon-version> <saxon-bundle-version>9.4.0.1_2</saxon-bundle-version> <scala-plugin-version>3.1.0</scala-plugin-version> - <scala-version>2.10.0</scala-version> + <scala-version>2.9.1</scala-version> <scalatest-version>1.8</scalatest-version> <slf4j-version>1.6.6</slf4j-version> <snappy-bundle-version>1.0.4.1_1</snappy-bundle-version>
