• Spark PairRDDFunctions - AggregateByKey

    One of the great things about the Spark Framework is the amout of functionality provided out of the box. There is a class aimed exclusively at working with key-value pairs, the PairRDDFunctions class. When working data in the key-value format one of the most common operations to perform is grouping...


  • Partially Applied Functions in Java

    Last year I completed an intro to functional progamming course on edX. The language used in the course was haskell. I found working in haskell enjoyable. One of my favorite features is functions taking more than one parameter can be partially applied functions automatically. For example, if you have a...


  • FlatMap in Guava

    This is a short post about a method I recently discovered in Guava. The Issue I had a situation at work where I was working with objects structured something like this: public class Outer { String outerId; List<Inner> innerList; ....... } public class Inner { String innerId; Date timestamp; }...


  • Sql for Lucene

    A short time ago, I started a side project to learn the latest version of Antlr. I decided to do something that has always interested me, a sql parser for the Lucene search engine. Even though the parser is a learning exercise, I thought someone else could find this useful....


  • Java 8 Functional Interfaces and Checked Exceptions

    The Java 8 lambda syntax and functional interfaces have been a productivity boost for Java developers. But there is one drawback to functional interfaces. None of the them as currently defined in Java 8 declare any checked exceptions. This leaves the developer at odds on how best to handle checked...