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
Empty_test_file |
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
curl -d@/tmp/post.txt -X POST http://your_mesos:5050/master/shutdown | |
vi /tmp/post.txt | |
frameworkId=23423-23423-234234-234234 |
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
git clone https://github.com/TargetHolding/pyspark-cassandra.git | |
http://www.scala-sbt.org/release/docs/Installing-sbt-on-Linux.html | |
https://medium.com/@amirziai/running-pyspark-with-cassandra-in-jupyter-2bf5e95c319#.xhvqljmy6 | |
./bin/spark-submit --packages com.datastax.spark:spark-cassandra-connector_2.11:1.5.0-M2 ../Main/Code/myPysparkFile.py |
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
https://community.cloudera.com/t5/Hadoop-101-Training-Quickstart/Python-Streaming-ImportError-No-module-named-streaming/td-p/42804 |
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
## invoking pyspark as follows: ## | |
# /path/to/spark-1.2.0-bin-hadoop2.4/bin/pyspark --jars /path/to/spark-1.2.0-bin-hadoop2.4/jars/spark-cassandra-connector-assembly-1.2.0-SNAPSHOT.jar | |
# first, stop the spark context launched by pyspark to avoid the conflict | |
sc.stop() | |
from py4j.java_gateway import java_import | |
from pyspark import SparkConf | |
conf = (SparkConf() | |
.setMaster("local") |
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://takwatanabe.me/snippets/cs-pyspark.html#sql-in-pyspark |
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
""" | |
tiny script to convert a pandas data frame into a JSON object | |
""" | |
import ujson as json | |
import pandas | |
import numpy as np | |
df = pandas.DataFrame({ | |
"time" : [1,2,3,4,5], |
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
/home/centos/spark-2.0.2-bin-hadoop2.7/bin/spark-submit --packages org.apache.spark:spark-streaming-kafka_2.10:1.6.3 --conf spark.cassandra.connection.host=10.0.0.12 --master mesos://10.0.0.11:5050 testKafkastream.py 10.0.0.11:2181 ihealth | |
/home/centos/spark-2.0.2-bin-hadoop2.7/bin/spark-submit --packages com.datastax.spark:spark-cassandra-connector_2.11:2.0.0-M3,TargetHolding/pyspark-cassandra:0.1.5,org.apache.spark:spark-streaming-kafka-0-8_2.11:2.0.1 --conf spark.cassandra.connection.host=10.0.0.12 v_example.py ihealth | |
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
Jupyter_pyspark Links |
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
sudo curl -d@/tmp/post.txt -X POST http://your_mesos:5050/master/shutdown | |
/tmp/post.txt is a file with the follow content: | |
frameworkId=23423-23423-234234-234234 |
OlderNewer