This file contains hidden or 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
| scalaVersion := "2.9.1" | |
| resolvers += "durgeshm repo" at "http://durgeshm.github.com/releases/" | |
| libraryDependencies ++= Seq( | |
| "com.twitter" %% "finagle-core" % "1.9.7", | |
| "com.twitter" %% "finagle-http" % "1.9.7") |
This file contains hidden or 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 akka.dispatch.Future | |
| import akka.pattern.pipe | |
| import akka.actor.Actor | |
| case class Work(s: String) | |
| case class Result(s: String) | |
| object MyActor { | |
| // put here to avoid closing over actor’s state | |
| def doWork(work: String): String = { |
This file contains hidden or 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 akka.zeromq._ | |
| import akka.util.Duration._ | |
| import akka.util.duration._ | |
| import akka.actor._ | |
| import akka.actor.Actor | |
| import akka.actor.Props | |
| import akka.actor.ActorLogging | |
| import akka.serialization.SerializationExtension | |
| import java.lang.management.ManagementFactory | |
| import java.text.SimpleDateFormat |
This file contains hidden or 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
| bootstrap resources | |
| ------------------- | |
| echo "deb http://archive.canonical.com/ lucid partner" > /etc/apt/sources.list.d/partner.list | |
| echo "deb http://archive.cloudera.com/debian lucid-cdh3 contrib" >> /etc/apt/sources.list.d/cloudera.list | |
| echo "deb-src http://archive.cloudera.com/debian lucid-cdh3 contrib" >> /etc/apt/sources.list.d/cloudera.list | |
| echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" | debconf-set-selections | |
| echo "hdfs - nofile 32768" >> /etc/security/limits.conf | |
| echo "hbase - nofile 32768" >> /etc/security/limits.conf | |
| echo "hdfs soft/hard nproc 32000" >> /etc/security/limits.conf |
This file contains hidden or 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
| cd ~/whirrsetup | |
| svn co http://svn.apache.org/repos/asf/incubator/whirr/trunk whirr-trunk | |
| cd whirr-trunk | |
| Host Requirements for Building Whirr | |
| ------------------------------------ | |
| Apache Whirr Build Instructions | |
| REQUIREMENTS |
This file contains hidden or 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
| Hi :) | |
| Here are some quick instruction on running the hbase-ec.properties recipe. | |
| 1. Download Whirr 0.7.0 RC0 from here. We are going to publish this as an official release soon. | |
| http://people.apache.org/~asavu/whirr-0.7.0-candidate-0/whirr-0.7.0.tar.gz | |
| 2. Extract the archive |
This file contains hidden or 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
| http://whirr.apache.org/docs/0.7.0/whirr-in-5-minutes.html | |
| thrift repo : http://people.apache.org/~rawson/repo | |
| git clone https://github.com/apache/whirr.git | |
| git checkout -b branch-0.7 -t origin/branch-0.7 | |
| git clone git://github.com/apache/whirr.git && cd whirr && git co branch-0.7 | |
| mvn install |
This file contains hidden or 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
| git clone https://github.com/apache/whirr.git | |
| cd whirr | |
| mvn install | |
| mvn package assembly:assembly | |
| /* | |
| After successful build | |
| Navigate to the target folder to uncompress the release to your selected folder of choice | |
| */ |
This file contains hidden or 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
| #encoding: utf-8 | |
| require 'tire' | |
| require 'json' | |
| require 'active_support/core_ext/object/to_query' | |
| require 'active_support/core_ext/object/to_param' | |
| conf = { | |
| settings: { | |
| number_of_shards: 1, | |
| number_of_replicas: 0, |
This file contains hidden or 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.util.ArrayList | |
| import scala.collection.JavaConversions._ | |
| import com.stumbleupon.async.{Callback, Deferred} | |
| import org.hbase.async.{HBaseClient, KeyValue, Scanner} | |
| import com.twitter.util.{Future, Promise, Return, Throw} | |
| /** Converts a Deferred into a Future. */ | |
| implicit def futureFromDeferred[A](d: Deferred[A]): Future[A] = { | |
| val promise = new Promise[A] | |