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 sbt._ | |
import Keys._ | |
import play.Project._ | |
object ApplicationBuild extends Build { | |
val appName = "helloworld" | |
val appVersion = "1.0" | |
val appDependencies = Seq( |
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.yieldmo.rtb.util | |
class LazyMap[A,B](delegate: Map[A,() => B]) extends scala.collection.immutable.Map[A,B]{ | |
def get(key: A): Option[B] = delegate.get(key).map{ _() } | |
def iterator: Iterator[(A,B)] = delegate.iterator.map{ pair => (pair._1, pair._2()) } | |
def +[B1 >:B](kv: (A, B1)): Map[A, B1] = new LazyMap[A,B1](delegate + (kv._1 -> (() => kv._2))) | |
def -(key: A): Map[A, B] = new LazyMap[A,B](delegate - key) | |
} |
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
@tailrec | |
def fetchWithRetries(retries: Int): MultiFetchResponse = { | |
val resultMaybe = catching(classOf[IOException]) either { | |
simpleConsumer.multifetch(fetches : _*) | |
} | |
resultMaybe match{ | |
case Left(e) => | |
if(retries > 0) { | |
info("Unable to complete multifetch. Sleeping for %dms".format(config.fetcherBackoffMs), e) | |
Utils.swallow(logger.info, Thread.sleep(config.fetcherBackoffMs)) |
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 AssemblyKeys._ | |
name := "traffic-jobs" | |
scalaVersion := "2.9.2" | |
description := "Traffic Analysis workflow" | |
libraryDependencies += "com.twitter" %% "scalding-core" % "0.8.6" |
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
log_level :debug | |
log_location STDOUT | |
node_name 'fanatoly-mbp' | |
client_key '/Users/anatolyfayngelerin/dev/yieldmo/cfg/chef/repo/.chef/fanatoly-mbp.pem' | |
validation_client_name 'chef-validator' | |
validation_key '/Users/anatolyfayngelerin/dev/yieldmo/cfg/chef/repo/.chef/validation.pem' | |
chef_server_url 'http://chef.aws.in.yieldmo.com:4000' | |
syntax_check_cache_path '/Users/anatolyfayngelerin/dev/yieldmo/cfg/chef/repo/.chef/syntax_check_cache' | |
cookbook_path [ '/Users/anatolyfayngelerin/dev/yieldmo/cfg/chef/repo/cookbooks/' ] | |
knife[:aws_access_key_id] = 'REDACTED' |