Map Reduce in Hadoop Example

Hadoop MapReduce is a software framework used for distributed processing of large data sets on compute clusters.

According to The Apache Software Foundation, the objective of Map/Reduce is to split the input data set into independent chunks that are processed completely in parallel. The Hadoop MapReduce framework sorts the outputs of the maps, which are then input to the reduce phase. Normally both the input and the output of the job is stored in a file system.

In this blog post I will show you how to write a Map/Reduce word count program step by step in order to understand what is happening in every phase and line of code.

Continue reading
Posted in Java Runtimes - VM, Appserver & Cloud | Tagged , , | Leave a comment

Introduction to HttpClient

And now let’s GET some info booster POSTED in the spirit of the winter holidays …

This article shows you how to use the new Java 11 HtppClient API to send HTTP GET/POST requests using two very common examples.

HttpClient provides synchronous and asynchronous request mechanisms:

  • send(HttpRequest, BodyHandler) blocks until the request has been sent and the response has been received.
  • sendAsync(HttpRequest, BodyHandler) sends the request and receives the response asynchronously.

In this article, I will focus on the synchronous GET request.

Continue reading
Posted in Java Basics | Tagged , , | 2 Comments

What is Docker Compose? How to use it?

When you use Docker and you have to handle many different containers, their management is complicated. You need to manage the configuration and the functioning of each container separately. When you need to use your containers in a specific environment, you’ll set a specific configuration for each of your containers. Docker Compose promises to solve this problem.

Continue reading
Posted in Java Runtimes - VM, Appserver & Cloud | Tagged , | Leave a comment

What is new in Spring Boot 2.2?

 “First do it, then do it right, then do it better.“ (Addy Osmani)

Spring Boot 2.2 has recently been released and comes out with a range of new features. Among the dependency upgrades for quite a large number of Spring projects, some more changes in Spring Boot 2.2 are as follows:

  • Support for Java 13
  • JUnit 5
  • Jakarta EE dependencies
  • Lazy initialization
  • RSocket support
  • Hibernate dialect
  • Kubernetes detection
  • And others like: Health indicator groups, AssertJ 3.12, Spring HATEOAS 1.0, DataSize migration, Elasticsearch, Actuator HTTP Trace and Auditing, Gradle requirements, Jetty logging configuration, Hamcrest 2.1, Freemarker templates configuration, HttpHiddenMethodFilter disabled by default, Health Indicator, Test Application Arguments, Banners …

I decided not to describe every feature in detail but to focus on the changes I found to be the most interesting.

Continue reading
Posted in Spring Universe | Tagged , | Leave a comment

JUnit 5 – Behandlung von Exceptions

JUnit ist ein wichtiges Unit-Test-Framework für die Java Programmiersprache. JUnit ermöglicht das Testen der Ausnahmebehandlung von Code. Es kann also getestet werden, ob der Code eine gewünschte Exception auslöst oder nicht. Es gibt viele Möglichkeiten, mit Ausnahmen umzugehen. Hier werden drei der verbreitetsten Methoden in Junit 4 erläutert und mit den Methoden von Junit 5 verglichen.

Continue reading
Posted in Java and Quality | Tagged , , | Leave a comment

Gradle 6: Verbesserte Abhängigkeitsverwaltung

Diesen Monat wurde Gradle 6 veröffentlicht, und es stellt sich die übliche Frage, was gibt es Neues?

Eines der größeren Ziele von Gradle 6 ist es, den Umgang mit großen und komplexen Abhängigkeiten zu verbessern. Dies soll einige übliche Probleme reduzieren:

  • Eine Abhängigkeit wird in zwei verschiedenen Versionen, welche nicht kompatibel sind, angefordert.
  • Mehrere Abhängigkeiten bieten dasselbe Feature an (z. B. Logback und Log4J)
  • Inkompatible Runtimes (z. B. Update von Groovy über eine Abhängigkeit verursacht Fehler in älterem Groovy-Code)
Continue reading
Posted in Build, config and deploy | Leave a comment

Docker Best Practices: Keine “FAT JARs” mehr!

Dieser Beitrag unserer Blog-Serie beleuchtet, warum die so häufig genutzten “Fat” oder “Uber” Jars und auch WAR-Dateien schlecht für die Bereitstellung mit Docker sind und welche sinnvollen Alternativen existieren.

Continue reading
Posted in Java Runtimes - VM, Appserver & Cloud | Tagged , | 2 Comments