-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathzone-cdh.conf
More file actions
39 lines (32 loc) · 1.89 KB
/
zone-cdh.conf
File metadata and controls
39 lines (32 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
: ${default_port_offset:=0}
: ${NAME_NODE_PROXY_HOSTNAME:=$DOCKER_HOSTNAME}
: ${FUSION_NAME_NODE_PROXY_PORT:=$(expr 8890 + $default_port_offset)}
: ${FUSION_LIVEHIVE_PROXY_PORT:=$(expr 9083 + $default_port_offset)}
validate_cdh_version() {
version="$1"
case "$version" in
5.11.0) return 0;;
5.12.0) return 0;;
5.13.0) return 0;;
5.14.0) return 0;;
5.15.0) return 0;;
5.16.0) return 0;;
6.0.0) return 0;;
6.1.0) return 0;;
6.2.0) return 0;;
esac
echo "Supported versions are: 5.11.0, 5.12.0, 5.13.0, 5.14.0, 5.15.0, 5.16.0, 6.0.0, 6.1.0, 6.2.0"
return 1
}
update_var NAME_NODE_PROXY_HOSTNAME "Enter the NameNode Proxy hostname for $ZONE_NAME" "${HOSTNAME:-fusion-nn-proxy.example.com}" validate_hostname
save_var FUSION_NAME_NODE_PROXY_PORT "$(expr 8890 + $default_port_offset)" "${SAVE_ENV}"
validate_cdh_version "$CDH_VERSION"
update_var CDH_VERSION "Enter the CDH version for $ZONE_NAME" "" validate_cdh_version
update_var NAME_NODE_PROXY_HOSTNAME "Enter the NameNode Proxy hostname for $ZONE_NAME" "fusion-nn-proxy.example.com}" validate_hostname
update_var FUSION_NAME_NODE_PROXY_PORT "Enter the NameNode Proxy port for $ZONE_NAME" "$(expr 8890 + $default_port_offset)" validate_number
update_var HADOOP_NAME_NODE_HOSTNAME "Enter the Hadoop NameNode IP or hostname for $ZONE_NAME" "namenode.example.com" validate_hostname
update_var HADOOP_NAME_NODE_PORT "Enter the NameNode port for $ZONE_NAME" "8020" validate_number
update_var FUSION_UNDERLYING_FS "Enter the the value to be used as the underlying FS. For NameNodes in an HA configurations this may be a service name, otherwise use the deafult." "$HADOOP_NAME_NODE_HOSTNAME:$HADOOP_NAME_NODE_PORT"
update_var FUSION_NAME_NODE_SERVICE_NAME "Enter the NameNode Service Name for $ZONE_NAME (used for defaultFS)" "$NAME_NODE_PROXY_HOSTNAME:$FUSION_NAME_NODE_PROXY_PORT"
save_var PLATFORM "cdh-${CDH_VERSION}" "$SAVE_ENV"