public class KeyPathValidator extends Object
Schema and related
Avro data object. With the exception of NULL, any Avro type can be used as a key. Note that by
design individual elements contained within ARRAYs and MAPs cannot be addressed
as these are only verifiable at runtime, subject to the context of the message being sent.
If the path is empty, blank, or null then the entire message is used as the key.
| Constructor and Description |
|---|
KeyPathValidator(KeyPathParser.Path path,
org.apache.avro.Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
validate()
Validates that the path is correct with respect to the schema.
|
public KeyPathValidator(KeyPathParser.Path path, org.apache.avro.Schema schema)
path - JSON path, where each path element describes a field within a RECORD.schema - The message Schema in which the path describes the location of the key node.public void validate()
throws InvalidKeyPathException
InvalidKeyPathExceptionCopyright © 2016–2020 Hotels.com (Data Platform Team). All rights reserved.