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://stackoverflow.com/questions/20028451/change-dropwizard-default-ports | |
| producer: | |
| "bootstrap.servers": "kafka:9092" | |
| "key.serializer": "org.apache.kafka.common.serialization.ByteArraySerializer" | |
| "value.serializer": "org.apache.kafka.common.serialization.ByteArraySerializer" | |
| consumer: | |
| "zookeeper.connect": "zk:2181" | |
| "group.id": "group" |
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
| unlink Makefile | |
| unlink Kbuild | |
| unlink Kconfig | |
| unlink configs | |
| unlink tests | |
| unlink compile_all.sh | |
| ln -s spark-1.2.1-bin-hadoop2.4 spark | |
| ln -s kafka_2.10-0.8.2.0 kafka |
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
| logging: | |
| level: ERROR | |
| loggers: | |
| io.dropwizard: ERROR | |
| appenders: [] | |
| server: | |
| requestLog: | |
| appenders: [] |
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
| #!/bin/bash | |
| if [ $# -eq 0 ] | |
| then | |
| echo "No arguments supplied" | |
| exit -1 | |
| fi | |
| #SERVER=$(aws ec2 describe-tags --filters "Name=resource-id,Values=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)" --query 'Tags[*].Value' --output text) | |
| SERVER=$1 |
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://apache.mirrors.lucidnetworks.net/spark/spark-1.2.1/spark-1.2.1-bin-hadoop2.4.tgz | |
| http://apache.mirrors.lucidnetworks.net/kafka/0.8.2.0/kafka_2.10-0.8.2.0.tgz | |
| wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz" | |
| tar -xvf jdk-8u40-linux-x64.tar.gz |
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
| echo "0.0.0.0 master" >> /etc/hosts | |
| echo "192.168.59.103 zk" >> /etc/hosts | |
| echo "192.168.59.103 postgres" >> /etc/hosts | |
| cd /usr/local/spark | |
| ./sbin/start-master.sh | |
| cd /usr/local/spark | |
| ./bin/spark-class org.apache.spark.deploy.worker.Worker spark://IP:PORT |
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
| /* example.i */ | |
| %module SodiumJni | |
| %include "typemaps.i" | |
| %include "stdint.i" | |
| %include "arrays_java.i" | |
| %include "carrays.i" | |
| %include "various.i" | |
| %apply int {unsigned long long}; |
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
| case class Person(first: String, last: String, age: Int) | |
| val parse = (s: String) => { | |
| val split = s.split("\\|") | |
| Person(split(0), split(1), split(2).toInt) | |
| } | |
| object AgeOrdering extends Ordering[Person] { | |
| def compare(a:Person, b:Person) = a.age compare b.age | |
| } |
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
| # these make the ec2 commands just work | |
| export AWS_ACCESS_KEY=[AWS access key] | |
| export AWS_SECRET_KEY=[AWS secret] | |
| # fetch the instance id | |
| export INSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) | |
| #grep out the tag you're looking for, in this case "Name" | |
| export APP_TAG=$(ec2dtag --region us-west-2 --filter "key=Name" --filter "resource-type=instance" --filter "resource-id=$INSTANCE_ID" | grep -oE "Name\\W+(.+)$" | grep -oE "\\W.+$") |
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
| # these make the ec2 commands just work | |
| export AWS_ACCESS_KEY=[AWS access key] | |
| export AWS_SECRET_KEY=[AWS secret] | |
| # fetch the instance id | |
| export INSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) | |
| #grep out the tag you're looking for, in this case "Name" | |
| export APP_TAG=$(ec2-describe-tags | grep $INSTANCE_ID | grep -oE "Name\\W+(.+)$" | grep -oE "\\W.+$") |
NewerOlder