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 | |
STATE=`ps aux | grep "HiveServer" | wc -l` | |
IP="127.0.0.1" | |
PORT=10000 | |
function do_restart() | |
{ | |
echo Restarting | |
cd / | |
nohup hive --service hiveserver & | |
echo $! > /var/run/hiveserver.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
run: | |
*** Statistics *** | |
Count: 100 | |
Max: 107 | |
Min: 102 | |
Avg: 104.0 | |
Variance: 2.52 | |
Standard deviation: 1.5874507866387544 | |
Median: 104.5 | |
Actual: 104 00.00% 106 00.00% 105 00.00% 107 00.00% 107 00.00% |
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
*** Statistics *** | |
Count: 100 | |
Max: 107 | |
Min: 102 | |
Avg: 104.0 | |
Variance: 2.46 | |
Standard deviation: 1.5684387141358123 | |
Median: 105.0 | |
Actual: 105 00.00% 106 00.00% 102 00.00% 105 00.00% 107 00.00% | |
Forecast: 104 00.96% 104 01.90% 104 01.94% 104 00.96% 104 02.84% (MLR15, performance 00.00%) |
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
import ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
const transPixel = "\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B" | |
func pixelHandler(w http.ResponseWriter, r *http.Request) { | |
// Pixel |
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
# CloudPelican rules for AIDE ( http://aide.sourceforge.net/ ) | |
# Typically found in /etc/aide.conf | |
# @author Robin Verlangen | |
!/usr/local/cloudpelican/queues/.* # ignore queue contents as they change rapidly | |
!/usr/local/cloudpelican/.filepointers.json$ # ignore filepointers metadata as they change rapidly | |
!/usr/local/cloudpelican/.initstate$ # ignore init state as this changes every 24 hours |
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
*** NO GZIP | |
[root@cl025 ~]# ab -n 50000 -c 150 "http://godev.flx1.com/geo" | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking godev.flx1.com (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests |
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
package main | |
// License: Apache v2 | |
import ( | |
"bytes" | |
"compress/gzip" | |
"io/ioutil" | |
"net/http" | |
) |
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
sudo grep 'Corrupt' /var/log/cassandra/system.log | grep var | awk '{print \$4}' | grep -v corrupt | cut -c 2- | rev | cut -c 3- | rev | grep -v apache | grep -E "^/" | sort | uniq |
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 | |
# In case a join keeps failing to join the ring but you really want to force it (use with caution), you can do the following | |
# 1: Shut down node | |
service cassandra stop | |
# 2: Backup data | |
mkdir -p /backup/cassandra/data/system/local | |
cp -r /var/lib/cassandra/data/system/local/* /backup/cassandra/data/system/local |
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 | |
# This will work in case you have very limited disk space, it will also show more digestable progress compared to nodetool compactionstats | |
DATA_FOLDER="/var/lib/cassandra/data" | |
CMD="cleanup" | |
cd $DATA_FOLDER | |
# list keyspaces from small to large | |
KEYSPACES=`du -s * | sort -n | awk '{print $2}'` | |
# iterate keyspaes |