在Windows下通过Cygwin中搭建Hadoop(0.1.8.2)和Hive(0.6)的环境的时候,遇到如下错误
$ hive
Could not create the Java virtual machine.
Invalid maximum heap size: -Xmx4096m
The specified size exceeds the maximum representable size.
解决方法:
修改hive-0.6.0\bin\ext\util\execHiveCmd.sh文件如下
#HADOOP_HEAPSIZE=4096
HADOOP_HEAPSIZE=128
如果在Windows下用cygwin使用putty登陆,可能会遇到hive命令后没有提示的问题,直接用cygwin没有这种问题.