Skip to content

Instantly share code, notes, and snippets.

View aphyr's full-sized avatar
💭
be gay, do crimes

Kyle Kingsbury aphyr

💭
be gay, do crimes
View GitHub Profile
aphyr@azimuth:~/ustate/reimann master$ lein protobuf compile reimann.proto
Downloading protobuf-2.3.0.zip
Unzipping protobuf-2.3.0.zip to /home/aphyr/ustate/reimann
Configuring protoc
Running 'make'
Installing
Password:
Compiling r to /home/aphyr/ustate/reimann/protosrc
Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: java.lang.Character (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
$ lein classpath
/home/aphyr/ustate/reimann/test:/home/aphyr/ustate/reimann/test-resources:/home/aphyr/ustate/reimann/src:/home/aphyr/ustate/reimann/classes:/home/aphyr/ustate/reimann/resources:/home/aphyr/ustate/reimann/lib/tools.macro-0.1.1.jar:/home/aphyr/ustate/reimann/lib/clojure-1.2.0.jar:/home/aphyr/ustate/reimann/lib/lamina-0.4.0.jar:/home/aphyr/ustate/reimann/lib/commons-compress-1.3.jar:/home/aphyr/ustate/reimann/lib/httpclient-4.0.3.jar:/home/aphyr/ustate/reimann/lib/gloss-0.2.0.jar:/home/aphyr/ustate/reimann/lib/netty-3.2.5.Final.jar:/home/aphyr/ustate/reimann/lib/commons-codec-1.4.jar:/home/aphyr/ustate/reimann/lib/potemkin-0.1.0.jar:/home/aphyr/ustate/reimann/lib/commons-io-1.4.jar:/home/aphyr/ustate/reimann/lib/useful-0.7.4-alpha4.jar:/home/aphyr/ustate/reimann/lib/clojure-contrib-1.2.0.jar:/home/aphyr/ustate/reimann/lib/protobuf-0.6.0-beta4.jar:/home/aphyr/ustate/reimann/lib/user-agent-utils-1.2.3.jar:/home/aphyr/ustate/reimann/lib/ordered-set-0.2.3.jar:/home/aphyr/ustate/reimann/lib/fs-1.0.0.
(defproject reimann "0.0.1-SNAPSHOT"
:description "reimann: folds events into states"
:dependencies [
[clojure "1.2.0"]
[aleph "0.2.0"]
[protobuf "0.6.0-beta4"]
]
:dev-dependencies [
[protobuf "0.6.0-beta4"]
]
lein test reimann.test.classpath
(#<URL file:/home/aphyr/ustate/reimann/test/> #<URL file:/home/aphyr/ustate/reimann/test-resources> #<URL file:/home/aphyr/ustate/reimann/src/> #<URL file:/home/aphyr/ustate/reimann/classes/> #<URL file:/home/aphyr/ustate/reimann/resources> #<URL file:/home/aphyr/ustate/reimann/lib/tools.macro-0.1.1.jar> #<URL file:/home/aphyr/ustate/reimann/lib/clojure-1.2.0.jar> #<URL file:/home/aphyr/ustate/reimann/lib/lamina-0.4.0.jar> #<URL file:/home/aphyr/ustate/reimann/lib/commons-compress-1.3.jar> #<URL file:/home/aphyr/ustate/reimann/lib/httpclient-4.0.3.jar> #<URL file:/home/aphyr/ustate/reimann/lib/gloss-0.2.0.jar> #<URL file:/home/aphyr/ustate/reimann/lib/netty-3.2.5.Final.jar> #<URL file:/home/aphyr/ustate/reimann/lib/commons-codec-1.4.jar> #<URL file:/home/aphyr/ustate/reimann/lib/potemkin-0.1.0.jar> #<URL file:/home/aphyr/ustate/reimann/lib/commons-io-1.4.jar> #<URL file:/home/aphyr/ustate/reimann/lib/useful-0.7.4-alpha4.jar> #<URL file:/home/aphyr/ustate/reimann/lib/clojure-co
aphyr@azimuth:~/ustate/reimann master$ lein uberjar
Copying 20 files to /home/aphyr/ustate/reimann/lib
Copying 7 files to /home/aphyr/ustate/reimann/lib/dev
Compiling reimann.bin
Exception in thread "main" java.lang.ClassNotFoundException: reimann.Proto$Msg (common.clj:6)
at clojure.lang.Compiler.analyze(Compiler.java:5205)
at clojure.lang.Compiler.analyze(Compiler.java:5151)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3057)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5371)
at clojure.lang.Compiler.analyze(Compiler.java:5190)
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fd4c2640420, pid=16471, tid=140553517471488
#
# JRE version: 6.0_24-b24
# Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.11pre
# Distribution: Debian GNU/Linux unstable (sid), package 6b24~pre2-1
# Problematic frame:
# C 0x00007fd4c2640420
JVM version is 21.0-b17
using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 3156213760 (3010.0MB)
% Returns JSON-structured keydata with an added key pointing to this object's
% data. Arg is a pair; the first element is the key name for this object's
% data, and the second is a list of keys to select from that data.
map_to_keydata_with_data({error, notfound}, _, _) ->
[];
map_to_keydata_with_data(Values, KeyData, Arg) ->
[SelfKey, SelectKeys] = Arg,
% Operate only on the first value
[Value | _] = riak_object:get_values(Values),
require 'thin'
require 'rack'
def app
Rack::Builder.new do
run lambda { |env| puts "start #{Thread.current}"; Thread.pass; sleep 3; puts "end"; [200, {'Content-Type' => 'text/plain'}, 'ok'] }
end
end
server = Thin::Server.new('0.0.0.0', 8000, app)
role :graphite do
task :setup do
sudo do
begin
useradd '-m', '--shell', '/bin/bash', 'graphite'
log 'Graphite user created'
rescue => e
unless e.to_s =~ /user.*graphite.*exists/
raise
end