public class AvroBulletRecordConverter extends BulletRecordConverter
String as its
string type.
TypedAvroBulletRecord or
UntypedAvroBulletRecord.config, schema, shouldTypeCheck| Constructor and Description |
|---|
AvroBulletRecordConverter()
Constructs an AvroBulletRecordConverter without a schema.
|
AvroBulletRecordConverter(com.yahoo.bullet.common.BulletConfig bulletConfig)
Constructs an AvroBulletRecordConverter from a given configuration.
|
AvroBulletRecordConverter(String schema)
Constructs an AvroBulletRecordConverter from a given schema.
|
| Modifier and Type | Method and Description |
|---|---|
com.yahoo.bullet.record.BulletRecord |
convert(Object object,
com.yahoo.bullet.record.BulletRecord record)
Converts an object to a BulletRecord using the given record.
|
protected Object |
get(Object object,
String base)
Gets the specified top-level field from the object.
|
protected Object |
getField(Object object,
String field)
Gets the specified inner field from the object.
|
protected void |
setField(BulletRecordField field,
Object value,
com.yahoo.bullet.record.BulletRecord record)
Sets the field in a
BulletRecord. |
build, convert, flattenMap, from, getTypedObjectpublic AvroBulletRecordConverter()
throws BulletDSLException
BulletDSLException - if there is an error creating the converter.public AvroBulletRecordConverter(String schema) throws BulletDSLException
schema - A schema file that specifies the fields to extract and their types.BulletDSLException - if there is an error creating the converter.public AvroBulletRecordConverter(com.yahoo.bullet.common.BulletConfig bulletConfig)
throws BulletDSLException
bulletConfig - The configuration that specifies the settings for an AvroBulletRecordConverter.BulletDSLException - if there is an error creating the converter.public com.yahoo.bullet.record.BulletRecord convert(Object object, com.yahoo.bullet.record.BulletRecord record) throws BulletDSLException
BulletRecordConverterconvert in class BulletRecordConverterobject - The object to be converted.record - The record to insert fields into.BulletDSLException - if there is an error converting the object to a BulletRecord.protected void setField(BulletRecordField field, Object value, com.yahoo.bullet.record.BulletRecord record)
BulletRecordConverterBulletRecord.setField in class BulletRecordConverterfield - The field to set.value - The value to set the field to.record - The record to set the field in.protected Object get(Object object, String base)
BulletRecordConverterget in class BulletRecordConverterobject - The object to get from.base - The top-level field to get.protected Object getField(Object object, String field)
BulletRecordConvertergetField in class BulletRecordConverterobject - The object to get from.field - The inner field to get.Copyright © 2021. All rights reserved.