public abstract class Mapper extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Params |
params
Parameters for the Mapper.
|
Constructor and Description |
---|
Mapper(TableSchema dataSchema,
Params params)
Construct a Mapper.
|
Modifier and Type | Method and Description |
---|---|
protected TableSchema |
getDataSchema()
Get the schema of input rows.
|
abstract TableSchema |
getOutputSchema()
Get the schema of the output rows of
map(Row) method. |
abstract Row |
map(Row row)
Map a row to a new row.
|
protected final Params params
public Mapper(TableSchema dataSchema, Params params)
dataSchema
- The schema of input rows.params
- The parameters for this mapper.protected TableSchema getDataSchema()
public abstract Row map(Row row) throws Exception
row
- The input row.Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail.public abstract TableSchema getOutputSchema()
map(Row)
method.map(Row)
method.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.