大量推送本地文件到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. Coursera, Big Data 3, Integration and Processing (week 5)

    Week 5, Big Data Analytics using Spark     Programing in Spark   Spark Core: Programming in Spark us ...

  2. wget无法正确下载jdk解决方案

    1 去官网复制下载链接 https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/ ...

  3. 忘记mysql的登陆密码该怎么办?

    1.如果忘记了其他用户的密码,可以使用root账户进入mysql,修改mysql.user表中的用户密码 2.如果忘记了root的mysql密码,可以使用如下方式: 确认服务器处于安全的状态,也就是没 ...

  4. mongoDB3.0版本使用express读取数据

    使用express连接数据库操作 var express = require('express'); var app = express(); var MongoClient = require('m ...

  5. spring cloud 微服务调用--ribbon和feign调用

    这里介绍ribbon和feign调用两种通信服务调用方式,同时介绍如何引入第三方服务调用.案例包括了ribbon负载均衡和hystrix熔断--服务降级的处理,以及feign声明式服务调用.例子包括s ...

  6. zookeep服务启动命令

    zookeeper的安装目录:/usr/local/zookeeper-3.4.6/bin/zkServer.sh; 配置文件路径:../conf/zoo.cfg 端口 :2181: ZooKeepe ...

  7. tomcat 优化建议

    下面给出的是tomcat的优化建议,如果不同意见请留言. 上配置: tomcat jmx配置访问:修改catalina.sh CATALINA_OPTS="$CATALINA_OPTS -D ...

  8. springboot配置Druid数据源

    springboot配置druid数据源 Author:SimpleWu springboot整合篇 前言 对于数据访问层,无论是Sql还是NoSql,SpringBoot默认采用整合SpringDa ...

  9. SpringBoot整合mybatis多数据源,支持分布式事务

    编码工具:IDEA SpringBoot版本:2.0.1 JDK版本:1.8 1.使用IDEA构建一个Maven工程 ,添加依赖: <?xml version="1.0" e ...

  10. Mac App开发

    1. icns制作 在线工具: https://iconverticons.com/online/ 2. 替换dmg图标 选中dmg文件 右键, 选择显示简介 将icns图表拖拽到简介弹出框的左上角图 ...