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
# some tgz with random data | |
#!/bin/bash | |
for year in `seq 2013 2015`; | |
do | |
for month in `seq 1 12`; | |
do | |
mkdir $year-$month | |
echo $RANDOM > $year-$month/ratings.tsv |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
rsync -r -v --progress -e ssh /cygdrive/c/_git/VirtualBox\ VMs/KYLO_v0.4.3 [email protected]:/tmp/kylo/ |
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
nohup wget -qc http://path-to-url/linux.iso & |
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
#https://hub.docker.com/r/alexeiled/docker-oracle-xe-11g/ | |
docker run -d -p 49160:22 -p 49162:8080 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g |
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
#kill and rm all docker containers | |
if [[ $(docker ps -q) ]]; then \ | |
docker kill $(docker ps -q) ;docker rm $(docker ps -a -q) \ | |
fi | |
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
sqoop list-databases \ | |
--connect "jdbc:mysql://quickstart.cloudera:3306" \ | |
--username retail_dba \ | |
--password cloudera |
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
sqoop list-tables \ | |
--connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \ | |
--username retail_dba \ | |
--password cloudera |
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
sqoop eval \ | |
--connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \ | |
--username retail_dba \ | |
--password cloudera \ | |
--query "select count(1) from order_items" |
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
from pyspark import SparkContext, SparkConf | |
conf = SparkConf().setAppName("myPyspark") | |
sc = SparkContext(conf=conf) | |
dataRDD = sc.textFile("/user/ma186082/sqoop_import/departments") | |
for line in dataRDD.collect(): | |
print(line) | |
dataRDD.saveAsTextFile("/user/ma186082/pyspark/departments") |