Add Hue support to Cloudera plugin

implements bp: cdh-hue-support

Change-Id: I995343bda2eaecd1772f7b1b83a93ae8e23bd422
This commit is contained in:
Sergey Reshetnyak 2014-10-16 17:43:00 +04:00
parent 8c79c36106
commit 457267a97a
9 changed files with 544 additions and 1 deletions

View File

@ -34,6 +34,7 @@ HDFS_SERVICE_NAME = 'hdfs01'
YARN_SERVICE_NAME = 'yarn01'
OOZIE_SERVICE_NAME = 'oozie01'
HIVE_SERVICE_NAME = 'hive01'
HUE_SERVICE_NAME = 'hue01'
def have_cm_api_libs():
@ -96,6 +97,8 @@ def get_service(process, cluster=None, instance=None):
return cm_cluster.get_service(OOZIE_SERVICE_NAME)
elif process in ['HIVESERVER2', 'HIVEMETASTORE', 'WEBHCAT']:
return cm_cluster.get_service(HIVE_SERVICE_NAME)
elif process in ['HUE_SERVER']:
return cm_cluster.get_service(HUE_SERVICE_NAME)
else:
raise ValueError(
_("Process %(process)s is not supported by CDH plugin") %

View File

@ -95,6 +95,8 @@ hive_service_confs = _load_json(path_to_config + 'hive-service.json')
hive_metastore_confs = _load_json(path_to_config + 'hive-metastore.json')
hive_hiveserver_confs = _load_json(path_to_config + 'hive-hiveserver2.json')
hive_webhcat_confs = _load_json(path_to_config + 'hive-webhcat.json')
hue_service_confs = _load_json(path_to_config + 'hue-service.json')
hue_role_confs = _load_json(path_to_config + 'hue-hue.json')
priority_one_confs = _load_json(path_to_config + 'priority-one-confs.json')
@ -134,6 +136,8 @@ def _get_ng_plugin_configs():
cfg += _init_configs(hive_metastore_confs, 'HIVEMETASTORE', 'node')
cfg += _init_configs(hive_hiveserver_confs, 'HIVESERVER', 'node')
cfg += _init_configs(hive_webhcat_confs, 'WEBHCAT', 'node')
cfg += _init_configs(hue_service_confs, 'HUE', 'cluster')
cfg += _init_configs(hue_role_confs, 'HUE', 'node')
return cfg

View File

@ -40,6 +40,7 @@ HDFS_SERVICE_TYPE = 'HDFS'
YARN_SERVICE_TYPE = 'YARN'
OOZIE_SERVICE_TYPE = 'OOZIE'
HIVE_SERVICE_TYPE = 'HIVE'
HUE_SERVICE_TYPE = 'HUE'
PATH_TO_CORE_SITE_XML = '/etc/hadoop/conf/core-site.xml'
HADOOP_LIB_DIR = '/usr/lib/hadoop-mapreduce'
@ -58,6 +59,7 @@ PACKAGES = [
'hadoop-yarn-resourcemanager',
'hive-metastore',
'hive-server2',
'hue',
'oozie',
'oracle-j2sdk1.7',
]
@ -90,6 +92,10 @@ def _get_configs(service, cluster=None, node_group=None):
},
'YARN': {
'hdfs_service': cu.HDFS_SERVICE_NAME
},
'HUE': {
'hive_service': cu.HIVE_SERVICE_NAME,
'oozie_service': cu.OOZIE_SERVICE_NAME
}
}
@ -128,7 +134,14 @@ def _get_configs(service, cluster=None, node_group=None):
'mapreduce_yarn_service': cu.YARN_SERVICE_NAME
}
}
hue_confs = {
'HUE': {
'hue_webhdfs': cu.get_role_name(pu.get_namenode(cluster),
'NAMENODE')
}
}
all_confs = _merge_dicts(all_confs, hue_confs)
all_confs = _merge_dicts(all_confs, hive_confs)
all_confs = _merge_dicts(all_confs, cluster.cluster_configs)
@ -329,6 +342,8 @@ def _create_services(cluster):
cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
if pu.get_hive_metastore(cluster):
cm_cluster.create_service(cu.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
if pu.get_hue(cluster):
cm_cluster.create_service(cu.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
def _configure_services(cluster):
@ -347,6 +362,10 @@ def _configure_services(cluster):
hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
hive.update_config(_get_configs(HIVE_SERVICE_TYPE, cluster=cluster))
if pu.get_hue(cluster):
hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
hue.update_config(_get_configs(HUE_SERVICE_TYPE, cluster=cluster))
def _configure_instances(instances):
for inst in instances:
@ -428,3 +447,7 @@ def start_cluster(cluster):
cu.create_hive_metastore_db(hive)
cu.create_hive_dirs(hive)
cu.start_service(hive)
if pu.get_hue(cluster):
hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
cu.start_service(hue)

View File

@ -53,7 +53,8 @@ class CDHPluginProvider(p.ProvisioningPluginBase):
"HIVE": [],
"HIVESERVER": ['HIVESERVER2'],
"HIVEMETASTORE": ['HIVEMETASTORE'],
"WEBHCAT": ['WEBHCAT']
"WEBHCAT": ['WEBHCAT'],
"HUE": ['HUE_SERVER']
}
def get_configs(self, hadoop_version):

View File

@ -29,6 +29,7 @@ hdfs_service_name = 'hdfs01'
yarn_service_name = 'yarn01'
oozie_service_name = 'oozie01'
hive_service_name = 'hive01'
hue_service_name = 'hue01'
def get_cm_api():
@ -90,5 +91,9 @@ def main():
hive = cluster.get_service(hive_service_name)
process_service(hive, 'hive')
hue = cluster.get_service(hue_service_name)
process_service(hue, 'hue')
if __name__ == '__main__':
main()

View File

@ -0,0 +1,158 @@
[
{
"desc": "The health test thresholds for monitoring of free space on the filesystem that contains this role's log directory. Specified as a percentage of the capacity on that filesystem. This setting is not used if a Log Directory Free Space Monitoring Absolute Thresholds setting is configured.",
"display_name": "Log Directory Free Space Monitoring Percentage Thresholds",
"name": "log_directory_free_space_percentage_thresholds",
"value": "{\"critical\":\"never\",\"warning\":\"never\"}"
},
{
"desc": "The health test thresholds of the number of file descriptors used. Specified as a percentage of file descriptor limit.",
"display_name": "File Descriptor Monitoring Thresholds",
"name": "hue_server_fd_thresholds",
"value": "{\"critical\":\"70.0\",\"warning\":\"50.0\"}"
},
{
"desc": "Enable HTTPS for the Hue web server.",
"display_name": "Enable HTTPS",
"name": "ssl_enable",
"value": "false"
},
{
"desc": "Path to the SSL private key on the host running the Hue web server. This file must be readable by the Hue system user. Hue only supports a key without a passphrase.",
"display_name": "Local Path to SSL Private Key",
"name": "ssl_private_key",
"value": null
},
{
"desc": "Directory where Hue Server will place its log files.",
"display_name": "Hue Server Log Directory",
"name": "hue_server_log_dir",
"value": "/var/log/hue"
},
{
"desc": "Timeout in seconds for Thrift calls to HiveServer2.",
"display_name": "HiveServer2 Connection Timeout",
"name": "hs2_conn_timeout",
"value": "120"
},
{
"desc": "When set, this role's process is automatically (and transparently) restarted in the event of an unexpected failure.",
"display_name": "Automatically Restart Process",
"name": "process_auto_restart",
"value": "false"
},
{
"desc": "<p>The configured triggers for this role. This is a JSON formatted list of triggers. These triggers are evaluated as part as the health system. Every trigger expression is parsed, and if the trigger condition is met, the list of actions provided in the trigger expression is executed.</p><p>Each trigger has all of the following fields:</p><ul><li><code>triggerName</code> <strong>(mandatory)</strong> - the name of the trigger. This value must be unique for the specific role. </li><li><code>triggerExpression</code> <strong>(mandatory)</strong> - a tsquery expression representing the trigger. </li><li><code>streamThreshold</code> <strong>(optional)</strong> - the maximum number of streams that can satisfy a condition of a trigger before the condition fires. By default set to 0, and any stream returned causes the condition to fire. </li><li><code>enabled</code> <strong> (optional)</strong> - by default set to 'true'. If set to 'false' the trigger will not be evaluated.</li></ul></p><p>For example, here is a JSON formatted trigger configured for a DataNode that fires if the DataNode has more than 1500 file-descriptors opened:</p><p><pre>[{\"triggerName\": \"sample-trigger\",\n \"triggerExpression\": \"IF (SELECT fd_open WHERE roleName=$ROLENAME and last(fd_open) > 1500) DO health:bad\",\n \"streamThreshold\": 0, \"enabled\": \"true\"}]</pre></p><p>Consult the trigger rules documentation for more details on how to write triggers using tsquery.</p><p>The JSON format is evolving and may change in the future and as a result backward compatibility is not guaranteed between releases at this time.</p>",
"display_name": "Role Triggers",
"name": "role_triggers",
"value": "[]"
},
{
"desc": "Soft memory limit to assign to this role, enforced by the Linux kernel. When the limit is reached, the kernel will reclaim pages charged to the process if and only if the host is facing memory pressure. If reclaiming fails, the kernel may kill the process. Both anonymous as well as page cache pages contribute to the limit. Use a value of -1 B to specify no limit. By default processes not managed by Cloudera Manager will have no limit.",
"display_name": "Cgroup Memory Soft Limit",
"name": "rm_memory_soft_limit",
"value": "-1"
},
{
"desc": "Location on HDFS where the jobsub examples and templates are stored.",
"display_name": "Jobsub Examples and Templates Directory",
"name": "hue_server_remote_data_dir",
"value": "/user/hue/jobsub"
},
{
"desc": "Hard memory limit to assign to this role, enforced by the Linux kernel. When the limit is reached, the kernel will reclaim pages charged to the process. If reclaiming fails, the kernel may kill the process. Both anonymous as well as page cache pages contribute to the limit. Use a value of -1 B to specify no limit. By default processes not managed by Cloudera Manager will have no limit.",
"display_name": "Cgroup Memory Hard Limit",
"name": "rm_memory_hard_limit",
"value": "-1"
},
{
"desc": "The period to review when computing unexpected exits.",
"display_name": "Unexpected Exits Monitoring Period",
"name": "unexpected_exits_window",
"value": "5"
},
{
"desc": "When computing the overall Hue Server health, consider the host's health.",
"display_name": "Hue Server Host Health Test",
"name": "hue_server_host_health_enabled",
"value": "true"
},
{
"desc": "Port to use to connect to the Hue server.",
"display_name": "Hue HTTP Port",
"name": "hue_http_port",
"value": "8888"
},
{
"desc": "The health test thresholds for monitoring of free space on the filesystem that contains this role's log directory.",
"display_name": "Log Directory Free Space Monitoring Absolute Thresholds",
"name": "log_directory_free_space_absolute_thresholds",
"value": "{\"critical\":\"5.36870912E9\",\"warning\":\"1.073741824E10\"}"
},
{
"desc": "For advanced use only, a string to be inserted into <strong>hue_safety_valve_server.ini</strong> for this role only.",
"display_name": "Hue Server Advanced Configuration Snippet (Safety Valve) for hue_safety_valve_server.ini",
"name": "hue_server_hue_safety_valve",
"value": null
},
{
"desc": "If configured, overrides the process soft and hard rlimits (also called ulimits) for file descriptors to the configured value.",
"display_name": "Maximum Process File Descriptors",
"name": "rlimit_fds",
"value": null
},
{
"desc": "When set, Cloudera Manager will send alerts when the health of this role reaches the threshold specified by the EventServer setting eventserver_health_events_alert_threshold",
"display_name": "Enable Health Alerts for this Role",
"name": "enable_alerts",
"value": "true"
},
{
"desc": "The health test thresholds for unexpected exits encountered within a recent period specified by the unexpected_exits_window configuration for the role.",
"display_name": "Unexpected Exits Thresholds",
"name": "unexpected_exits_thresholds",
"value": "{\"critical\":\"any\",\"warning\":\"never\"}"
},
{
"desc": "Path to the SSL certificate on the host running the Hue web server. This file must be readable by the Hue system user.",
"display_name": "Local Path to SSL Certificate",
"name": "ssl_certificate",
"value": null
},
{
"desc": "If enabled, the Hue server binds to the wildcard address (\"0.0.0.0\") for its ports.",
"display_name": "Bind Hue Server to Wildcard Address",
"name": "hue_server_bind_wildcard",
"value": "false"
},
{
"desc": "Enables the health test that the Hue Server's process state is consistent with the role configuration",
"display_name": "Hue Server Process Health Test",
"name": "hue_server_scm_health_enabled",
"value": "true"
},
{
"desc": "Weight for the read I/O requests issued by this role. The greater the weight, the higher the priority of the requests when the host experiences I/O contention. Must be between 100 and 1000. Defaults to 1000 for processes not managed by Cloudera Manager.",
"display_name": "Cgroup I/O Weight",
"name": "rm_io_weight",
"value": "500"
},
{
"desc": "Number of CPU shares to assign to this role. The greater the number of shares, the larger the share of the host's CPUs that will be given to this role when the host experiences CPU contention. Must be between 2 and 262144. Defaults to 1024 for processes not managed by Cloudera Manager.",
"display_name": "Cgroup CPU Shares",
"name": "rm_cpu_shares",
"value": "1024"
},
{
"desc": "When set, Cloudera Manager will send alerts when this entity's configuration changes.",
"display_name": "Enable Configuration Change Alerts",
"name": "enable_config_alerts",
"value": "false"
},
{
"desc": "Random string used for secure hashing in the session store.",
"display_name": "Secret Key",
"name": "secret_key",
"value": null
}
]

View File

@ -0,0 +1,332 @@
[
{
"desc": "Create users in Hue when they try to login with their LDAP credentials. For use when using LdapBackend for Hue authentication.",
"display_name": "Create LDAP users on login",
"name": "create_users_on_login",
"value": "true"
},
{
"desc": "Number of threads used by the Hue web server.",
"display_name": "Hue Web Server Threads",
"name": "cherrypy_server_threads",
"value": "10"
},
{
"desc": "Thrift server to use for HBase app.",
"display_name": "HBase Thrift Server",
"name": "hue_hbase_thrift",
"value": null
},
{
"desc": "Name of the Oozie service that this Hue service instance depends on",
"display_name": "Oozie Service",
"name": "oozie_service",
"value": null
},
{
"desc": "The distinguished name to use as a search base for finding users and groups.",
"display_name": "LDAP Search Base",
"name": "base_dn",
"value": null
},
{
"desc": "Comma-separated list of regular expressions, which match 'host:port' of requested proxy target.",
"display_name": "Whitelist",
"name": "whitelist",
"value": "(localhost|127\\.0\\.0\\.1):(50030|50070|50060|50075)"
},
{
"desc": "Name of the Sentry service that this Hue service instance depends on",
"display_name": "Sentry Service",
"name": "sentry_service",
"value": null
},
{
"desc": "Name of the HBase service that this Hue service instance depends on",
"display_name": "HBase Service",
"name": "hbase_service",
"value": null
},
{
"desc": "Base filter for searching for groups",
"display_name": "LDAP Group Filter",
"name": "group_filter",
"value": null
},
{
"desc": "Time zone name.",
"display_name": "Time Zone",
"name": "time_zone",
"value": "America/Los_Angeles"
},
{
"desc": "The health test thresholds of the overall Kerberos Ticket Renewer health. The check returns \"Concerning\" health if the percentage of \"Healthy\" Kerberos Ticket Renewers falls below the warning threshold. The check is unhealthy if the total percentage of \"Healthy\" and \"Concerning\" Kerberos Ticket Renewers falls below the critical threshold.",
"display_name": "Healthy Kerberos Ticket Renewer Monitoring Thresholds",
"name": "hue_kt_renewers_healthy_thresholds",
"value": "{\"critical\":\"51.0\",\"warning\":\"99.0\"}"
},
{
"desc": "The user that this service's processes should run as.",
"display_name": "System User",
"name": "process_username",
"value": "hue"
},
{
"desc": "The health test thresholds of the overall Hue Server health. The check returns \"Concerning\" health if the percentage of \"Healthy\" Hue Servers falls below the warning threshold. The check is unhealthy if the total percentage of \"Healthy\" and \"Concerning\" Hue Servers falls below the critical threshold.",
"display_name": "Healthy Hue Server Monitoring Thresholds",
"name": "hue_hue_servers_healthy_thresholds",
"value": "{\"critical\":\"51.0\",\"warning\":\"99.0\"}"
},
{
"desc": "When set, Cloudera Manager will send alerts when this entity's configuration changes.",
"display_name": "Enable Configuration Change Alerts",
"name": "enable_config_alerts",
"value": "false"
},
{
"desc": "The group name attribute in the LDAP schema.",
"display_name": "LDAP Group Name Attribute",
"name": "group_name_attr",
"value": null
},
{
"desc": "HDFS directory used for storing temporary files.",
"display_name": "HDFS Temporary Directory",
"name": "hdfs_tmp_dir",
"value": "/tmp"
},
{
"desc": "Name of the Solr service that this Hue service instance depends on",
"display_name": "Solr Service",
"name": "solr_service",
"value": null
},
{
"desc": "If the database is SQLite3, this is the filename of the database to use, and the directory of this file must be writable by the 'hue' user.",
"display_name": "Hue Database Directory",
"name": "database_dir",
"value": "/var/lib/hue/desktop.db"
},
{
"desc": "The name of a default group that users will be added to at creation time.",
"display_name": "Default User Group",
"name": "default_user_group",
"value": null
},
{
"desc": "When you enable anonymous usage data collection Hue tracks anonymised pages and application versions in order to gather information about each application's usage levels. The data collected does not include any hostnames or IDs. Data collection option is available on CDH 4.4 and later deployments.",
"display_name": "Enable Usage Data Collection",
"name": "usage_data_collection_enable",
"value": "true"
},
{
"desc": "Name of the ZooKeeper service that this Hue service instance depends on",
"display_name": "ZooKeeper Service",
"name": "zookeeper_service",
"value": null
},
{
"desc": "Distinguished name of the user to bind as -- not necessary if the LDAP server supports anonymous searches.",
"display_name": "LDAP Bind User",
"name": "bind_dn",
"value": null
},
{
"desc": "URL of LDAP Server",
"display_name": "LDAP URL",
"name": "ldap_url",
"value": null
},
{
"desc": "Whether to use StartTLS (as opposed to ldaps) to communicate securely with the LDAP server. This is only effective when the LDAP certificate is specified.",
"display_name": "Use StartTLS",
"name": "use_start_tls",
"value": "true"
},
{
"desc": "Name of the Sqoop service that this Hue service instance depends on",
"display_name": "Sqoop Service",
"name": "sqoop_service",
"value": null
},
{
"desc": "Active Directory Domain",
"display_name": "NT Domain",
"name": "nt_domain",
"value": null
},
{
"desc": "Class that defines extra accessor methods for user objects.",
"display_name": "User Augmentor",
"name": "user_augmentor",
"value": "desktop.auth.backend.DefaultUserAugmentor"
},
{
"desc": "File where the database gets dumped to or loaded from.",
"display_name": "Database Dump File",
"name": "database_dump_file",
"value": "/tmp/hue_database_dump.json"
},
{
"desc": "LDAP Username Pattern for use with non-Active Directory LDAP implementations. Must contain the special '&ltusername&gt' string for replacement during authentication.",
"display_name": "LDAP Username Pattern",
"name": "ldap_username_pattern",
"value": null
},
{
"desc": "The password of the bind user.",
"display_name": "LDAP Bind Password",
"name": "bind_password",
"value": null
},
{
"desc": "The group that this service's processes should run as.",
"display_name": "System Group",
"name": "process_groupname",
"value": "hue"
},
{
"desc": "LDAP certificate for authentication over TLS",
"display_name": "LDAP Certificate",
"name": "ldap_cert",
"value": null
},
{
"desc": "Type of database used for Hue",
"display_name": "Hue Database Type",
"name": "database_type",
"value": "sqlite3"
},
{
"desc": "When set, Cloudera Manager will send alerts when the health of this service reaches the threshold specified by the EventServer setting eventserver_health_events_alert_threshold",
"display_name": "Enable Service Level Health Alerts",
"name": "enable_alerts",
"value": "true"
},
{
"desc": "When computing the overall HUE health, consider Beeswax Server's health",
"display_name": "Beeswax Server Role Health Test",
"name": "hue_beeswax_server_health_enabled",
"value": "true"
},
{
"desc": "HTTPFS role or Namenode (if webhdfs is enabled) that hue can use to communicate with HDFS.",
"display_name": "HDFS Web Interface Role",
"name": "hue_webhdfs",
"value": null
},
{
"desc": "Mode of authenticating login credentials. Select desktop.auth.backend.LdapBackend to use LDAP to authenticate login credentials. LDAP requires you to also set the LDAP URL, NT Domain, and optionally LDAP certificate if you are using secure LDAP. Select desktop.auth.backend.PamBackend to use PAM to authenticate login credentials.",
"display_name": "Authentication Backend",
"name": "auth_backend",
"value": "desktop.auth.backend.AllowFirstUserDjangoBackend"
},
{
"desc": "<p>The configured triggers for this service. This is a JSON formatted list of triggers. These triggers are evaluated as part as the health system. Every trigger expression is parsed, and if the trigger condition is met, the list of actions provided in the trigger expression is executed.</p><p>Each trigger has all of the following fields:</p><ul><li><code>triggerName</code> <strong>(mandatory)</strong> - the name of the trigger. This value must be unique for the specific service. </li><li><code>triggerExpression</code> <strong>(mandatory)</strong> - a tsquery expression representing the trigger. </li><li><code>streamThreshold</code> <strong>(optional)</strong> - the maximum number of streams that can satisfy a condition of a trigger before the condition fires. By default set to 0, and any stream returned causes the condition to fire. </li><li><code>enabled</code> <strong> (optional)</strong> - by default set to 'true'. If set to 'false' the trigger will not be evaluated.</li></ul></p><p>For example, here is a JSON formatted trigger that fires if there are more than 10 DataNodes with more than 500 file-descriptors opened:</p><p><pre>[{\"triggerName\": \"sample-trigger\",\n \"triggerExpression\": \"IF (SELECT fd_open WHERE roleType = DataNode and last(fd_open) > 500) DO health:bad\",\n \"streamThreshold\": 10, \"enabled\": \"true\"}]</pre></p><p>Consult the trigger rules documentation for more details on how to write triggers using tsquery.</p><p>The JSON format is evolving and may change in the future and as a result backward compatibility is not guaranteed between releases at this time.</p>",
"display_name": "Service Triggers",
"name": "service_triggers",
"value": "[]"
},
{
"desc": "The username to use to log into the Hue database. Not necessary for SQLite3.",
"display_name": "Hue Database Username",
"name": "database_user",
"value": "hue"
},
{
"desc": "Comma-separated list of regular expressions, which match any prefix of 'host:port/path' of requested proxy target. This does not support matching GET parameters.",
"display_name": "Blacklist",
"name": "blacklist",
"value": "()"
},
{
"desc": "For advanced use only, a string to be inserted into <strong>sentry-site.xml</strong>. Applies to configurations of all roles in this service except client configuration.",
"display_name": "Hue Service Advanced Configuration Snippet (Safety Valve) for sentry-site.xml",
"name": "hue_sentry_safety_valve",
"value": null
},
{
"desc": "For advanced use only, key-value pairs (one on each line) to be inserted into a role's environment. Applies to configurations of all roles in this service except client configuration.",
"display_name": "Hue Service Environment Advanced Configuration Snippet (Safety Valve)",
"name": "hue_service_env_safety_valve",
"value": null
},
{
"desc": "Name of the Impala service that this Hue service instance depends on",
"display_name": "Impala Service",
"name": "impala_service",
"value": null
},
{
"desc": "Name of Hue database.",
"display_name": "Hue Database Name",
"name": "database_name",
"value": "hue"
},
{
"desc": "The attribute of the group object which identifies the members of the group.",
"display_name": "LDAP Group Membership Attribute",
"name": "group_member_attr",
"value": null
},
{
"desc": "Name of the Hive service that this Hue service instance depends on",
"display_name": "Hive Service",
"name": "hive_service",
"value": null
},
{
"desc": "The username attribute in the LDAP schema.",
"display_name": "LDAP Username Attribute",
"name": "user_name_attr",
"value": null
},
{
"desc": "Default encoding for site data.",
"display_name": "Default Site Encoding",
"name": "default_site_encoding",
"value": "utf"
},
{
"desc": "Search Bind Authentication connects to the LDAP server using credentials provided in the 'bind_dn' and 'bind_password' configurations. If these configurations are not set, then an anonymous search is performed.",
"display_name": "Use Search Bind Authentication",
"name": "search_bind_authentication",
"value": "false"
},
{
"desc": "For advanced use only, a string to be inserted into <strong>hue_safety_valve.ini</strong>. Applies to configurations of all roles in this service except client configuration.",
"display_name": "Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini",
"name": "hue_service_safety_valve",
"value": null
},
{
"desc": "Port on host where the Hue database is running. Not necessary for SQLite3.",
"display_name": "Hue Database Port",
"name": "database_port",
"value": "3306"
},
{
"desc": "Password for Hue database. Not necessary for SQLite3.",
"display_name": "Hue Database Password",
"name": "database_password",
"value": ""
},
{
"desc": "Base filter for searching for users.",
"display_name": "LDAP User Filter",
"name": "user_filter",
"value": null
},
{
"desc": "For advanced use only, a list of derived configuration properties that will be used by the Service Monitor instead of the default ones.",
"display_name": "Service Monitor Derived Configs Advanced Configuration Snippet (Safety Valve)",
"name": "smon_derived_configs_safety_valve",
"value": null
},
{
"desc": "Name of host where the Hue database is running. Not necessary for SQLite3.",
"display_name": "Hue Database Hostname",
"name": "database_host",
"value": "localhost"
}
]

View File

@ -50,3 +50,7 @@ def get_historyserver(cluster):
def get_hive_metastore(cluster):
return u.get_instance(cluster, 'HIVEMETASTORE')
def get_hue(cluster):
return u.get_instance(cluster, 'HUE_SERVER')

View File

@ -103,6 +103,19 @@ def validate_cluster_creating(cluster):
raise ex.RequiredServiceMissingException(
'HIVEMETASTORE', required_by='WEBHCAT')
hue_count = _get_inst_count(cluster, 'HUE_SERVER')
if hue_count not in [0, 1]:
raise ex.InvalidComponentCountException('HUE_SERVER', '0 or 1',
hue_count)
if oo_count < 1 and hue_count:
raise ex.RequiredServiceMissingException(
'OOZIE_SERVER', required_by='HUE_SERVER')
if hms_count < 1 and hue_count:
raise ex.RequiredServiceMissingException(
'HIVEMETASTORE', required_by='HUE_SERVER')
def validate_additional_ng_scaling(cluster, additional):
rm = cu.get_resourcemanager(cluster)