当前位置:   article > 正文

HBase和MapReduce框架之TableMapReduceUtil类_tablemapreduceutil inittablemapperjob

tablemapreduceutil inittablemapperjob

HBase和MapReduce框架之TableMapReduceUtil类

  • initTableMapperJob方法
public static void initTableMapperJob(String table,
                                      Scan scan,
                                      Class<? extends TableMapper> mapper,
                                      Class<?> outputKeyClass,
                                      Class<?> outputValueClass,
                                      org.apache.hadoop.mapreduce.Job job,
                                      boolean addDependencyJars,
                                      Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
                               throws IOException

Use this before submitting a TableMap job. It will appropriately set up the job.

Parameters:
    table - The table name to read from.#表名
    scan - The scan instance with the columns, time range etc.#对表的扫描操作
    mapper - The mapper class to use.
    outputKeyClass - The class of the output key.
    outputValueClass - The class of the output value.
    job - The current job to adjust. Make sure the passed job is carrying all necessary HBase configuration.
    addDependencyJars - upload HBase jars and jars for any of the configured job classes via the distributed cache (tmpjars).
Throws:
    IOException - When setting up the details fails. 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/969900
推荐阅读
相关标签
  

闽ICP备14008679号