首页 技术 正文
技术 2022年11月13日
0 收藏 430 点赞 2,440 浏览 3330 个字

大量推送本地文件到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=
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,498
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,911
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,745
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,499
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,138
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,302