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
// load error messages from a log into memory | |
// then interactively search for various patterns | |
// base RDD | |
val lines = sc.textFile("log.txt") | |
// transformed RDDs | |
val errors = lines.filter(_.startsWith("ERROR")) | |
val messages = errors.map(_.split("\t")).map(r => r(1)) | |
messages.cache() |
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
cat ~/credentials/user | |
source ~/credentials/user | |
keystone discover | |
keystone catalog | |
keystone endpoint-get --service volume | |
keystone token-get --wrap 50 | |
nova list | |
nova flavor-list | |
nova boot --image cirros-qcow2 --flavor 1 MyFirstInstance |
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
# Some notes from installing VirtualBox on CentOS 7. | |
# These exact steps haven't been tested, as I ran them in a different order when manually installing. | |
# Install dependencies | |
yum -y install gcc make patch dkms qt libgomp | |
yum -y install kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel | |
# Install VirtualBox | |
cd /etc/yum.repos.d | |
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo |
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
# Systemd unit file for tomcat | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
Environment=JAVA_HOME=/usr/lib/jvm/jre | |
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid |
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
# example python script | |
# pip install requests before using requests | |
import requests | |
import json | |
HOSTNAME="your.elasticsearch.host.com" # hostname | |
PORT=9200 # port number | |
NODE_NAME="node001" # node to reroute to |
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
# example python script | |
# pip install requests before using requests | |
import requests | |
import json | |
HOSTNAME="your.elasticsearch.host.com" # hostname | |
PORT=9200 # port number | |
NODE_NAME="node001" # node to reroute to |
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
#/bin/bash | |
if [ $# -lt 3 ] | |
then | |
echo "Usage: reindex.sh source_url target_url index [query]" | |
echo "Example: reindex.sh http://source.com:9200 http://target.com:9200 products_v1 '{\"query\":{\"range\":{\"mod_date\":{\"from\":\"2015-12-03T20:00:00\"}}}}'" | |
exit 1 | |
fi | |
SOURCE_URL=$1 |