Skip to content

Instantly share code, notes, and snippets.

[fix-import-collision] ~/code/kafka-python $ tox
GLOB sdist-make: /Users/joe/code/kafka-python/setup.py
py26 inst-nodeps: /Users/joe/code/kafka-python/.tox/dist/kafka-python-0.8.1-1.zip
py26 runtests: commands[0] | py.test --basetemp=/Users/joe/code/kafka-python/.tox/py26/tmp
=================================================================================== test session starts ====================================================================================
platform darwin -- Python 2.6.8 -- pytest-2.4.1
collected 0 items / 2 errors
========================================================================================== ERRORS ==========================================================================================
________________________________________________________________________ ERROR collecting test/test_integration.py _________________________________________________________________________
java.io.FileNotFoundException: File does not exist: hdfs://namenode/user/mapred/system/job_201207021916_7216/jobToken
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:562)
at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4429)
at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1301)
at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1242)
at org.apache.hadoop.mapred.TaskTracker.startNewTask(TaskTracker.java:2541)
at org.apache.hadoop.mapred.TaskTracker$TaskLauncher.run(TaskTracker.java:2505)
@jcrobak
jcrobak / start-hdfs.sh
Created July 6, 2012 15:31
simple start/stop scripts for hadoop-2.0.0 / CDH4
#!/bin/bash
set -ex
HADOOP_HOME=`dirname $0`/..
HADOOP_CONF_DIR="$HADOOP_HOME/etc/hadoop"
HADOOP_LOG_DIR="$HADOOP_HOME/log"
HADOOP_PID_DIR="$HADOOP_HOME"
HADOOP_OPTS="-Xmx512m -Djava.net.preferIPv4Stack=true"
HADOOP_NN_OPTS="-Dproc_namenode $HADOOP_OPTS"
HADOOP_DN_OPTS="-Dproc_datanode $HADOOP_OPTS"
HADOOP_SNN_OPTS="-Dproc_secondarynamenode $HADOOP_OPTS"
@jcrobak
jcrobak / .zshrc
Created July 25, 2011 20:49
My zshrc
######################################################################
# joe's zshrc file, based upon: mako's zshrc file, v0.1
# http://stuff.mit.edu/~jdong/misc/zshrc-osx-blackonwhite
#
# Options overview: http://zsh.sourceforge.net/Doc/Release/Options.html
######################################################################
unsetopt BG_NICE # do NOT nice bg commands
setopt CORRECT # command correction
setopt INTERACTIVE_COMMENTS # allow comments on line
@jcrobak
jcrobak / make-mbox.py
Created April 2, 2011 22:36
Makes a mbox from all the files in the directory -- for example, used for recovering files in Mail.app's .OfflineCache.
import mailbox
import email.utils
import os
mbox = mailbox.mbox('recovered.mbox')
mbox.lock()
try:
for infile in os.listdir(os.path.dirname(os.path.abspath(__file__))):
if not '.' in infile:
print "processing: %s" % infile
@jcrobak
jcrobak / .gitconfig
Created January 16, 2011 22:56
My git config.
# great tips from http://cheat.errtheblog.com/s/git and
# http://mislav.uniqpath.com/2010/07/git-tips/
[color]
ui = auto
[color "branch"]
current = red bold
local = blue
remote = green
[color "diff"]
meta = black
@jcrobak
jcrobak / maven.py
Created January 12, 2011 16:10
builds up a classpath from a pom.xml
def build_classpath(pomfile):
"""
Returns a string suitable for passing to java -cp by running mvn
to determine all the dependencies for the specified dependency.
"""
handle, fname = tempfile.mkstemp()
cmd = MVN + ["-f", pomfile, "dependency:build-classpath",
"-Dmdep.outputFile=%s" % fname]
print "Resolving classpath"
execute(cmd)
@jcrobak
jcrobak / keybase.md
Created August 26, 2014 01:32
keybase.md

Keybase proof

I hereby claim:

  • I am jcrobak on github.
  • I am joecrobak (https://keybase.io/joecrobak) on keybase.
  • I have a public key whose fingerprint is 5EF9 475B 13F3 9992 9676 51AB 0027 CAFB A666 D700

To claim this, I am signing this object: