HIVE简单部署
1.下载 http://labs.renren.com/apache-mirror/hive/stable/hive-0.8.1.tar.gz
2.安装
安装hive之前确保已经安装了hadoop,hadoop简单安装请查看[url] http://alikevin2011.iteye.com/blog/1534712[/url]
[root@inc-platform-dev-145-5 hive]# tar -zxvf hive-0.8.1.tar.gz
[root@inc-platform-dev-145-5 hive]# vi /etc/profile..export HIVE_HOME=/home/kevin/work/hiveexport HADOOP_HOME=/home/kevin/work/hadoopexport PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$ANTX_HOME/bin:$HIVE_HOME/bin:$HADOOP_HOME/bin:$PAT...
[root@inc-platform-dev-145-5 hive]# source /etc/profile
[root@inc-platform-dev-145-5 hive]# bin/hiveLogging initialized using configuration in jar:file:/home/kevin/work/hive/lib/hive-common-0.8.1.jar!/hive-log4j.propertiesHive history file=/tmp/root/hive_job_log_root_201206061019_1215788833.txthive>
[root@inc-platform-dev-145-5 hive]# su - work[work@inc-platform-dev-145-5 ~]$ /home/kevin/work/hive/bin/hiveLogging initialized using configuration in jar:file:/home/kevin/work/hive/lib/hive-common-0.8.1.jar!/hive-log4j.propertiesHive history file=/tmp/work/hive_job_log_work_201206061022_606817436.txthive> CREATE TABLE pokes (foo INT, bar STRING);OKTime taken: 11.116 seconds
hive> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);OKTime taken: 0.05 seconds
hive> SHOW TABLES;OKinvitespokesTime taken: 0.099 secondshive> SHOW TABLES '.*s';OKinvitespokesTime taken: 0.044 seconds
hive> DESCRIBE invites;OKfoo intbar stringds stringTime taken: 0.131 seconds
hive> ALTER TABLE pokes ADD COLUMNS (new_col INT);OKTime taken: 4.712 secondshive> ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment');OKTime taken: 0.112 secondshive> ALTER TABLE events RENAME TO 3koobecaf;
hive> show tables;OKinvitespokesTime taken: 0.101 secondshive> DROP TABLE pokes;OKTime taken: 3.353 secondshive> show tables;OKinvitesTime taken: 0.069 secondshive>
...86val_86311val_31127val_27165val_165409val_409255val_255278val_27898val_98484val_484265val_265193val_193401val_401150val_150273val_273224val_224369val_36966val_66...