大量推送本地文件到hdfs如下

hadoop fs -put ${local_path} ${hdfs_path}报错。

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:)
at java.lang.StringBuffer.toString(StringBuffer.java:)
at java.net.URI.toString(URI.java:)
at java.net.URI.<init>(URI.java:)
at org.apache.hadoop.fs.Path.initialize(Path.java:)
at org.apache.hadoop.fs.Path.<init>(Path.java:)
at org.apache.hadoop.fs.Path.getPathWithoutSchemeAndAuthority(Path.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.checkPathsForReservedRaw(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.copyFileToTarget(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)
at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:)
at org.apache.hadoop.fs.shell.Command.recursePath(Command.java:)
at org.apache.hadoop.fs.shell.CommandWithDestination.recursePath(CommandWithDestination.java:)

在hadoop命令下发现:

hadoop-2.7./bin/hadoop:    exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"

查找JAVA_HEAP_MAX

发现

hadoop-2.7./libexec/hadoop-config.sh:  JAVA_HEAP_MAX="-Xmx""$HADOOP_HEAPSIZE""m"

继续查找HADOOP_HEAPSIZE

发现

hadoop-2.7./libexec/hadoop-config.sh:  JAVA_HEAP_MAX="-Xmx""$HADOOP_HEAPSIZE""m"

以及

hadoop-2.7./share/doc/hadoop/hadoop-project-dist/hadoop-common/ClusterSetup.html:<li><tt>HADOOP_HEAPSIZE</tt> / <tt>YARN_HEAPSIZE</tt> - The maximum amount of heapsize to use, in MB e.g. if the varibale is set to  the heap will be set to 1000MB. This is used to configure the heap size for the daemon. By default, the value is . If you want to configure the values separately for each deamon you can use.</li>
<li>
<tt>HADOOP_HEAPSIZE</tt>
/ <tt>YARN_HEAPSIZE</tt> - The maximum amount of heapsize to use, in MB e.g. if the varibale is set to 1000 the heap
will be set to 1000MB. This is used to configure the heap size for the daemon. By default, the value is 1000. If you
want to configure the values separately for each deamon you can use.
</li>

调整JVM堆的最大值:

export HADOOP_HEAPSIZE=

hdfs OutOfMemoryError的更多相关文章

  1. HDFS问题集(一),使用命令报错:com.google.protobuf.ServiceException:java.lang.OutOfMemoryError:java heap space

    仅个人实践所得,若有不正确的地方,欢迎交流! 一.起因 执行以下两条基本的HDFS命令时报错 hdfs dfs -get /home/mr/data/* ./ hdfs dfs -ls /home/m ...

  2. 【转】reduce端缓存数据过多出现FGC,导致reduce生成的数据无法写到hdfs

    转自  http://blog.csdn.net/bigdatahappy/article/details/41726389 转这个目的,是因为该贴子中调优思路不错,值得学习 搜索推荐有一个job,1 ...

  3. Apache Hadoop2.0之HDFS均衡操作分析

    1 HDFS均衡操作原理 HDFS默认的块的副本存放策略是在发起请求的客户端存放一个副本,如果这个客户端在集群以外,那就选择一个不是太忙,存储不是太满的节点来存放,第二个副本放在与第一个副本相同的机架 ...

  4. HDFS源码分析之DataXceiverServer

    DataXceiverServer是Hadoop分布式文件系统HDFS的从节点--数据节点DataNode上的一个后台工作线程,它类似于一个小型的服务器,被用来接收数据读写请求,并为每个请求创建一个工 ...

  5. 重启hdfs集群的时候,报大量的gc问题。

    问题现象: 2019-03-11 12:30:52,174 INFO org.apache.hadoop.util.JvmPauseMonitor: Detected pause in JVM or ...

  6. 【solr】SolrCloud中索引数据存储于HDFS

    SolrCloud中索引数据存储于HDFS 本人最近使用SolrCloud存储索引日志条件,便于快速索引,因为我的索引条件较多,每天日志记录较大,索引想到将日志存入到HDFS中,下面就说说怎么讲sol ...

  7. hadoop 2.7.3本地环境运行官方wordcount-基于HDFS

    接上篇<hadoop 2.7.3本地环境运行官方wordcount>.继续在本地模式下测试,本次使用hdfs. 2 本地模式使用fs计数wodcount 上面是直接使用的是linux的文件 ...

  8. java head space/ java.lang.OutOfMemoryError: Java heap space内存溢出

    上一篇JMX/JConsole调试本地还可以在centos6.5 服务器上进行监控有个问题端口只开放22那么设置的9998端口 你怎么都连不上怎么监控?(如果大神知道还望指点,个人见解) 线上项目出现 ...

  9. Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法

    有的项目引用了太多的jar包,或者反射生成了太多的类,异或有太多的常量池,就有可能会报java.lang.OutOfMemoryError: PermGen space的错误, 我们知道可以通过jvm ...

随机推荐

  1. 013_RomanToInteger

    #####solution1####faster#### def romanToInt(s): d={ 'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, ...

  2. Django2.1,Xadmin2.0下的问题记录

    此篇博文长期更新…… 环境: Ubuntu18.04, Python3.6, Django2.1, Xadmin2.0 1. Xadmin添加用户小组件时报错:xadmin render() got ...

  3. 异常-CDH的service无法启动并抛出异常-org.apache.avro.AvroRemoteException: java.net.ConnectException: Connection refused (Connection refused)

    1 详细异常 org.apache.avro.AvroRemoteException: java.net.ConnectException: Connection refused (Connectio ...

  4. LabVIEW--使用云端编译器编译多个vi

    使用ni 云服务器编译vi 详细请看链接: https://users.niwsc.com/compilecloud/#/ http://www.ni.com/white-paper/52328/en ...

  5. 【原创】大数据基础之Spark(6)Spark Rdd Sort实现原理

    spark 2.1.1 spark中可以通过RDD.sortBy来对分布式数据进行排序,具体是如何实现的?来看代码: org.apache.spark.rdd.RDD /** * Return thi ...

  6. WPF学习:3.Border & Brush

    上一章<WPF学习:2.Layout-Panels-Countainers>主要介绍了布局,容器和面板.这一章主要开始介绍Border(边界)和Brush(画刷). 代码地址:http:/ ...

  7. Hadoop cloudera版和Apache(原生态)的区别

    ---------------------------------------------------------------------------------------------------- ...

  8. AI数据分析(二)

    NumPy库 NumPy数组对象 NumPy数据类型 数组的索引 数组的切片 数组的组合 数组的分割 数组的属性 NumPy数组对象 NumPy数据类型 #numpy数据类型 print " ...

  9. ReSharper反编译C#类库

    经常会在使用C#类中的某个函数时想了解其中具体的代码,可是F12转到定义后只能看到函数简单的声明, 看不到方法体中的代码,这挺让人沮丧的.. 如下: F12进入后显示的是元数据, Equals函数只能 ...

  10. 无法执行该VI,必须使用LabVIEW完整版开发系统才可以解决该错误

    该错误99%是因为你在某个vi中使用了外部系统组件,比如api,.net组件,ActiveX组件,com组件,所有不是Labview原生的接口,在你打包后,在其他没有安装这些组件的电脑上运行,就会出现 ...