Using Map/Reduce AEs in SQL queries
The Netezza Analytics map/reduce framework provides the ability to invoke mappers and reducers
directly from nzsql. There are three general Analytic Executables (AEs) registered with the
mapreduce cartridge in the inza database. These can be used in a SQL query to execute a particular
mapper, reducer, or combiner from a Java class. The AEs are registered as User-Defined Table
Functions (UDTF) with the following names:
- MapperAE
- ReducerAE
- CombinerAE
These AEs have a common signature:
<Task>AE(K1, … , Kn, V1, … , Vm, 'NZAE_PARAMETER2=<conf.xml>')
where:
- K1, … , Kn
- The key columns.
- V1, … ,Vm
- The value columns,
- <conf.xml>
- The path to a configuration file that contains all properties needed to run the task.
Properties
The following table lists the properties available to each AE.
Property | Mapper | Combiner | Reducer |
---|---|---|---|
mapreduce.job.run.dir | REQUIRED | YES | YES |
mapreduce.job.jar | REQUIRED when job's jar available | REQUIRED when job's jar available | REQUIRED when job's jar available |
mapreduce.job.map.class | REQUIRED | ||
mapreduce.map.input.key.class | REQUIRED | ||
mapreduce.map.input.value.class | REQUIRED | ||
mapreduce.map.output.key.class | REQUIRED | REQUIRED | YES |
mapreduce.map.output.key.columns.sizes | REQUIRED | ||
mapreduce.map.output.value.class | REQUIRED | REQUIRED | YES |
mapreduce.map.output.value.columns.sizes | REQUIRED | ||
mapreduce.job.combine.class | REQUIRED | REQUIRED | |
mapreduce.combine.output.key.class | REQUIRED | REQUIRED | REQUIRED when mapreduce.job.combine.class is defined |
mapreduce.combine.output.key.columns.sizes | REQUIRED | REQUIRED | |
mapreduce.combine.output.value.class | REQUIRED | REQUIRED | REQUIRED when mapreduce.job.combine.class is defined |
mapreduce.combine.output.value.columns.sizes | REQUIRED | ||
mapreduce.job.reduce.class | REQUIRED | ||
mapreduce.reduce.output.key.class | REQUIRED | ||
mapreduce.reduce.output.key.columns.sizes | REQUIRED | ||
mapreduce.reduce.output.value.class | REQUIRED | ||
mapreduce.reduce.output.value.columns.sizes | REQUIRED |