bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
#!/usr/bin/env python | |
from cm_api.api_client import ApiResource | |
def main(args): | |
cm_host = get(args, 1, "localhost") | |
cm_user = get(args, 2, "admin") | |
cm_pass = get(args, 3, "admin") | |
api = ApiResource(cm_host, username=cm_user, password=cm_pass) |
#!/bin/sh | |
# install into /etc/ppp/ip-down | |
# chmod a+x /etc/ppp/ip-down | |
source /etc/ppp/ip.config | |
case "${IPREMOTE}" in | |
${MY_IPREMOTE}) | |
/sbin/route delete ${MY_ROUTE} -interface ${IFNAME} |
#!/bin/bash | |
# Minimum TODOs on a per job basis: | |
# 1. define name, application jar path, main class, queue and log4j-yarn.properties path | |
# 2. remove properties not applicable to your Spark version (Spark 1.x vs. Spark 2.x) | |
# 3. tweak num_executors, executor_memory (+ overhead), and backpressure settings | |
# the two most important settings: | |
num_executors=6 | |
executor_memory=3g |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
#!/bin/bash | |
# Simple install script for stock RedHat/CentOS 7.x | |
# Allows yum update to pull security & other fixes automatically from MongoDB.com's repos | |
# (versus ancient packages in Red Hat/Cent repos) | |
# To completely purge all remnants of Mongo (repo conf, rpms, yum cache, DB files, kernel tweaks: | |
# sudo service mongod stop ; sudo rm -rf /etc/yum.repos.d/mongo* ; sudo rm -rf /var/lib/mongo/* ; sudo sed -i.`date +%Y-%m-%d_%H-%M-%S`.bak '/^#.*$/!d' /etc/rc.d/rc.local ; sudo rm -rf /var/cach/yum ; sudo yum -y clean all ; sudo yum -y remove mongodb* | |
# Sanity check - are we on a RH family distro? | |
[ -f "/etc/redhat-release" ] || { echo -e "This script requires RedHat or CentOS. Quitting. \n"; exit 1 ;} |
#!/bin/bash | |
# dependencies: curl | |
# example usage: cf_ban 192.168.0.1 | |
# append cloudflare email address and API token: | |
USER= | |
TOKEN= |
#!/bin/bash | |
# Install Spark on CentOS 7 | |
yum install java -y | |
java -version | |
yum install wget -y | |
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz | |
tar xvf scala-2.11.7.tgz | |
sudo mv scala-2.11.7 /usr/lib | |
sudo ln -s /usr/lib/scala-2.11.7 /usr/lib/scala |
#!/bin/bash | |
# Do not run if removal already in progress. | |
pgrep "docker rm" && exit 0 | |
# Remove Dead and Exited containers. | |
docker rm $(docker ps -a | grep "Dead\|Exited" | awk '{print $1}'); true | |
# It will fail to remove images currently in use. | |
docker rmi $(docker images -qf dangling=true); true |