Skip to content

Instantly share code, notes, and snippets.

View cassandra-for-cdh4.java
//
// Old Hadoop API
//
public org.apache.hadoop.mapred.InputSplit[] getSplits(JobConf jobConf, int numSplits) throws IOException
{
//TaskAttemptContext tac = new TaskAttemptContext(jobConf, new TaskAttemptID());
TaskAttemptContext tac = new org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl(jobConf, new TaskAttemptID());
List<org.apache.hadoop.mapreduce.InputSplit> newInputSplits = this.getSplits(tac);
org.apache.hadoop.mapred.InputSplit[] oldInputSplits = new org.apache.hadoop.mapred.InputSplit[newInputSplits.size()];
View gist:1132180
#! /bin/sh
. /etc/rc.conf
. /etc/rc.d/functions
#change this. too bad emacs daemon can't really work in mutli-user mode. for now.
USERNAME=volh
DESC="Run the emacs daemon."
NAME=emacs
#change this