# Configuration for HDFS NameNode # ------------------------------------------------------------------------ [[hdfs_clusters]] # HA support by using HttpFs
配置hdfs [[[default]]] # Enter the filesystem uri fs_defaultfs=hdfs://hadoop:8020
# NameNode logical name. ## logical_name=
# Use WebHdfs/HttpFs as the communication mechanism. # Domain should be the NameNode or HttpFs host. # Default port is 14000 for HttpFs. webhdfs_url=http://hadoop:50070/webhdfs/v1
# Change this if your HDFS cluster is Kerberos-secured ## security_enabled=false
# In secure mode (HTTPS), if SSL certificates from YARN Rest APIs # have to be verified against certificate authority ## ssl_cert_ca_verify=True
# Directory of the Hadoop configuration ## hadoop_conf_dir=$HADOOP_CONF_DIR when set or '/etc/hadoop/conf'
# Configuration for YARN (MR2) # ------------------------------------------------------------------------ [[yarn_clusters]]
配置yarn [[[default]]] # Enter the host on which you are running the ResourceManager resourcemanager_host=hadoop
# The port where the ResourceManager IPC listens on resourcemanager_port=8032 #参考yarn-site.xml中的yarn.resourcemanager.address.rm1 # Whether to submit jobs to this cluster submit_to=True
# Resource Manager logical name (required for HA) ## logical_name=
# Change this if your YARN cluster is Kerberos-secured ## security_enabled=false
# URL of the ResourceManager API resourcemanager_api_url=http://hadoop:8088
# URL of the ProxyServer API proxy_api_url=http://hadoop:8088
# URL of the HistoryServer API #参考mapred-site.xml中的mapreduce.jobhistory.webapp.address history_server_api_url=http://hadoop:19888
# In secure mode (HTTPS), if SSL certificates from YARN Rest APIs # have to be verified against certificate authority ## ssl_cert_ca_verify=True
[beeswax]
配置hive # Host where HiveServer2 is running. # If Kerberos security is enabled, use fully-qualified domain name (FQDN). hive_server_host=hadoop
# Port where HiveServer2 Thrift server runs on. hive_server_port=10000
配置MySQL # mysql, oracle, or postgresql configuration. ## [[[mysql]]] # Name to show in the UI. nice_name="My SQL DB"
# For MySQL and PostgreSQL, name is the name of the database. # For Oracle, Name is instance of the Oracle server. For express edition # this is 'xe' by default. name=mysqldb
# Database backend to use. This can be: # 1. mysql # 2. postgresql # 3. oracle engine=mysql
# IP or hostname of the database to connect to. host=hadoop
# Port the database server is listening to. Defaults are: # 1. MySQL: 3306 # 2. PostgreSQL: 5432 # 3. Oracle Express Edition: 1521 port=3306
# Username to authenticate with when connecting to the database. user=root
# Password matching the username to authenticate with when # connecting to the database. password=root
7、Hive环境变量的添加
(hiveserver2,使用Mysql作为独立的元数据库)
hive-site.xml
1 2 3 4 5 6 7 8 9 10 11
<property> <name>hive.metastore.uris</name> <value>thrift://192.168.232.8:9083</value> <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description> </property>
<property> <name>hive.server2.thrift.bind.host</name> <value>192.168.232.8</value> <description>Bind host on which to run the HiveServer2 Thrift service.</description> </property>