Discovery

The Stackable Operator for Apache HDFS publishes a discovery ConfigMap, which exposes a client configuration bundle that allows access to the Apache HDFS cluster.

Example

Given the following HDFS cluster:

apiVersion: hdfs.stackable.tech/v1alpha1
kind: HdfsCluster
metadata:
  name: {clusterName} (1)
  namespace: {namespace} (2)
spec:
  namenode:
    roleGroups:
      default: (3)
  […​]
1 The name of the HDFS cluster, which is also the name of the created discovery ConfigMap.
2 The namespace of the discovery ConfigMap.
3 A role group name of the namenode role.

The resulting discovery ConfigMap is located at {namespace}/{clusterName}.

Contents

The ConfigMap data values are formatted as Hadoop XML files which allows simple mounting of that ConfigMap into pods that require access to HDFS.

core-site.xml

Contains the fs.DefaultFS which defaults to hdfs://{clusterName}/.

hdfs-site.xml

Contains the dfs.namenode.* properties for rpc and http addresses for the namenodes as well as the dfs.nameservices property which defaults to hdfs://{clusterName}/.