Skip to content

Instantly share code, notes, and snippets.

View mshuler's full-sized avatar
💭
ヽ(´ー`)ノ

Michael Shuler mshuler

💭
ヽ(´ー`)ノ
View GitHub Profile
@mshuler
mshuler / star2000_etime_mod.py
Created March 8, 2014 13:58
Star2000 CSV etime Timestamp Modification
#!/usr/bin/env python
# vim: ai ts=4 sw=4 sts=4 et
#
# http://www.star.bnl.gov/
# http://crd-legacy.lbl.gov/~kewu/fastbit/data/samples.html
#
# star2000 etime column date format examples:
# 20000625.0617250018
# 20000625.061728999
# 20000625.062128
@mshuler
mshuler / lxc-ubuntu.sh
Created March 12, 2014 16:35
Script to generate LXC containers for EC2
#!/bin/bash
#
# Template script for generating ubuntu container for LXC with the same
# ubuntu relase as the host
#
# This script is based on lxc-debian for EC2 (Daniil Kulchenko <[email protected]>)
# wich itself is based on lxc-debian (Daniel Lezcano <[email protected]>)
#
@mshuler
mshuler / upgrade.sh
Created March 28, 2014 00:01
debian testing daily upgrade
#!/bin/sh
yesno()
{
while true; do
read -p "=====> Would you like to $message [Y/n]? " yn
case $yn in
''|[Yy]* ) answer="yes"; break;;
* ) answer="no"; exit;;
esac
#!/bin/sh
#
# stop manually started cassandra service, remove dtest cruft,
# and wipe data and logs
#
# set user or leave commented out for current user from env
#USER=cassandra
# kill all CassandraDaemons
while pgrep -f CassandraDaemon; do
#!/bin/sh
#
# Update all the git repositories under a directory.
#
################
# ToDo: handle multiple remotes?
################
#
# If script is placed in your $PATH, then hardcode REPODIR,
@mshuler
mshuler / cassandra_build_server_setup-trusty.sh
Last active August 29, 2015 14:07
Configure an Ubuntu Trusty 14.04 server for Cassandra and Driver build/test environment
#!/bin/sh
if [ $(id -ru) -ne 0 ]; then
echo "$0 must be run as root or with sudo"
exit 1
fi
RELEASE=$( lsb_release --short --codename )
CHECK="true"
if [ "$CHECK" = "true" ]; then
@mshuler
mshuler / cassandra_ubuntu_ppa_build.sh
Created October 10, 2014 22:22
Ubuntu PPA deb build hack to include downloaded jars in Apache Cassandra source package
#!/bin/sh
CREPO=~/git/cassandra
BRANCH=$1
if [ "x$BRANCH" = "x" ]; then
echo "Gimme a branch/tag to build.."
exit 1
fi
cd $CREPO
@mshuler
mshuler / cassandra_init
Last active August 29, 2015 14:17
RPM /etc/init.d/cassandra
#!/bin/bash
#
# /etc/init.d/cassandra
#
# Startup script for Cassandra
#
# chkconfig: 2345 20 80
# description: Starts and stops Cassandra
. /etc/rc.d/init.d/functions
@mshuler
mshuler / msrt_repro.txt
Created March 28, 2015 20:36
stress write fails in incremental_repair_test.py:multiple_subsequent_repair_test
automaton@i-6706e8e1b:~/cassandra$ ./tools/bin/cassandra-stress write n=5000000 -rate threads=50 -schema 'replication(factor=3)'
Created keyspaces. Sleeping 1s for propagation.
Sleeping 2s...
Warming up WRITE with 50000 iterations...
INFO 19:01:39 Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
INFO 19:01:39 New Cassandra host /127.0.0.3:9042 added
INFO 19:01:39 New Cassandra host /127.0.0.2:9042 added
INFO 19:01:39 New Cassandra host localhost/127.0.0.1:9042 added
Connected to cluster: test
Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
@mshuler
mshuler / apache-cassandra-2.1.4-src_unit_test_stdout.txt
Created May 3, 2015 23:33
apache-cassandra-2.1.4-src unit test stdout
mshuler@hana:~/tmp$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
mshuler@hana:~/tmp$
mshuler@hana:~/tmp$
mshuler@hana:~/tmp$ wget http://archive.apache.org/dist/cassandra/2.1.4/apache-cassandra-2.1.4-src.tar.gz
--2015-05-03 17:45:45-- http://archive.apache.org/dist/cassandra/2.1.4/apache-cassandra-2.1.4-src.tar.gz
Resolving archive.apache.org (archive.apache.org)... 192.87.106.229, 140.211.11.131, 2001:610:1:80bc:192:87:106:229
Connecting to archive.apache.org (archive.apache.org)|192.87.106.229|:80... connected.