hadoop

by joaquinito2051

Helm chartv1.1.0App 2.9.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

Hadoop is a framework for running large scale distributed applications.

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 that utilizes 50% of the available node resources:

$ helm install --name hadoop $(<helm-repo>/hadoop/tools/calc_resources.sh 50) <helm-repo>/hadoop

$ helm install --name hadoop $(stable/hadoop/tools/calc_resources.sh 50) stable/hadoop

Note that you need at least 2GB of free memory per NodeManager pod, if your cluster isn't large enough, not all pods will be scheduled.

The optional calc_resources.sh script is used as a convenience helper to set the yarn.numNodes, and yarn.nodeManager.resources appropriately to utilize all nodes in the Kubernetes cluster and a given percentage of their resources. For example, with a 3 node n1-standard-4 GKE cluster and an argument of 50, this would create 3 NodeManager pods claiming 2 cores and 7.5Gi of memory.

Persistence

To install the chart with persistent volumes:

$ helm install --name hadoop $(<helm-repo>/hadoop/tools/calc_resources.sh 50) \
  --set persistence.nameNode.enabled=true \
  --set persistence.nameNode.storageClass=standard \
$ helm install --name hadoop $(stable/hadoop/tools/calc_resources.sh 50) \
  --set persistence.dataNode.enabled=true \
  --set persistence.dataNode.storageClass=standard \
  stable/hadoop

Change the value of storageClass to match your volume driver. standard works for Google Container Engine clusters.

Configuration

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

ParameterDescriptionDefault
image.repositoryHadoop image (source)danisla/hadoop
image.tagHadoop image tag2.9.0
imagee.pullPolicyPull policy for the imagesIfNotPresent
hadoopVersionVersion of hadoop libraries being used2.9.0
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
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 replicas2
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

Related charts

The Zeppelin Notebook chart can use the hadoop config for the hadoop cluster and use the YARN executor:

helm install --set hadoop.useConfigMap=true <helm-repo>/zeppelin

helm install --set hadoop.useConfigMap=true stable/zeppelin

References

  • Original K8S Hadoop adaptation this chart was derived from: https://github.com/Comcast/kube-yarn

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.1.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