如何在MapReduce的multipleinput中将虚拟变量设置为路径。

huangapple go评论102阅读模式
英文:

how to set dummy variable as path in multipleinput in map-reduce

问题

  1. 我已经使用`scan`HBase表数据传递给了Mapper。是否有办法在`MultipleInput()`中将虚拟路径或变量设置为路径参数?
  2. List<Scan> scans = new ArrayList();
  3. scans.add(data);
  4. TableMapReduceUtils.initTableMapperJob(scans, Mapper.class,
  5. ImmutalbeWriteable.class, ImmutalbeWriteable.class, job);
  6. MultipleInputs.addInputPath(job, new Path("DUMMY"),
  7. SequenceFileInputFormat.class, Mapper.class)
  8. > 当我像这样在路径中传递`DUMMY`变量时,我遇到了错误:此路径不存在。
英文:

I have passed hbase table data using scan to the mapper. Is there any way to set Dummy path or variable as path argument in MultipleInput()

  1. List&lt;Scan&gt; scans = new ArrayList();
  2. scans.add(data);
  3. TableMapReduceUtils.initTableMapperJob(scans, Mapper.class,
  4. ImmutalbeWriteable.class, ImmutalbeWriteable.class, job);
  5. MultipleInputs.addInputPath(job, new Path(&quot;DUMMY&quot;),
  6. SequenceFileInputFormat.class, Mapper.class)

> I'm getting error: This path doesn't exits, while passing DUMMY
> variable in path like this.

答案1

得分: 0

  1. MultipleInputs.addInputPath(job, new Path("DUMMY"),
  2. MultiTableInputFormat.class, Mapper.class)
英文:
  1. MultipleInputs.addInputPath(job, new Path(&quot;DUMMY&quot;),
  2. MultiTableInputFormat.class, Mapper.class)

huangapple
  • 本文由 发表于 2020年8月26日 13:24:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/63591000.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定