UP连接HIVE
1. 创建hadoop临时配额
hdfs dfs -mkdir -p /tmp/gbase8up
hdfs dfsadmin -setSpaceQuota 10G /tmp/gbase8up
hdfs dfs -count -q /tmp/gbase8up
hdfs dfs -mkdir -p /user/hive/warehouse
hdfs dfsadmin -setSpaceQuota 10G /user/hive/warehouse
hdfs dfs -count -q /user/hive/warehouse
hdfs dfs -chmod 777 /tmp/gbase8up
hdfs dfs -chmod 777 /user/hive/warehouse
2.修改配置文件
[hive]
# According to the realistic environment to modify those configuration as follows.
# Hiveserver2's IP.
hive_server_name=172.16.195.21
hive_server_port=10000
hive_hdfs_user_name=hdfs
#user of hive server
hive_user_name=hdfs
hive_user_password=hdfs
hive_auth_type=PLAIN
hive_auth_mechanism="PLAIN"
# auto mode :0 nosasl;1 sasl NONE;
hive_auth_mode=1
#hive thrift version , 8 => 2.2; 7 => 1.2 ~2.0 ; 6 => ver < 1.2
hive_thrift_client_version=8
#timeout connect hive thift server (minute)
hive_thrift_timeout=60
# HA zookeeper connect
hive_zookeeper_host=172.16.195.20:2181,172.16.195.21:2181,172.16.195.22:2181
# HA namenode
hive_hdfs_cluster_name=
# The NameNode's IP.
hive_hdfs_server_name=172.16.195.20
# The port of HDFS server.
hive_hdfs_server_port=8020
# Tha HBase Master's IP
hive_hbase_server_name=172.16.195.22
# Which table to store Blob data.
hive_hbase_table_name=HbaseStream
# The local directory to store BlobCache.
hive_blob_cache_path=/opt/gcluster/userdata/blob_cache
# Which directory to store Blob data.
hive_hdfs_blob_path=/blobstorage
# When data exchange,the minmum hdfs space must be >1G.Default is 10G,units values is in bytes.
hive_hdfs_tmpspace_limit=10G
# When the data exchange,the minmum hive space must be 1G-100G.Default is 10G,units values is in bytes.
hive_space_limit=10G
# When the data exchange,the minmum of gnode space must be >1G.Default is 10G,units values is in bytes.
hive_gcluster_space_limit=10G
# The maximum of connections range 1-64,default 5.
hive_max_connections=5
# The number of connection in pool error,range 0-64,default 3.
hive_max_connections_in_pool=2
# The number of retry when get connection error,range 1-10,default 5.
hive_max_try_connect_times=5
# The Column Family name of table which to store Blob data.
hive_hbase_col_family_name=file
# The port of HBase server.
hive_hbase_server_port=9090
# The maximum of connections to HBase is range 1-46,default 5.
hive_hbase_max_connections=5
# The maximum length of single blob data,range 2M-16M,default 16M,units values is in bytes.
# If the length of blob data exceed 16M,it will be stored to HDFS.
hive_blob_max_size_in_hbase=16M
# The maximum length of single blob data stored to HDFS,range 1G-16G,default 16G,units values is in bytes.
hive_blob_max_size_in_hdfs=16G
# The maximum space of BlobCache cached in the local disk,range 1G-16G,default 8G,units values is in bytes.
hive_blob_cache_space_limit=8G
# range: 0 or 1
# 0: Will send the blob data stored by HDFS to client.
# 1: First,get the uri from 8a mpp.Then,get the blob data by uri.Finally,send the blob data to client.
hive_blob_send_from_uri=1
3.重启服务
使用 gbase用户: gcluster_services all restart
install plugin HIVE soname 'ha_hive.so'; 加载引擎
评论
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526