This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.todos | |
import net.liftweb.json.JsonAST._ | |
import net.liftweb.json.JsonDSL._ | |
/** | |
* Non-persistent Unfiltered implementation of the SproutCore back-end. | |
* See <a href="http://wiki.sproutcore.com/w/page/12413020/Todos%2006-Building%20the%20Backend">SproutCore docs</a> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For the BDB test: | |
bin/voldemort-performance-tool.sh --record-count 20000000 --value-size 2048 --ops-count 1000000 --target-throughput 10000 --store-name test -r 70 -m 30 --url tcp://localhost:6666 --interval 5 | |
For the Krati test: | |
bin/voldemort-performance-tool.sh --record-count 20000000 --value-size 2048 --ops-count 1000000 --target-throughput 10000 --store-name test2 -r 70 -m 30 --url tcp://localhost:6666 --interval 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tapad.util | |
import akka.dispatch._ | |
import java.util.concurrent.atomic.{AtomicInteger, AtomicBoolean} | |
class LogAndDiscardCircuitBreakerPolicy(val maxMailboxSize: Int, loggable: Logging) extends CircuitBreakerPolicy { | |
def onOverflowStart(mailboxSize: Int) { loggable.log.warn("Mailbox size is above {}. Ignoring messages until size is back below.", maxMailboxSize) } | |
def onBackToNormal(overflowCount: Int) { loggable.log.info("Mailbox size is back below {}. A total of {} messags were discarded.", maxMailboxSize, overflowCount) } | |
def replyToOverflow(overflowCount: Int, msg: Any) : Either[Exception, Any] = Left(new IllegalArgumentException("This overflow policy is not configured for request-reply actors.")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.RandomAccessFile | |
import java.nio.channels.FileChannel | |
import org.jboss.netty.buffer.{ByteBufferBackedChannelBuffer, ChannelBuffer, ChannelBuffers} | |
/** | |
* Maps a the filename to a memory mapped random access file across 1 or more buffers. | |
* Support files up to Long.MAX_VALUE. | |
* | |
* @param filename the file to map | |
* @param maxBufferSize the maximum number of bytes to map per buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val excludedDependencies = Seq( | |
"org.slf4j" -> "slf4j-log4j12", | |
"log4j" -> "log4j", | |
"org.jboss.netty" -> "netty" // We have the io.netty dependency | |
) | |
val removeUnwantedDependencies = libraryDependencies ~= { deps => | |
deps.map { d => | |
excludedDependencies.foldLeft(d) { case (acc, (group, artifact)) => acc.exclude(group, artifact) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tapad.common.metrics | |
import java.net.Socket | |
import java.io._ | |
import com.tapad.common.log.Logging | |
import com.twitter.ostrich.stats._ | |
import java.util.TimerTask | |
object GraphiteReporter { | |
def apply(prefix: String, host: String, port: Int, reportInterval: Long) = { |