hadoop

by pfisterer

Helm chartv1.3.0App 3.4.1Apache-2.0

The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models.

About this chart

Hadoop Chart

This chart is modified from stable/hadoop and mgit-at/helm-hadoop-3 and has been updated to:

  • run use multi-architecture Docker image and
  • use the currently latest version of Hadoop.

This chart is primarily intended to be used for YARN and MapReduce job execution where HDFS is just used as a means to transport small artifacts within the framework and not for a distributed filesystem. Data should be read from cloud based datastores such as Google Cloud Storage, S3 or Swift.

Chart Details

Installing the Chart

To install the chart with the release name hadoop:

helm helm repo add pfisterer-hadoop https://pfisterer.github.io/apache-hadoop-helm/
helm install --name hadoop pfisterer-hadoop/hadoop

Configuration

The following table lists the configurable parameters of the Hadoop chart and their default values.

ParameterDescriptionDefault
image.repositoryHadoop imagefarberg/apache-hadoop
image.tagHadoop image tag3.4.1
imagee.pullPolicyPull policy for the imagesIfNotPresent
hadoopVersionVersion of hadoop libraries being used3.4.1
antiAffinityPod antiaffinity, hard or softhard
hdfs.nameNode.pdbMinAvailablePDB for HDFS NameNode1
hdfs.nameNode.resourcesresources for the HDFS NameNoderequests:memory=256Mi,cpu=10m,limits:memory=2048Mi,cpu=1000m
hdfs.dataNode.replicasNumber of HDFS DataNode replicas1
hdfs.dataNode.pdbMinAvailablePDB for HDFS DataNode1
hdfs.dataNode.resourcesresources for the HDFS DataNoderequests:memory=256Mi,cpu=10m,limits:memory=2048Mi,cpu=1000m
hdfs.webhdfs.enabledEnable WebHDFS REST APItrue
yarn.resourceManager.pdbMinAvailablePDB for the YARN ResourceManager1
yarn.resourceManager.resourcesresources for the YARN ResourceManagerrequests:memory=256Mi,cpu=10m,limits:memory=2048Mi,cpu=1000m
yarn.nodeManager.pdbMinAvailablePDB for the YARN NodeManager1
yarn.nodeManager.replicasNumber of YARN NodeManager replicas1
yarn.nodeManager.parallelCreateCreate all nodeManager statefulset pods in parallel (K8S 1.7+)false
yarn.nodeManager.resourcesResource limits and requests for YARN NodeManager podsrequests:memory=2048Mi,cpu=1000m,limits:memory=2048Mi,cpu=1000m
persistence.nameNode.enabledEnable/disable persistent volumefalse
persistence.nameNode.storageClassName of the StorageClass to use per your volume provider-
persistence.nameNode.accessModeAccess mode for the volumeReadWriteOnce
persistence.nameNode.sizeSize of the volume50Gi
persistence.dataNode.enabledEnable/disable persistent volumefalse
persistence.dataNode.storageClassName of the StorageClass to use per your volume provider-
persistence.dataNode.accessModeAccess mode for the volumeReadWriteOnce
persistence.dataNode.sizeSize of the volume200Gi

Customized Hadoop Base Docker Image

This image is modified from comcast/kube-yarn and mgit-at/helm-hadoop-3. Currently, native libraries are not been included.

Build and Push the Docker Image

# Set version
export HADOOP_VERSION=3.4.1

# Build
docker buildx build --push --platform "linux/arm64,linux/amd64" -t farberg/apache-hadoop:latest -t farberg/apache-hadoop:$HADOOP_VERSION .

Testing with minikube

If you are running locally with minikube and want to try your images without pushing them to a registry, build the images on the minikube VM first:

eval $(minikube docker-env)
# use the build command from above

Development

Help is always appreciated. Please create pull requests.

Open Issues

  • Include native libraries
  • List of ports needs to be updated (cf. https://www.oreilly.com/library/view/big-data-analytics/9781788628846/5c5821cc-4a3d-498a-a3eb-23256cd79c8b.xhtml)

Upload a new version of the chart

helm lint
helm package .
mv hadoop*.tgz docs/
helm repo index docs/ --url https://pfisterer.github.io/apache-hadoop-helm/
git add docs/
git commit -a -m "Updated helm repository"
git push origin master

Changes

Version 1.3.0

  • Update to Apache Hadoop 3.4.1

Version 1.2.0

  • Initial release of this chart
  • Use multi-architecture base image
  • Apache Hadoop 3.3.2

Deploy hadoop with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hadoop on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthadoop is pinned at v1.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply