赞
踩
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.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。