combiner函数

mhd8tkvw  于 2021-05-31  发布在  Hadoop
关注(0)|答案(1)|浏览(431)

我有一个简单的hadoop,nutch2.x,hbase集群。我得写一份能找到统计数据的工作。这是两个步骤的工作,即,我认为我需要合并功能也。在简单的hadoop作业中,这不是一个大问题,因为给出了很多指导,例如,这个。但我找不到任何选择使用组合器与戈拉。我的统计数据将被添加到hbase的页面中,这就是为什么我不能了解gora(我想)。下面是我希望添加com的代码片段

GoraMapper.initMapperJob(job, query, pageStore, Text.class, WebPage.class,
        My_Mapper.class, null, true);

    job.setNumReduceTasks(1);

    // === Reduce ===
    DataStore<String, WebPage> hostStore = StorageUtils.createWebStore(
        job.getConfiguration(), String.class, WebPage.class);
    GoraReducer.initReducerJob(job, hostStore, My_Reducer.class);
tag5nh1u

tag5nh1u1#

我从来没有用过gora的组合器,但是这个能用吗(或者它显示了什么错误)

GoraReducer.initReducerJob(job, hostStore, My_Reducer.class);
job.setCombinerClass(My_Reducer.class);

编辑:在apache的jira上创建了一个关于combiner的问题。

相关问题