Posted by chetan
on December 31, 2010
Oh boy, here we go again. I actually managed to come up with a list of my top 3 this year, so let’s just cut to the chase, shall we?
- Kanye West – My Beautiful Dark Twisted Fantasy
- LCD Soundsystem – This is Happening
- Titus Andronicus – The Monitor
And the runner-ups in alphabetical order:
- Arcade Fire – The Suburbs
- Beach House – Teen Dream
- Best Coast – Crazy For You
- Das Racist – Shut Up, Dude
- Das Racist – Sit Down, Man
- Robyn – Body Talk
- The-Dream – Love King
- Toro Y Moi – Causers Of This
- Wavves – King of the Beach
- Wild Nothing – Gemini
- Xiu Xiu – Dear God, I Hate Myself
Best EPs:
- Annuals – Sweet Sister EP
- DEERPEOPLE – DEERPEOPLE EP
- Girls – Broken Dreams Club EP
Can’t wait for next year!
Posted by chetan
on December 30, 2010
After spending the better part of a day trying to get HDFS to mount on my Mac, I finally gave up. Luckily, I was able to find MuCommander, a cross-platform Java port of the Norton Commander of old, and as luck would have it, it supports HDFS in the latest version! Very handy for quickly browsing your HDFS clusters if you can’t mount it or don’t have the Hadoop toolset installed.

Posted by chetan
on December 29, 2010
Hadoop has a built-in feature for easily distributing JARs to your worker nodes via HDFS but, unfortunately, it’s broken. There’s a couple of tickets open with a patch again 0.18 and 0.21 (trunk) but for some reason they still haven’t been committed yet. We’re currently running 0.20 so the patch does me no good anyway. So here’s my simple solution:
I essentially copied the technique used by ToolRunner when you pass a “libjars” argument on the command line. You simply pass the function the HDFS paths to the JAR files you want included and it’ll take care of the rest.
Example usage:
public int run(String[] args) throws Exception {
JobConf job = new JobConf(getConf());
// ... job setup ...
NerfUtils.addJarsToJobClasspath(job,
new String[] {
"/libraries/java/solr-commons-csv-1.4.1.jar" });
// ... more job setup ...
return JobClient.runJob(job).getJobState();
}
Might not be the prettiest or best solution but it works for me!
Posted by chetan
on December 28, 2010
Using Hadoop’s DistributedCache mechanism is fairly straightforward, but as I’m finding is common with everything-Hadoop, not very well documented.
Adding files
When setting up your Job configuration:
// Create symlinks in the job's working directory using the link name
// provided below
DistributedCache.createSymlink(conf);
// Add a file to the cache. It must already exist on HDFS. The text
// after the hash is the link name.
DistributedCache.addCacheFile(
new URI("hdfs://localhost:9000/foo/bar/baz.txt#baz.txt"), conf);
Accessing files
Now that we’ve cached our file, let’s access it:
// Direct access by name
File baz = new File("baz.txt");
// prints "true" since the file was found in the working directory
System.out.println(baz.exists());
// We can also get a list of all cached files
Path[] cached = DistributedCache.getLocalCacheFiles(conf);
for (int i = 0; i < cached.length; i++) {
Path path = cached[i];
String filename = path.toString();
}
Posted by chetan
on December 22, 2010
Android 2.0 introduced a feature that lets you backup your apps and their settings to the “cloud.” Normally this feature is accessible by going to Settings > Privacy and checking Back up my settings.
Unfortunately, it seems that many HTC phones hide this setting. If “Privacy” doesn’t appear in your settings then use this trick to get there.
- Settings > Search > Searchable items
- Enable “Settings”
- Goto the “Home” screen
- Search for “Privacy”
- Check “Back up my settings”
It’s just too bad there’s no easy way to backup your apps manually, without resorting to an app on the market…