Skip to content

Instantly share code, notes, and snippets.

View ekoontz's full-sized avatar

Eugene Koontz ekoontz

View GitHub Profile
ekoontz@ekoontz:~/tmp/lily-trunk$ mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.lilyproject:lily-repository-api:jar:0.3-SNAPSHOT
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing.
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.lilyproject:lily-repository-impl:jar:0.3-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.thoughtworks.paranamer:paranamer-maven-plugin is missing. @ line 127, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 144, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing.
ekoontz@ekoontz:~/tmp/lily-trunk$ mvn -X compile
Apache Maven 3.0 (r1004208; 2010-10-04 04:50:56-0700)
Java version: 1.6.0_22
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.6" arch: "x86_64" Family: "mac"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading user settings from /Users/ekoontz/.m2/settings.xml
[DEBUG] Reading global settings from /Users/ekoontz/Downloads/apache-maven-3.0/conf/settings.xml
[DEBUG] Using local repository at /Users/ekoontz/.m2/repository
@ekoontz
ekoontz / ZK and SASL
Created January 26, 2011 02:35
SASL patch: works with arbitrary Kerberos client and service principals provided properly-configured zoo.cfg, JAAS configuration file, and associated keytab(s) are available.
diff --git a/src/java/main/org/apache/zookeeper/ClientCnxn.java b/src/java/main/org/apache/zookeeper/ClientCnxn.java
index 8e449db..854afc6 100644
--- a/src/java/main/org/apache/zookeeper/ClientCnxn.java
+++ b/src/java/main/org/apache/zookeeper/ClientCnxn.java
@@ -24,11 +24,20 @@ import java.lang.Thread.UncaughtExceptionHandler;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
+import java.security.PrivilegedExceptionAction;
import java.util.LinkedList;
@ekoontz
ekoontz / all possible splits
Created February 4, 2011 07:35
Here's the result of running the missclassrate() on all possible splits:
> a3
[1] 1 6 5 4 7 3 8 7 5
> target_class
[1] "+" "+" "-" "+" "-" "-" "-" "+" "-"
> missclassrate(2.0, a3, target_class)
[1] 0.25
> missclassrate(3.0, a3, target_class)
[1] 0.25
> missclassrate(4.0, a3, target_class)
[1] 0.25
ekoontz@ekoontz:~/compojure$ clj
Clojure 1.2.0
user=> (ns hello-world
(:use compojure.core, ring.adapter.jetty)
(:require [compojure.route :as route]))
java.lang.ClassNotFoundException: org.mortbay.jetty.handler.AbstractHandler (jetty.clj:1)
hello-world=>
ekoontz@ekoontz:~/compojure$
#!/bin/sh
export CLASSPATH=$CLASSPATH:/Users/ekoontz/.m2/repository/org/clojure/clojure/1.2.0/clojure-1.2.0.jar:/Users/ekoontz/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/ekoontz/compojure/compojure-0.6.0-RC3.jar:/Users/ekoontz/compojure/lib/clout-0.4.0.jar:/Users/ekoontz/ring/lib/ring-core-0.3.5.jar:/Users/ekoontz/ring/lib/ring-jetty-adapter-0.3.5.jar:/Users/ekoontz/compojure/lib/clojure-contrib-1.2.0.jar
java jline.ConsoleRunner clojure.main
ekoontz@ekoontz:~/compojure$ lein repl
REPL started; server listening on localhost:25954.
user=> (ns hello-world
(:use compojure.core, ring.adapter.jetty)
(:require [compojure.route :as route]))
java.io.FileNotFoundException: Could not locate ring/adapter/jetty__init.class or ring/adapter/jetty.clj on classpath: (NO_SOURCE_FILE:1)
hello-world=>
ekoontz@ekoontz:~/compojure$ lein repl
REPL started; server listening on localhost:60551.
user=> (use 'compojure.core ring.adapter.jetty) (require '[compojure.routes :as routes])
java.lang.ClassNotFoundException: ring.adapter.jetty (NO_SOURCE_FILE:1)
java.io.FileNotFoundException: Could not locate compojure/routes__init.class or compojure/routes.clj on classpath: (NO_SOURCE_FILE:0)
user=>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>8</version>
</parent>
<repository>
<id>ekoontz.local</id>
<name>Eugene Koontz test repo</name>
<url>file:///Users/ekoontz/hadoop/build</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>