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

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

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

问题

我已经使用`scan`将HBase表数据传递给了Mapper。是否有办法在`MultipleInput()`中将虚拟路径或变量设置为路径参数?

List<Scan> scans = new ArrayList();
scans.add(data);

TableMapReduceUtils.initTableMapperJob(scans, Mapper.class, 
  ImmutalbeWriteable.class, ImmutalbeWriteable.class, job);

MultipleInputs.addInputPath(job, new Path("DUMMY"), 
  SequenceFileInputFormat.class, Mapper.class)

> 当我像这样在路径中传递`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()

List&lt;Scan&gt; scans = new ArrayList();
scans.add(data);

TableMapReduceUtils.initTableMapperJob(scans, Mapper.class, 
  ImmutalbeWriteable.class, ImmutalbeWriteable.class, job);

MultipleInputs.addInputPath(job, new Path(&quot;DUMMY&quot;), 
  SequenceFileInputFormat.class, Mapper.class)

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

答案1

得分: 0

MultipleInputs.addInputPath(job, new Path("DUMMY"), 
  MultiTableInputFormat.class, Mapper.class)
英文:
MultipleInputs.addInputPath(job, new Path(&quot;DUMMY&quot;), 
  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:

确定