小编Aru*_*mar的帖子

MapReduce驱动程序的addInputPath出错

我在MapReduce驱动程序的addInputPath方法中收到错误.错误是

"The method addInputPath(Job, Path) in the type FileInputFormat is not applicable for the arguments (JobConf, Path)"
Run Code Online (Sandbox Code Playgroud)

这是我的驱动程序代码:

package org.myorg;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

public class WordCount extends Configured implements Tool{
    public int run(String[] args) throws Exception
    {
          //creating a JobConf object and assigning a job name for identification purposes
          JobConf conf = new JobConf(getConf(), org.myorg.WordCount.class);
          conf.setJobName("WordCount");

          //Setting configuration object …
Run Code Online (Sandbox Code Playgroud)

hadoop mapreduce hadoop-plugins

4
推荐指数
1
解决办法
4136
查看次数

证明f(n)总是O(f(n-1))

假设当n变为无穷大时f(n)变为无穷大.

这是一个家庭作业问题,我希望得到一个想法/指导,而不是完整的答案.

math big-o asymptotic-complexity

-2
推荐指数
1
解决办法
95
查看次数