Skip to content

Instantly share code, notes, and snippets.

@mkscrg
mkscrg / README.md
Created July 20, 2012 20:47
Test topology for Kryo serializer issue

storm-kryo-test

Kryo serializers seem to work locally, but they're not found on the remote cluster when needed for deserialization.

The test case shows that the serializer works:

mvn test

Run locally to see that the AModels are properly serialized and deserialized:

@mkscrg
mkscrg / checksite.rb
Created July 10, 2012 04:06
Ruby script to periodically match a web page against a regex
require 'net/http'
$stdout.sync = true
if ARGV.include?("--help") || ![2,3,4].include?(ARGV.length)
puts "ruby checksite.rb URL REGEX [NOTIFY_EMAIL] [INTERVAL_SECS]"
exit!
end
uri = URI.parse(ARGV[0])
@mkscrg
mkscrg / README.md
Created June 26, 2012 17:49
Test topology for possible MAX_SPOUT_PENDING regression in storm 0.8.0-SNAPSHOT

storm-msp

The topology looks like this:

                                 "stream1"
           "one"              /-------------\
OneSpout --------> SplitBolt |               > CountBolt
                              \-------------/
                                 "stream2"
@mkscrg
mkscrg / .gitignore
Created June 18, 2012 21:26
A simple multi-module Maven project with which exec-maven-plugin is unusable.
.idea/
*.iml
target/
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Concurrent (forkIO)
import Control.Monad (unless)
import Data.ByteString.Char8 (pack)
import System.Environment (getArgs)
import System.Timeout (timeout)
import System.ZMQ3
@mkscrg
mkscrg / .gitignore
Created February 14, 2012 18:59
zeromq3-haskell-0.1.3 on GHC 7.4.1
cabal-dev/
dist/
@mkscrg
mkscrg / conctest.hs
Created December 1, 2011 23:42
Concurrency Test
import Control.Concurrent
import Control.Monad
import Data.Time.Clock.POSIX
import System.Environment
main :: IO ()
main = do
-- setup
n <- getArgs >>= return . read . head
start <- newEmptyMVar
{
"type": "event",
"status": "active",
"image_url": "http://s3.amazonaws.com/prestigedevelopment/beta/offer_photos/4e5f502fceb01f000100139f.jpg?1314869295",
"place": {
"name": "Chelsea Piers - Pier 62",
"lon": -74.005973,
"city": "New York",
"address": ", ",
"postal_code": "",
[
{
"type": "event",
"status": "active",
"image_url": null,
"expiration_date": "2011-10-01T13:00:00-07:00",
"place": {
"name": "Nelson Blue",
"lon": -74.001573,
"city": "New York",
{
"tags": [
"Japanese restaurants",
"Restaurant",
"Sushi",
"Bar",
"Food",
"Food & drink",
"Japanese restaurant"
],