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
#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] | |
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
package com.edate.data.test | |
import java.util.Properties | |
import kafka.producer.ProducerConfig | |
import kafka.producer.Producer | |
import kafka.message.Message | |
import kafka.producer.ProducerData | |
import kafka.producer.ProducerData | |
import kafka.producer.Partitioner | |
/** |
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] | |
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 unfiltered.request._ | |
import unfiltered.response._ | |
import unfiltered.netty._ | |
import unfiltered.request.uploads.netty._ | |
object App { | |
def main(a: Array[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
// Copyright (C) 2012 Benoit Sigoure | |
// This program is free software: you can redistribute it and/or modify it | |
// under the terms of the GNU Lesser General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or (at your | |
// option) any later version. This program is distributed in the hope that it | |
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | |
// General Public License for more details. You should have received a copy | |
// of the GNU Lesser General Public License along with this program. If not, | |
// see <http://www.gnu.org/licenses/>. |
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
object Actor { | |
import java.util.concurrent.{ConcurrentLinkedQueue, Executor} | |
import java.util.concurrent.atomic.{AtomicBoolean} | |
sealed trait Instr | |
case object Continue extends Instr | |
case class Become(b: Any => Instr) extends Instr | |
case object Dead extends Instr | |
trait Address { |
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
package javatest; | |
import com.google.common.base.Charsets; | |
import com.google.common.collect.Lists; | |
import com.google.common.io.Files; | |
import com.proofpoint.json.JsonCodec; | |
import org.apache.commons.httpclient.Header; | |
import org.apache.commons.logging.LogFactory; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.Level; |
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.concurrent.Executors | |
import scala.io.Source | |
import akka.dispatch.ExecutionContext | |
import akka.util.duration._ | |
import akka.dispatch.Future | |
implicit val ec = ExecutionContext.fromExecutorService(Executors.newCachedThreadPool()) | |
val words = Source.fromFile("/usr/share/dict/words").getLines |