我遇到过的错误,异常

1.linx中'is  not in the sudoers  file'的解决方法

当在终端执行sudo命令时,系统提示'is not in the sudoers filee'

其实就是没有权限进行sudo,解决方法如下(这里假设用户名为cuser):

1.切换到超级用户 :  su命令

2.修改文件内容:

找到'root  ALL=(ALL)  ALL‘一行,在下面插入新的一行,内容是'cuser  ALL=(ALL)  ALL'然后在vi键入命令'wq!'保存并退出

4.退出超级用户:exit

2.[hadoop] - Container [xxxx] is running beyond physical/virtual memory limits.

当运行mapreduce的时候,有时候会出现异常信息,提示物理内存或者虚拟内存超出限制。默认情况下,虚拟内存是物理内存的2.1倍。

我们发现影响这个代码执行的参数分别是:

参数 默 认值 描述
yarn.scheduler.minium-allocation-mb 1024 每个container请求的jvm配置,单位m。如果请求的内存小于该值,那么会重新设置为该值
yarn-scheduler.maxium-allocation-mb 8192 每个container请求的最高jvm配置,单位m。如果大于该值,会被重新配置。
yarn.nodemanager.resource.memory-mb 8192 每个nodemanager节点准备最高内存配置,单位m
yarn.nodemanager.vmem-pmem-ratio 2.1 虚拟内存和物理内存之间的比率,如果提示virtual  memory  limits的时候,可以将该值调大
yarn.nodemanager.vmem-check-enabled true 是否进行物理内存限制比较,设置为false,不会进行大小的比较
yarn.nodemanager.vmem-check-enabled false 是否进行虚拟内存限制
mapreduce.map.memory.mb 1024 map内存申请大小,单位m
mapreduce.reduce.memory.mb 1024 reduce内存申请大小,单位m
mapred.child.java.opts -Xmx200 map/reduce执行参数设置。

 3.Name node is in safe mode. 

HDFS文件系统把本地文件复制到HDFS上的时候,出现了此异常。

我们只需切换到hadoop目录,然后  bin/hadoop dfsadmin -safemode leave 即可

4.WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

猜你喜欢

转载自blog.csdn.net/ximingren/article/details/78177793