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 Predicate Pushdown?

The basic idea of predicate pushdown is that certain parts of SQL queries (the predicates) can be “pushed” to where the data lives.  This optimization can drastically reduce query/processing time by filtering out data earlier rather than later. Depending on the processing framework, predicate pushdown can optimize your query by doing things like filtering data

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

How to checkout git tags

Tags in Git are a way to bookmark specific commits. This is often done to indicate different versions or releases of a project. There is no straight forward way to checkout a tag in Git. But you can checkout the specific commit associated with a tag that into a new branch. This will give you

read more

Writing Data from Apache Kafka to Text File

When working with Apache Kafka you might want to write data from a Kafka topic to a local text file. This is actually very easy to do with Kafka Connect. Kafka Connect is a framework that provides scalable and reliable streaming of data to and from Apache Kafka. With Kafka Connect, writing a topic’s content

read more

Writing Text File contents to Kafka with Kafka Connect

apache kafka logo

When working with Kafka you might need to write data from a local file to a Kafka topic. This is actually very easy to do with Kafka Connect. Kafka Connect is a framework that provides scalable and reliable streaming of data to and from Apache Kafka. With Kafka Connect, writing a file’s content to a

read more