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 | |
hosts = 10.1.10.200,10.1.10.201,10.1.10.202 | |
dse_location = "/opt/dse-4.5.1" | |
for HOST in $hosts | |
do | |
ssh root@%HOST '$dse_location/bin/dse cassandra-stop' | |
ssh root@$HOST 'rm -fr /var/lib/cassandra' | |
done |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
# Configurate the virtual machine to use 4GB of RAM |
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 | |
hostList=($(cat hostfile_from_csshx)) | |
for host in $hostList | |
do | |
ssh $host "sed -i s/0.0.0.0/$host/g /opt/dse-4.5.1/resources/cassandra/conf/cassandra.yaml" | |
done |
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
VAGRANTFILE_API_VERSION = "2" | |
# -*- mode: ruby -*- | |
# # vi: set ft=ruby : | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
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
/* | |
* Copyright 2014 Ryan Svihla | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
log-slow-queries=/var/log/whereever/slow_queries.log | |
long_query_time = 1 #one second | |
log-queries-not-using-indexes | |
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
<?xml version='1.0' encoding='utf-8'?> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" | |
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<!-- Database connection settings --> |
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
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="whatever"> | |
<property name="hibernate.version" value="3.5.6-Final"/> | |
<!-- ================================= | |
target: resolve | |
================================= --> | |
<target name="resolve" description="--> retrieve dependencies with ivy"> | |
<ivy:retrieve /> | |
</target> | |
</project> |
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/bin/env ruby | |
f = File.new ARGV[0] | |
lineend = ARGV[1].to_i | |
counter = 0 | |
while(line = f.gets and counter<lineend) | |
puts line | |
counter += 1 | |
end | |
f.close() |
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
INSERT INTO work_queue (work_id, work, status) values ( 100898, 'data to process', 'PENDING') | |
--against a bunch of separate servers because of sharding and probably done in a batch job | |
-- not at write time as that may take minutes | |
SELECT count(*) FROM work_queue where status='PENDING' | |
--against yet another server again because of sharding | |
INSERT INTO work_counts ( status, count) values ( 'PENDING', 1298008) |
OlderNewer