ZooKeeper for Beginners (2): Programming with the ZooKeeper API
Last post got ZooKeeper installed. The command line works, but most of the time you operate ZooKeeper through API calls, so this post covers the basic beginner-level operations.
219 posts
Last post got ZooKeeper installed. The command line works, but most of the time you operate ZooKeeper through API calls, so this post covers the basic beginner-level operations.

ZooKeeper is a distributed, open-source coordination service for distributed applications, an open-source implementation of Google's Chubby, and a key component of Hadoop and HBase. It accepts watchers' registrations and notifies them when data changes — think of it as ZooKeeper = filesystem + notification mechanism.

The previous tutorial introduced how MapReduce executes and sketched out InputFormat. Now it's time to talk about Shuffle. The data processing that happens after the Map method and before the Reduce method is called Shuffle.

In the previous post we got hands-on with MapReduce by writing some code. The MapReduce workflow looks roughly like this.

Last session we went through using MapReduce from code, where we met Writable classes for the first time. This section covers roughly what they're for.

Last post gave us a general idea of what MapReduce is. In this one we'll implement WordCount in code and get a feel for how MapReduce actually works.

Earlier posts introduced HDFS. Now let's dip into the other core Hadoop component: MapReduce.

On March 18, 2021, GitLab — the world's second-largest open source software company — announced that JiHu Information Technology (Hubei) Co., Ltd. has officially registered in Wuhan, China.

Last post covered HDFS broadly. From this section on we'll drive Hadoop by writing code, so first we need a local Hadoop development environment. If you followed the earlier posts and got Hadoop running in a VM, setting it up locally is a walk in the park. If you haven't — or haven't read those posts — read them first.

When a DataNode starts it registers itself with the NameNode and periodically (every hour) reports all of its block information. It also exchanges heartbeats with the NameNode every 3 seconds, and those heartbeats carry commands for the DataNode. If no heartbeat arrives for over 10 minutes, the node is considered unavailable.
