public class AvroDimensionRowParser extends Object
Constructor and Description |
---|
AvroDimensionRowParser(DimensionFieldNameMapper dimensionFieldNameMapper)
Constructs an AvroDimensionRowParser object based on the DimensionFieldNameMapper object.
|
Modifier and Type | Method and Description |
---|---|
Set<DimensionRow> |
parseAvroFileDimensionRows(Dimension dimension,
String avroFilePath)
Parses the avro file and returns the dimension rows.
|
void |
parseAvroFileDimensionRows(Dimension dimension,
String avroFilePath,
Consumer<DimensionRow> consumer)
Parses the avro file and sends dimension rows to a consumer.
|
public AvroDimensionRowParser(DimensionFieldNameMapper dimensionFieldNameMapper)
dimensionFieldNameMapper
- Object that defines the dimension field name transformationspublic void parseAvroFileDimensionRows(Dimension dimension, String avroFilePath, Consumer<DimensionRow> consumer) throws IllegalArgumentException
dimension
- The dimension object used to configure the dimensionavroFilePath
- The path of the AVRO data file (.avro)consumer
- A consumer to process records from the avro fileIllegalArgumentException
- thrown if JSON object `fields` is not presentpublic Set<DimensionRow> parseAvroFileDimensionRows(Dimension dimension, String avroFilePath) throws IllegalArgumentException
dimension
- The dimension object used to configure the dimensionavroFilePath
- The path of the AVRO data file (.avro)IllegalArgumentException
- thrown if JSON object `fields` is not presentCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.