The CAP theorem states that a distributed data store (database) can only guarantee 2 of the 3 following: consistency, availability, and partition tolerance. What is Consistency? Consistency means that all read requests will return the same, most recent, writes to the database. In other words, reads will be consistent regardless of which node the data
Docker containers, when run in detached mode (the most common -d option), are designed to shut down immediately after the initial entrypoint command (program that should be run when container is built from image) is no longer running in the foreground. This can cause problems because often servers or services running in Docker containers are
Apache Hadoop is a core big data technology. Running Hadoop on Docker is a great way to get up and running quickly. Below are the basic steps to create a simple Hadoop Docker image. Pick an OS Hadoop runs great on a variety of Linux distos. In this post we use Ubuntu 16.04. Install Required
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
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,
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,
Uppercasing and lowercasing is a common task when working with text. Below are examples of doing this with standard Linux/Unix utilities. Lowercasing text with tr
1 |
tr 'A-Z' 'a-z' |
Uppercasing text with tr
1 |
tr 'a-z' 'A-Z' |
Lowercasing text with awk
1 |
awk '{print tolower($0)}' |
Uppercasing text with awk
1 |
awk '{print toupper($0)}' |
Lowercasing text with sed
1 |
sed 's/[A-Z]/\L&/g' |
Uppercasing text with sed
1 |
sed 's/[a-z]/\U&/g' |
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
sed is a common Linux/Unix utility used to parse and transform text. Below are examples of uppercasing and lowercasing text with sed: Uppercasing Text with sed
1 |
sed 's/[a-z]/\U&/g' |
[a-z] is the regular expression which will match lowercase letters. \U& is used to replace these lowercase letters with the uppercase version. Lowercasing Text with sed
1 |
sed 's/[A-Z]/\L&/g' |
[A-Z]