How to Change Hadoop Output Delimiter

Hadoop’s default output delimiter (character separating the output key and value) is a tab (“\t”). This post explains how to change the default Hadoop output delimiter. Output Delimiter Configuration Property The output delimiter of a Hadoop job can easily be changed by setting the mapred.textoutputformat.separator configuration property. This property can be set from the code

read more

How to Create a Disk Based List in Java

Occasionally when programming in Java you will need a List too large to hold in memory. MapDB is an open source Java library that allows you to create a disk based List (and other Java Collections) very easily. MapDB is a hybrid of an embedded database engine and the Java Collections framework. It provides Maps,

read more

How to Create a Disk Based Map in Java

Occasionally when programming in Java you will need a Map too large to hold in memory. MapDB is an open source Java library that allows you to create a disk based Map (and other Java Collections) very easily. MapDB is a hybrid of an embedded database engine and the Java Collections framework. It provides Maps,

read more

Introduction to Java Streams

What are Java Streams? A Java stream is a sequence of elements of a specific type that are consumed from a source like Collections, arrays, or I/O resources. Streams are similar to collections in that they can both be used to process and aggregate data. However, there are some big differences. Although the idea of

read more

What is the Java Supplier Interface?

The Java Supplier interface of the java.util.function package is a functional interface that is often used as an assignment target for lambda expressions. The get() method is the class’s only abstract method, which takes no input and returns an output. For more information on functional interfaces in Java click here: What is a Java Functional

read more

What is the Java Function Interface?

The Java Function interface of the java.util.function package is a functional interface that is often used as an assignment target for lambda expressions. The apply(T t) method is the class’s only abstract method, leaving it as the only one without a default implementation. Here is an overview of the various methods in the Function interface:

read more

What is the Java Predicate Interface?

The Java Predicate interface of the java.util.function package is a functional interface that is often used as an assignment target for lambda expressions.  The test(T t) method is the class’s only abstract method, leaving it as the only one without a default implementation.  Here is an overview of the various methods in the Predicate interface:

read more

What is the Java Consumer Interface?

The Java Consumer interface of the java.util.function package is a functional interface that is often used as an assignment target for lambda expressions. accept(T t) is the interface’s single abstract method which takes an object as input and returns nothing. The andThen(Consumer<? super T> after) method provides a simple way to string multiple Consumer objects

read more

What is a Java Functional Interface?

Simply put, a Java functional interface is an interface with a single abstract method. Functional interfaces were released with Java 8 and provide target types for lambda expressions. The java.util.function package contains various general purpose functional interfaces such as Predicate, Consumer, Function, and Supplier. For an an intro to Java lambda expressions click here: What

read more

What are Lambdas in Java?

In general a lambda expression is an anonymous function, which means for some combination of inputs, there is a specific output. In the context of Java, a lambda expression is a kind of anonymous method with a more compact constructor syntax. Lambdas in Java are first class citizens, and can be passed as method parameters

read more