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
[info] application - ### Application has started | |
[info] play - Application started (Dev) | |
spark.app.name=Spark And Play | |
spark.home=/Users/sujee/hadoop/spark-1.0.2-hadoop2 | |
spark.jars=/Users/sujee/dev/play-spark/target/scala-2.10/play-spark_2.10-1.0.jar | |
spark.master=spark://localhost:7077 | |
[error] a.a.OneForOneStrategy - exception during creation | |
akka.actor.ActorInitializationException: exception during creation | |
at akka.actor.ActorInitializationException$.apply(Actor.scala:164) ~[akka-actor_2.10-2.3.4.jar:na] | |
at akka.actor.ActorCell.create(ActorCell.scala:596) ~[akka-actor_2.10-2.3.4.jar:na] |
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
#!/bin/bash | |
## usage: | |
## cluster-cmd.sh <-h hosts_file> [-u user] cmd | |
## cluster-cmd.sh -h hosts ls -la | |
function usage() | |
{ | |
echo "usage : $0 -h <hosts file> [-u user] [-i ssh_key_file] cmd" | |
exit 1 |
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
#!/usr/bin/env bash | |
## XXX | |
export JAVA_HOME=/opt/java | |
if [[ `uname -a` == Darwin* ]]; then | |
# Assuming Mac OS X | |
export JAVA_HOME=${JAVA_HOME:-$(/usr/libexec/java_home)} | |
export TACHYON_RAM_FOLDER=/Volumes/ramdisk | |
export TACHYON_JAVA_OPTS="-Djava.security.krb5.realm= -Djava.security.krb5.kdc=" |
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
// MembaseTest1 | |
package tutorial; | |
import java.net.InetSocketAddress; | |
import net.spy.memcached.MemcachedClient; | |
/** | |
* Write / Read from Membase | |
* | |
* @author sujee | |
* |
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
// MembaseTest3 | |
package tutorial; | |
import java.net.InetSocketAddress; | |
import java.util.concurrent.TimeUnit; | |
import net.spy.memcached.MemcachedClient; | |
/** | |
* simulates writing / reading from two different clients |
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
// MembaseTest2 | |
package tutorial; | |
import java.net.InetSocketAddress; | |
import net.spy.memcached.MemcachedClient; | |
/** | |
* simulates writing / reading from two different clients | |
*/ | |
public class MembaseTest2 |
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
... | |
... | |
long t2 = System.currentTimeMillis(); | |
cache.shutdown(10, TimeUnit.SECONDS); // graceful shutdown | |
System.out.println("Time for " + MAX + " puts is " + (t2 - t1) + " ms"); | |
// open another connection | |
cache = new MemcachedClient(new InetSocketAddress(server, port)); | |
... | |
... |
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
#!/bin/bash | |
## http://sujee.net/tech/articles/amazon-emr-beyond-basics/ | |
CLASS_DIR=classes | |
mkdir -p $CLASS_DIR | |
rm -rf $CLASS_DIR/* | |
# compile |
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
/** | |
* http://sujee.net/tech/articles/amazon-emr-beyond-basics/ | |
* takes one argument for input path | |
*/ | |
public class TestMR extends Configured implements Tool | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
int res = ToolRunner.run(new Configuration(), new TestMR(), args); |
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
#!/bin/bash | |
## http://sujee.net/tech/articles/amazon-emr-beyond-basics/ | |
# config | |
# if changing machine type, also change mapred config file | |
MASTER_INSTANCE_TYPE="m1.large" | |
SLAVE_INSTANCE_TYPE="c1.xlarge" | |
INSTANCES=5 | |
export JOBNAME="MyMR" | |
export TIMESTAMP=$(date +%Y%m%d-%H%M%S) |
OlderNewer