How to Keep Docker Containers Running

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

read more

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 Uppercase/Lowercase Text in Unix/Linux

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

Uppercasing text with tr

Lowercasing text with awk

Uppercasing text with awk

Lowercasing text with sed

Uppercasing text with sed

How to Uppercase/Lowercase text with sed

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

[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

[A-Z]

read more

Convert JSON to TSV with jq

jq is a lightweight JSON command line processor that makes many JSON processing tasks very easy. A common task when working with JSON is to convert records into a TSV (tab delimited) format. Below are examples of how to convert JSON to TSV with jq. Converting JSON to TSV In order to convert JSON to

read more

Convert JSON to CSV with jq

jq is a lightweight JSON command line processor that makes many JSON processing tasks very easy. A common task when working with JSON is to convert records into a CSV format. Below are examples of how to convert JSON to CSV with jq. Converting JSON to CSV In order to convert JSON to CSV with

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

Pushing Tags to a Remote Repository in Git

Tags in Git are a way to bookmark specific commits. This is often done to indicate different versions or releases of a project. When pushing to a remote repository tags are not included by default. To push a tag to the remote repository use: git push origin <tag name> To push all local tags to

read more