Skip to content

Instantly share code, notes, and snippets.

View minyk's full-sized avatar
😀
Containerize! all the things!

Drake Youngkun Min minyk

😀
Containerize! all the things!
View GitHub Profile
@minyk
minyk / gist:ca358749abf7c6d9dadc
Last active August 29, 2015 14:19
Add RPM Packaging in Spark-Notebook
Index: build.sbt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build.sbt (revision cf04f98dfb0549476322ba20cf083181d8f19a63)
+++ build.sbt (revision )
@@ -1,6 +1,7 @@
import Dependencies._
@minyk
minyk / SparkUtils.scala
Last active September 16, 2015 12:36 — forked from ibuenros/SparkUtils.scala
Spark productionizing utilities developed by Ooyala, shown in Spark Summit 2014
//==================================================================
// SPARK INSTRUMENTATION
//==================================================================
import com.codahale.metrics.{MetricRegistry, Meter, Gauge}
import org.apache.spark.{SparkEnv, Accumulator}
import org.apache.spark.metrics.source.Source
import org.joda.time.DateTime
import scala.collection.mutable
@minyk
minyk / common.sh
Created October 10, 2015 06:22
prepare cassandra
#Cassandra
CASSANDRA_VERSION=2.1.10
CASSANDRA_NAME=apache-cassandra-${CASSANDRA_VERSION}-bin
CASSANDRA_ARCHIVE=${CASSANDRA_NAME}.tar.gz
CASSANDRA_MIRROT_DOWNLOAD=http://www.apache.org/dist/cassandra/${CASSANDRA_VERSION}/${CASSANDRA_ARCHIVE}
CASSANDRA_RES_DIR=/vagrant/resources/cassandra
CASSANDRA_HOME=/usr/local/cassandra
CASSANDRA_CONF=${CASSANDRA_HOME}/conf
FlowFile flowFile = session.get();
# Do something with flowFile.
flowFile = session.write(flowFile, new OutputStreamCallback() {
@Override
public void process(OutputStream out) throws IOException {
}
});
{
"id": "/hue",
"cmd": null,
"cpus": 1,
"mem": 512,
"disk": 0,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [],
{
"id": "nifi",
"cmd": null,
"cpus": 1,
"mem": 1024,
"disk": 1000,
"instances": 1,
"container": {
"docker": {
@minyk
minyk / dcos-elasticsearch-singlenode.json
Created June 16, 2016 08:48
dcos-elasticsearch-singlenode
{
"id": "/dashboard/elasticsearch",
"cmd": null,
"cpus": 1,
"mem": 1024,
"disk": 0,
"instances": 1,
"container": {
"docker": {
"image": "elasticsearch",
@minyk
minyk / dcos-kibana.json
Created June 16, 2016 08:48
dcos-kibana.json
{
"id": "/dashboard/kibana",
"cmd": null,
"cpus": 1,
"mem": 512,
"disk": 0,
"instances": 1,
"container": {
"docker": {
"image": "kibana",
@minyk
minyk / sample.scala
Created August 23, 2016 06:09
Spark query plan
var inputDF = sqlContext.read.json("/tmp/test1.json")
val query = sqlContext.sql("SELECT age FROM test WHERE age > 30")
val plan = query.queryExecution
@minyk
minyk / install.sh
Created September 20, 2016 13:43
HAP-NodeJS in C.H.I.P
sudo apt-get install xz-utils
sudo apt-get install git
sudo apt-get install build-essential
sudo apt-get install libavahi-compat-libdnssd-dev