安装参考:
http://www.54chen.com/_linux_/hive-hadoop-how-to-install.html
https://cwiki.apache.org/confluence/display/Hive/GettingStarted#GettingStarted-InstallationandConfiguration
使用
1:配置文件所在目录 --> $HIVE_HOME/conf/hive-site.xml
2:log文件所在目录 --> /tmp/{user}
3:查看配置信息,在hive终端中输入:set -v
4:创建表
CREATE TABLE pokes (foo INT, bar STRING);
CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
partion参见http://p-x1984.iteye.com/blog/1156408,总的来说partion就是把数据分成几个文件存储,select的时候缩小范围
5:其它表操作
show tables;
desc pokes;
ALTER TABLE pokes ADD COLUMNS (new_col INT);
ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment');
ALTER TABLE events RENAME TO 3koobecaf;
DROP TABLE pokes;