# Set HADOOP_HOME to point to a specific hadoop install directory
HADOOP_HOME=/hadoop/hadoop-1.0.4
# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=/hive/hive-0.9.0/conf
4:启动
进入/hive/hive-0.9.0/bin
[root@pg2 conf]# cd ../bin
[root@pg2 bin]# ls
ext hive hive-config.sh
[root@pg2 bin]# ./hive
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
Logging initialized using configuration in file:/hive/hive-0.9.0/conf/hive-log4j.properties
Hive history file=/tmp/root/hive_job_log_root_201301032313_932376477.txt
hive>
hive> show tables;
OK
Time taken: 21.874 seconds
hive>
顺便补充一个问题:
hive报Invalid maximum heap size: -Xmx4096m错误解决方法
mongodb@krusiting-laptop:~/hive-0.6.0$ bin/hive
Invalid maximum heap size: -Xmx4096m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.
解决方法:
~/hive-0.6.0/bin/ext/util$ vim execHiveCmd.sh
修改
HADOOP_HEAPSIZE=4096
为
HADOOP_HEAPSIZE=256