Permalink
Browse files

open source release

  • Loading branch information...
1 parent 0902877 commit 3603b6eb30c7f5011c40955cca4e47b850c58722 James Waldrop committed Jun 25, 2012
View
@@ -24,6 +24,8 @@
## Iago Quick Start
+NOTE: This repo has only recently been made public and our velocity is high at the moment, with significant work being done on documentation in particular. Please join iago-users@googlegroups.com (https://groups.google.com/d/forum/iago-users) for updates and to ask pressing questions.
+
If you are already familiar with the Iago Load Generation tool, follow these steps to get started; otherwise, start with the <a href="#Iago Overview">Iago Overview</a>. For questions, please contact <a href="mailto:iago-users@googlegroups.com">iago-users@googlegroups.com</a>.
<a name="Iago Prerequisites"></a>
View
@@ -4,7 +4,7 @@ new ParrotLauncherConfig {
localMode = true
jobName = "testrun"
port = 80
- victims = "www.google.com"
+ victims = "www.twitter.com"
log = "config/replay.log"
requestRate = 5
}
@@ -9,4 +9,5 @@ new ParrotLauncherConfig {
requestRate = 5
maxRequests = 20
reuseFile = false
-}
+}
+
View
@@ -108,7 +108,7 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-logging</artifactId>
- <version>5.2.1-SNAPSHOT</version>
+ <version>5.2.0</version>
</dependency>
<!-- Test -->
<dependency>
@@ -1,2 +1,3 @@
sh scripts/parrot-feeder.sh start-local &
-sh scripts/parrot-server.sh start-local &
+sh scripts/parrot-server.sh start-local &
+
@@ -17,7 +17,7 @@ LOG_HOME=$APP_HOME
MAIN_CLASS="com.twitter.parrot.feeder.FeederMain"
HEAP_OPTS="-Xmx2000m -Xms2000m -XX:NewSize=512m"
GC_OPTS="-XX:+UseConcMarkSweepGC -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseParNewGC -Xloggc:$LOG_HOME/gc.log"
-DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8008"
+DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5004"
JAVA_OPTS="-server $GC_OPTS $HEAP_OPTS $PROFILE_OPTS" #$DEBUG_OPTS"
# Used to set JAVA_HOME sanely if not already set.
@@ -40,7 +40,8 @@ case "$1" in
# start-local is meant for development and runs your server in the foreground.
start-local)
- ${JAVA_HOME}/bin/java ${JAVA_OPTS} -cp ${APP_HOME}/*jar ${MAIN_CLASS} -local -f ${APP_HOME}/config/target/local-feeder.scala $2 $3 $4 $5 $6 $7 $8 $9 ${10}
+ ${JAVA_HOME}/bin/java ${JAVA_OPTS} -cp ${APP_HOME}/*jar ${MAIN_CLASS} -f ${APP_HOME}/config/target/local-feeder.scala $2 $3 $4 $5 $6 $7 $8 $9 ${10}
+echo "done."
;;
start-mesos)
@@ -16,7 +16,8 @@ LOG_HOME=$APP_HOME
MAIN_CLASS="com.twitter.parrot.server.ServerMain"
HEAP_OPTS="-Xmx#{serverXmx}m -Xms2000m -XX:NewSize=512m"
GC_OPTS="-XX:+UseConcMarkSweepGC -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseParNewGC -Xloggc:$LOG_HOME/gc.log"
-JAVA_OPTS="-server $GC_OPTS $HEAP_OPTS $PROFILE_OPTS"
+DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
+JAVA_OPTS="-server $GC_OPTS $HEAP_OPTS $PROFILE_OPTS" # $DEBUG_OPTS"
# Used to set JAVA_HOME sanely if not already set.
function find_java() {
@@ -38,7 +39,8 @@ case "$1" in
# start-local is meant for development and runs your server in the foreground.
start-local)
- ${JAVA_HOME}/bin/java ${JAVA_OPTS} -cp ${APP_HOME}/*jar ${MAIN_CLASS} -local -f ${APP_HOME}/config/target/local-server.scala
+ ${JAVA_HOME}/bin/java ${JAVA_OPTS} -cp ${APP_HOME}/*jar ${MAIN_CLASS} -f ${APP_HOME}/config/target/local-server.scala
+echo "done."
;;
start-mesos)
@@ -26,17 +26,9 @@ object FeederMain {
def main(args: Array[String]) {
try {
- val feeder =
- if (args.contains("-local")){
- val feederLogName = args(2)
- val feederConfig = new Eval().apply[ParrotFeederConfig](new File(feederLogName))
- feederConfig.logSource = Some(new LogSourceImpl(feederConfig.inputLog))
- new ParrotFeeder(feederConfig)
- } else {
- val runtime = RuntimeEnvironment(this, args)
- log.info("Starting Parrot Feeder...")
- runtime.loadRuntimeConfig()
- }
+ val runtime = RuntimeEnvironment(this, args)
+ log.info("Starting Parrot Feeder...")
+ val feeder: ParrotFeeder = runtime.loadRuntimeConfig()
feeder.start()
} catch {
case t: Throwable =>
@@ -73,23 +73,17 @@ class ParrotFeeder(config: ParrotFeederConfig) extends Service {
// Poller is starting here so that we can validate that we get enough servers, ie
// so that validatePreconditions has a chance to pass without a 5 minute wait.
poller.start()
-println("started poller")
if (!validatePreconditions()) {
-println("invalid preconditions")
shutdown()
}
else {
BackgroundProcess {
runLoad()
-println("ran load")
drainServers()
-println("drained servers")
reportResults()
-println("reported results")
shutdown()
-println("shutdown")
}
}
}
@@ -99,9 +93,7 @@ println("shutdown")
* called remotely if the web management interface is enabled.
*/
def shutdown() {
-println("in shut down")
cluster.shutdown()
-println("shut down cluster")
poller.shutdown()
ServiceTracker.shutdown()
}
@@ -165,7 +157,7 @@ println("shut down cluster")
parrots foreach { parrot =>
if (!initialized(parrot)) {
-println("initialized parrot")
+ println("initialized parrot")
initialize(parrot)
}
@@ -99,6 +99,7 @@ class RequestQueue[Req <: ParrotRequest, Rep](config: ParrotServerConfig[Req, Re
def clockError = jobs.values.foldLeft(0.0)(_+_.clockError)
def shutdown() {
+
running.set(false)
jobs.values.foreach( _.pause() )
}
@@ -27,22 +27,8 @@ object ServerMain {
def main(args: Array[String]) {
try {
- val server =
- if (args.contains("-local")) {
- val serverLogName = args(2) //TODO: make less hardcoded
- val result = new Eval().apply[ParrotServerConfig[ParrotRequest, HttpResponse]](
- new File(serverLogName)
- )
- result.parrotPort = 9999
- result.thriftServer = Some(new ThriftServerImpl)
- result.transport = Some(new FinagleTransport(result))
- new ParrotServerImpl(result)
- } else {
- val runtime = RuntimeEnvironment(this, args)
- runtime.loadRuntimeConfig()
- }
-
-
+ val runtime = RuntimeEnvironment(this, args)
+ val server: Service = runtime.loadRuntimeConfig()
server.start()
} catch {
case e: Exception =>
@@ -326,9 +326,11 @@ class ParrotClusterImpl(config: Option[ParrotCommonConfig] = None)
allParrots foreach { parrot =>
try {
parrot.shutdown()
+ println("shut down parrot")
}
catch {
case t: Throwable => log.error(t, "Error shutting down Parrot: %s", t.getClass.getName)
+ println(t, "Error shutting down Parrot: %s", t.getClass.getName)
}
}
}
@@ -84,8 +84,8 @@ class RemoteParrot(val name: String,
}
def shutdown() {
- consumer.isShutdown.set(true)
- println("going to shut down client")
+ consumer.isShutdown.set(true)
+ println("shutting down client")
waitFor(client.shutdown())
service.release
}

0 comments on commit 3603b6e

Please sign in to comment.