Provides common utility functions
Function to populate nodeinfo
Please call this method at start of node bootstrap
- populate_nodeinfo()
- is_hadoop2_cluster()
- is_hs2_enabled()
- is_hs2_cluster()
- is_master_node()
- is_worker_node()
Function to populate nodeinfo
Please call this method at start of node bootstrap
populate_nodeinfo
Function has no arguments.
Function to check if the node belongs to a Hadoop2 cluster
if is_hadoop2_cluster; then
# do something here
fi
Function has no arguments.
- 0: If the cluster runs hadoop2
- 1: Otherwise
Function to check if a HiveServer2 is configured to run on a master node
if is_hs2_enabled; then
# do something here
fi
Function has no arguments.
- 0: When HiveServer2 is configured on a master node
- 1: Otherwise
Function to check if a node belongs to a HiveServer2 cluster
if is_hs2_cluster; then
# do something here
fi
Function has no arguments.
- 0: When node belongs to a HiveServer2 cluster
- 1: Otherwise
Function to check if a node is a cluster master node
if is_master_node; then
# do something here
fi
Function has no arguments.
- 0: When node is a cluster master node
- 1: Otherwise
Function to check if a node is a cluster worker node
if is_worker_node; then
# do something here
fi
Function has no arguments.
- 0: When node is a cluster worker node
- 1: Otherwise