- Install hive
1. download hive-0.12.0.bin.tar.gz
2.#tar -xzvf hive-0.12.0.bin.tar.gz
3.add the bin dir to PATH in ~/.bashrc
4.#source ~/.bashrc
The dir structure of hive-0.12.0.bin likes the following:
lib/ : contains JARs., which implement a particular subset of Hive's functionality.
bin/: contains executable scripts that launch various Hive service, including the hive command-line interface(CLI)
hcatalog/: metastore service related procedures.
conf/: configuration files
examples/: some example script
Thrift service provides remote access from other processes.
Hive uses a built-in Derby SQL server, which provides limited, single-process metadata storage.
start hive
#hive //start hive CLI
#hive --help
The list of hive service is :
you can start a service using command like
#hive --service service-name
#hive //default run CLI service
look for help for CLI
#hive --help --service cli
- Variables and Properties
In CLI, set and display variables and properties using set
#hive --define foo=bar
#hive
hive> set foo;
hive>set;
hive>set -v;
hive>set env:HOME;
hive>set foo=xbar;
- Basic commands
#hive --hiveconf hive.cli.print.current.db=true
#hive -e "select * from mytable limit 3";
#hive -S -e "select * from mytable limit 3" > /tmp/myquery;
execute hql script
#hive -f /path/to/withqueries.hql
or
hive> source /path/to/withqueries.hql
shell execution
hive> ! shell-commands;
hive> ! pwd;
note: Don't invoke interactive commands that require user input. shell 'pipes' don't work and neither do file 'globs'.
Hadoop dfs commands from inside hive
hive> dfs -ls /;
hive> dfs -help;
Comments in Hive Scripts
--the is a comment line
Query Column Headers
hive>set hive.cli.print.header=true;
Start Hive Server
#hive --service hiveserver & //run hiveserver in daemon mode
or start hiveserver2
#hiveserver2
#netstat -nl |grep 10000 //check whether the server is running
References:
https://cwiki.apache.org/confluence/display/Hive/Home
相关推荐
hive 开发UDF 使用maven工程 引发jar包缺失 hive 开发UDF 使用maven工程 引发jar包缺失
Hive 事务设计
hive3.1.2编译后的驱动包
This book is your go-to resource for using Hive: authors Scott Shaw, Ankur Gupta, David Kjerrumgaard, and Andreas Francois Vermeulen take you through learning HiveQL, the SQL-like language specific ...
hive:/default/foobar hive -e "SELECT * FROM foobar" > $[OUTPUT]协议 !hive:/default/foobar <- !hive:/default/sample_07 [hive] CREATE TABLE IF NOT EXISTS ${env:TABLEOUT} LIKE ${env:TABLEIN}; INSERT ...
hadoop-hue-hive-cookbook TODO:在此处输入食谱说明。 支持的平台 TODO:列出您支持的平台。 属性 钥匙 类型 描述 ... " recipe[hadoop-hue-hive::default] " ] } 许可证和作者 作者:: YOUR_NAME ()
This book is your go-to resource for using Hive: authors Scott Shaw, Ankur Gupta, David Kjerrumgaard, and Andreas Francois Vermeulen take you through learning HiveQL, the SQL-like language specific ...
"jdbc:hive://localhost:10000/default". Currently, the only dbname supported is "default". 2.从hive导出数据到本地时注意指定的目录/home/bigdata/syg。如果指定的目录存在,hive会先删除该目录下的所有文件。...
自述文件概括Django 开放式计算工具版本:0.1 Hive 是一个试图帮助其他需要计算能力的项目的项目。 它是一个网络平台 ( ),它试图让任何人都可以使用高性能集群。 本项目使用docker运行计算程序。 这允许使安装过程...
Edward is a member of the Apache Software Foundation and a committer for the Hadoop-Hive project. He has experience as a developer as well Linux and network administrator and enjoys the rich world of ...
Hive Programming Hive Programming
hive-jdbc-1.1.0-cdh5.12.1 连接库 jar包,用于客户端连接cdh5.12.1 下部署的hive,很多第三方客户端可使用
hadoopHive:Acesso没有蜂箱
大数据安全-kerberos技术-hive安装包,hive版本:apache-hive-3.1.3-bin.tar.gz
Then he addresses the use of Docker in the Hadoop ecosystem with complete chapters on utilizing not only Hadoop, but Hive, HBase, Sqoop, Kafka, Solr and Spark. What You Will LearnHow to install a ...
Hadoop Hive的节点绑定安装 npm install node-hive用法 hive = require('node-hive').for({ server:"hive.myserver" });hive.fetch("SELECT * FROM my_table", function(err, data) { data.each(function(record) { ...
1 Hive 概念与连接使用: 2 2 Hive支持的数据类型: 2 2.1原子数据类型: 2 2.2复杂数据类型: 2 2.3 Hive类型转换: 3 3 Hive创建/删除数据库 3 3.1创建数据库: 3 3.2 删除数据库: 3 4 Hive 表相关语句 3 4.1 Hive ...
问题 解决方案 在hadoop的配置文件core-site.xml增加如下配置: hadoop.proxyuser.hc.hosts * hadoop.proxyuser.hc.groups * 其中“hc”是连接beeline的用户。...重启hdfs:先stop-all.sh,再start-all.sh,否则...
错误: 代理抛出异常错误: java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use: JVM_Bind 这里说的是1099端口被其它进程占用...