大量推送本地文件到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. 使用Maven插件构建Spring Boot应用程序镜像

    使用Maven插件构建Spring Boot应用程序的Docker镜像. 环境准备 1.Linux系统 2.安装JDK,Maven 3.安装Docker 应用实践 1.在应用程序根目录下添加Docke ...

  2. [再寄小读者之数学篇](2014-06-22 不等式 [中国科学技术大学2011年高等数学B考研试题])

    证明不等式: $$\bex 1+x\ln\sex{x+\sqrt{1+x^2}}>\sqrt{1+x^2},\quad x>0. \eex$$ 证明: 令 $x=\tan t,\ 0< ...

  3. IIS--互联网信息服务

    IIS--互联网信息服务 1.IIS是微软出品的一个服务器插件 2.IIS的功能:1)发布web网站 2)发布ftp站点 WEB服务器:1.监听TCP80端口 --- http://www.baidu ...

  4. Python 入门基础14 --time、os、random、json、pickle 常用模块1

    今日内容: 一.常用模块 2019.04.10 更新 1.time:时间 2.calendar:日历 3.datetime:可以运算的时间 4.sys:系统 5.os:操作系统 6.os.path:系 ...

  5. spring cloud 注册中心--eureka注册与发现

    本文详细介绍spring cloud微服务的默认注册中心--eureka注册与发现.开发环境需要Windows系统.jdk和intellij idea.与zookeeper注册中心相比,eureka不 ...

  6. 写给自己看的vue

    学习过程:自学(个人demo驱动),论坛,qq群多少听到vue,react(很抱歉只弄了hello world demo 虚拟dom 也是概念 到目前也没弄清楚)这类框架(工作经历前后端都折腾,老板指 ...

  7. 【转】Python3 操作符重载方法

    Python3 操作符重载方法 本文由 Luzhuo 编写,转发请保留该信息. 原文: http://blog.csdn.net/Rozol/article/details/70769628 以下代码 ...

  8. C++设计模式——迭代器模式

    前言 最近非常感伤,总是怀念大学的日子,做梦的时候也常常梦到.梦到大学在电脑前傻傻的敲着键盘,写着代码,对付着数据结构与算法的作业:建立一个链表,遍历链表,打印链表.现在把那个时候声明的链表的头文件拿 ...

  9. C#+EntityFramework编程方式详细之Model First

    Model First Model First模式即“模型优先”,这里的模型指的是“ADO.NET Entity Framework Data Model”,此时你的应用并没有设计相关数据库,在VS中 ...

  10. 关于strcpy函数形参类型的解析和指针作为输入型输出型参数的不同

    在C语言中,字符串一直都是热点,关于strcpy函数大家都很熟悉,但是真正了解的很少,一旦用到总会报一大堆莫名其妙错误,今天我就来给大家详细剖析一下strcpy函数. 虽然不能看到strcpy的内部实 ...