java.lang.OutOfMemoryError: Java heap space

在安装完hadoop后跑example,结果抛出异常java.lang.OutOfMemoryError: Java heap space

 

下面是在stackoverflow上看到的解决办法:

1、don't forget to execute "ssh localhost" first. Believe or not! No ssh would throw an error message on Java heap space as well(我就是因为这个原因抛异常)

2、For anyone using RPM or DEB packages, the documentation and common advice is misleading. These packages install hadoop configuration files into /etc/hadoop. These will take priority over other settings.

The /etc/hadoop/hadoop-env.sh sets the maximum java heap memory for Hadoop, by Default it is:

export HADOOP_CLIENT_OPTS="-Xmx128m $HADOOP_CLIENT_OPTS"

This Xmx setting is too low, simply change it to this and rerun

export HADOOP_CLIENT_OPTS="-Xmx2048m $HADOOP_CLIENT_OPTS"

 

P.S.

如果是用rpm安装的,那个示例程序的路径是:

/usr/share/hadoop/hadoop-examples-1.0.4.jar

执行命令行应该是:

hadoop jar /usr/share/hadoop/hadoop-examples-1.0.4.jar grep input output 'dfz[a-z.]+'

 

 

 

转载于:https://www.cnblogs.com/mender/archive/2013/04/01/2993937.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值