Author Archive


History of Spring Framework and Spring Boot

Introduction Spring framework is arguably one of the most popular application development frameworks used by java developers. It currently consists of a large number of modules providing a range of services. These include a component container, aspect oriented programming support for building cross cutting concerns, security framework, data access framework, web application framework and support […]

Random Alphanumeric Generator in Java

The following Java example program generates a cryptographically secure random alphanumeric string. If cryptographic security is not a requirement, the SecureRandom class can be replaced with Random class for a much faster implementation. The following function can be used to generate random strings with a specified length. It is also possible to specify a subset […]

How to Pick a Random Character in Java

The following Java program can be used to generate a random character in Java. There are three functions in the program. getRandomCharacter() returns a random character in the ASCII printable character set. getRandomAlphabet() returns a random alphabet in english (a – z). getRandomAlphaNum() returns a random alphanumeric character (0 – 9 & a – z). […]

How to Install Hadoop on Mac OS X El Capitan

This tutorial contains step by step instructions for installing hadoop 2.x on Mac OS X El Capitan. These instructions should work on other Mac OS X versions such as Yosemite and Sierra. This tutorial uses pseudo-distributed mode for running hadoop which allows us to use a single machine to run different components of the system […]

How to Read HDFS File in Java

Hadoop distributed file system (HDFS) can be accessed using native Java API provided by hadoop Java library. The following example uses FileSystem API to read an existing file in an hdfs folder. Before running the following Java program, ensure that the following values are changed as per your hadoop installation. Modify the HDFS_ROOT_URL to point […]