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/hdp/current/kafka-broker/bin/kafka-topics.sh --list --zookeeper localhost:2181 | |
/usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic test --replication-factor 1 --partitions 1 | |
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list phdns01.cloud.hortonworks.com:6667 --topic test | |
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning |
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
##Create the vm | |
boot2docker init -m 8192 -s 30000 ( memory and size in GB) | |
###Start the vm | |
boot2docker up | |
# Set the variables | |
`eval "$(boot2docker shellinit)"` | |
## Find the IP | |
boot2docker IP | |
##ssh into docker vm | |
boot2docker ssh |
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
boot2docker shellinit | |
docker run -d -p 8080:80 --name web nginx | |
docker exec -it web bash | |
echo myself for president > /usr/share/nginx/html/index.html | |
docker inspect web | grep IP | |
docker inspect -f '{{json .NetworkSettings.IPAddress}}' container |
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
#run mesos | |
#spin up zk instance | |
#start marathon | |
MESOS_NATIVE_JAVA_LIBRARY=/Users/nsabharwal/mesos-0.28.1/build/src/.libs/libmesos.dylib ./bin/start --master local --zk zk://localhost:2181/marathon |
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
# start loacal zk | |
/var/root/zookeeper-3.4.8/bin/zkServer.sh start | |
#start marathon | |
#marathon is connecting to the existing mesos instance instance connecting to it's own embeded instance | |
#--master 127.0.0.1:5050 and zk://localhost:2181/mesos | |
MESOS_NATIVE_JAVA_LIBRARY=/Users/nsabharwal/mesos-0.28.1/build/src/.libs/libmesos.dylib | |
/var/root/marathon-1.1.1/bin/start --master 127.0.0.1:5050 --zk zk://localhost:2181/mesos | |
########################################################## |
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
# install | |
export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.dylib | |
git clone https://github.com/mesos/chronos.git | |
cd chronos | |
#must have node installed | |
mvn package | |
#start on port 8081 | |
java -cp target/chronos*.jar org.apache.mesos.chronos.scheduler.Main --master 127.0.0.1:5050 --zk_hosts localhost:2181 --http_port 8081 | |
#list jobs | |
curl -L -X GET localhost:8081/scheduler/jobs |
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/Banno/druid-docker | |
## git clone https://github.com/zcox/druid-pageviews | |
cd druid-docker | |
fig kill && fig rm --force | |
./build.sh | |
fig up -d druid | |
#### docker | |
## `boot2docker shellinit` | |
## docker ps | |
## |
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
su - hdfs | |
git clone https://github.com/pivotalsoftware/pivotal-samples.git | |
# I copied the files on /mnt | |
cd /mnt/pivotal-samples/sample-data | |
# load data into HDFS | |
sh -x load_data_to_HDFS.sh ## it will show you the output of the commands the script is running | |
hdfs dfs -ls /retail_demo | |
#### Hive table ##### | |
https://github.com/pivotalsoftware/pivotal-samples/blob/master/hive/create_hive_tables.sql |
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
##Start cluster | |
/Users/neeraj/dse/bin/dse cassandra | |
## - Stop cluster | |
/Users/neeraj/dse/bin/dse cassandra-stop | |
## enable advanced replication | |
vi /Users/neeraj/dse/resources/dse/conf/dse.yaml | |
./nodetool status | |
export CQLSH_HOST=192.168.1.185 | |
./cqlsh | |
# run this in edge and hub cluster |
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
#Install R and then following packages | |
#repr failed to create | |
yum install R-* | |
install.packages("evaluate", dependencies = TRUE) | |
install.packages("base64enc", dependencies = TRUE) | |
install.packages("devtools", dependencies = TRUE) | |
install_github('IRkernel/repr') | |
install.packages("dplyr", dependencies = TRUE) | |
install.packages("caret", dependencies = TRUE) | |
install.packages("repr", dependencies = TRUE) |