首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Terasort错误:请求的分区数大于输入键(1 > 0)

Terasort错误:请求的分区数大于输入键(1 > 0)
EN

Stack Overflow用户
提问于 2017-10-03 19:52:06
回答 1查看 188关注 0票数 1

我正在从事Hadoop基准测试,并使用teragen和tera sort工具进行同样的工作。

teragen工具工作正常,为此,我使用以下命令:

代码语言:javascript
复制
hadoop jar /Users/karan.verma/Documents/backups/h/hadoop-2.6.4/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar  teragen -Dmapreduce.job.maps=100 1t random-data1

并在控制台上给出以下输出:

代码语言:javascript
复制
17/10/03 17:19:21 INFO mapreduce.Job: Job job_1507026170114_0005 completed successfully
17/10/03 17:19:21 INFO mapreduce.Job: Counters: 30
    File System Counters
        FILE: Number of bytes read=0
        FILE: Number of bytes written=10661490
        FILE: Number of read operations=0
        FILE: Number of large read operations=0
        FILE: Number of write operations=0
        HDFS: Number of bytes read=8594
        HDFS: Number of bytes written=0
        HDFS: Number of read operations=400
        HDFS: Number of large read operations=0
        HDFS: Number of write operations=200
    Job Counters 
        Launched map tasks=100
        Other local map tasks=100
        Total time spent by all maps in occupied slots (ms)=1089472
        Total time spent by all reduces in occupied slots (ms)=0
        Total time spent by all map tasks (ms)=1089472
        Total vcore-milliseconds taken by all map tasks=1089472
        Total megabyte-milliseconds taken by all map tasks=1115619328
    Map-Reduce Framework
        Map input records=0
        Map output records=0
        Input split bytes=8594
        Spilled Records=0
        Failed Shuffles=0
        Merged Map outputs=0
        GC time elapsed (ms)=9690
        CPU time spent (ms)=0
        Physical memory (bytes) snapshot=0
        Virtual memory (bytes) snapshot=0
        Total committed heap usage (bytes)=11115954176
    File Input Format Counters 
        Bytes Read=0
    File Output Format Counters 
        Bytes Written=0

当我使用下面的命令执行terasort工具时,遵循这个命令:

代码语言:javascript
复制
hadoop jar  /Users/karan.verma/Documents/backups/h/hadoop-2.6.4/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar  terasort random-data1 sorted-data

我得到了以下错误:

代码语言:javascript
复制
17/10/03 17:20:10 INFO terasort.TeraSort: starting
17/10/03 17:20:10 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/10/03 17:20:11 INFO input.FileInputFormat: Total input paths to process : 100
Spent 168ms computing base-splits.
Spent 2ms computing TeraScheduler splits.
Computing input splits took 172ms
Sampling 10 splits of 100
Making 1 from 0 sampled records
17/10/03 17:20:11 ERROR terasort.TeraSort: Requested more partitions than input keys (1 > 0)

帮帮忙,为什么会发生这种事?配置部分中有什么我遗漏的吗?

EN

回答 1

Stack Overflow用户

发布于 2019-01-28 17:24:29

检查teragen命令的输出,因为生成的输出文件可能为空。如果输入数据大小为0,则会出现此错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46543954

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档