Skip to content

Instantly share code, notes, and snippets.

# output messages into a rolling log file as well as stdout
log4j.rootLogger=TRACE,stdout
# stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold=DEBUG
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} [%t] %l %m%n
# rolling log file
@version("1")
record MessageTypeA {
string a;
string b;
int c;
boolean d;
}
@version("2")
record MessageTypeA {
@gdusbabek
gdusbabek / color-junit
Created January 13, 2011 16:45 — forked from eevans/Makefile
#!/usr/bin/env python
import re, sys
STATUS_RE = re.compile(
'\s+\[junit\] Tests run: [\d]+, Failures: ([\d]+), Errors: ([\d]+)')
EXCEPT_RE = re.compile(
'\s+\[junit\] (Exception in |\tat \w+|Caused by: )')
RED = "\033[1;31m%s\033[0m"
@gdusbabek
gdusbabek / node-cassandra-client-examples.js
Created April 12, 2012 17:31
Examples of how to use node-cassandra-client
var async = require('async');
function doSimpleConnect(callback) {
var Connection = require('cassandra-client').Connection;
// these are the connection parameters you need to connecto to Cassandra.
var connectionOptions = {
host: '127.0.0.1',
port: 19170,
<dependency>
<groupId>com.rackspacecloud</groupId>
<artifactId>service-registry-client</artifactId>
<version>2.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.rackspacecloud</groupId>
<artifactId>service-registry-curator</artifactId>
<version>2.0.1-SNAPSHOT</version>
</dependency>
@gdusbabek
gdusbabek / blueflood_ideas.md
Last active December 21, 2015 09:08
Blueflood Improvement Ideas

Blueflood Improvment Ideas

These are in no particular order. I add them as I think of them.

  1. Local ingestion durability.
  2. Use the Cassandra Fat Client for ingestion, rollup and/or query
  3. l2met integration (http://r.32k.io/l2met-introduction)
  4. Fluentd integration (http://fluentd.org)
  5. A distributed test suite
  6. Internode coordination (obviate manual shard assignment)
## Graphite local_settings.py
# Edit this file to customize the default Graphite webapp settings
#
# Additional customizations to Django settings can be added to this file as well
# import the other settings here.
from graphite.settings import *
#####################################
# General Configuration #
@gdusbabek
gdusbabek / RunAndCompare.java
Created April 22, 2014 13:15
Compare lock vs synchronized
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class RunAndCompare {
@gdusbabek
gdusbabek / graphs.py
Created July 17, 2014 14:49
generates graphs from metric data
import sys
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import csv
import datetime
matplotlib.rcParams.update({'font.size': 4})
@gdusbabek
gdusbabek / freedb_genres_sorted.txt
Last active August 29, 2015 14:04
A dump of all the unique genres as collected from the freedb.org database of CDDB entries. This why we can't have nice things. For giggles, count the occurrences of "country" or "rock" and realize that doesn't count misspellings.
-1
! liederbuch
!!!
!!!metal!!!
!artist albums; !pop
!compilations
!compilations; !pop
!compilations; !pop; rock
!compilations; dance
!compilations; r'n'b