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
# tested with hbase 0.19.3 and jython 2.2.1 | |
import java.lang | |
from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants | |
from org.apache.hadoop.hbase.client import HBaseAdmin, HTable | |
from org.apache.hadoop.hbase.io import BatchUpdate, Cell, RowResult | |
# First get a conf object. This will read in the configuration | |
# that is out in your hbase-*.xml files such as location of the | |
# hbase master node. |
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/python | |
""" | |
Measure the number of request per seconds the | |
server has received in the last n requests (peak and average) | |
You can use it to analyze log files from apache and nginx | |
or any other server that uses the same log format as apache. | |
This script is designed to be used as a nagios plug-in. | |
""" |
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/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
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
# Original code at http://code.activestate.com/recipes/203871/ | |
# I have added a limit for the number of tasks waiting | |
# The method queueTask will block if the current taskList size | |
# exceeds the specified limit | |
import threading | |
from time import sleep | |
# Ensure booleans exist (not needed for Python 2.2.1 or higher) |
NewerOlder