Kinetica   C#   API  Version 7.2.3.0
Avro.SchemaNormalization Class Reference

Collection of static methods for generating the cannonical form of schemas. More...

Static Public Member Functions

static string ToParsingForm (Schema s)
 Parses a schema into the canonical form as defined by Avro spec. More...
 
static byte [] Fingerprint (string fpName, byte[] data)
 
static byte [] ParsingFingerprint (string fpName, Schema s)
 Returns Fingerprint(string, byte[]) applied to the parsing canonical form of the supplied schema. More...
 
static long ParsingFingerprint64 (Schema s)
 Returns Fingerprint64(byte[]) applied to the parsing canonical form of the supplied schema. More...
 

Static Public Attributes

static long Empty64 = -4513414715797952619
 

Detailed Description

Collection of static methods for generating the cannonical form of schemas.

Definition at line 28 of file SchemaNormalization.cs.

Member Function Documentation

◆ Fingerprint()

static byte [] Avro.SchemaNormalization.Fingerprint ( string  fpName,
byte []  data 
)
inlinestatic

Returns a fingerprint of a string of bytes. This string is presumed to contain a canonical form of a schema. The algorithm used to compute the fingerprint is selected by the argument fpName.

If fpName equals the string "CRC-64-AVRO", then the result of Fingerprint64(byte[]) is returned in little-endian format.

If fpName equals the string "MD5", then the standard MD5 algorithm is used.

If fpName equals the string "SHA-256", then the standard SHA-256 algorithm is used.

Otherwise, fpName is not recognized and an ArgumentException is thrown

Recommended Avro practice dictiates that "CRC-64-AVRO" is used for 64-bit fingerprints, "MD5" is used for 128-bit fingerprints, and "SHA-256" is used for 256-bit fingerprints.

Parameters
fpNameName of the hashing algorithm.
dataData to be hashed.
Returns
Fingerprint

Definition at line 72 of file SchemaNormalization.cs.

◆ ParsingFingerprint()

static byte [] Avro.SchemaNormalization.ParsingFingerprint ( string  fpName,
Schema  s 
)
inlinestatic

Returns Fingerprint(string, byte[]) applied to the parsing canonical form of the supplied schema.

Parameters
fpNameName of the hashing algorithm.
sSchema to be hashed.
Returns
Fingerprint

Definition at line 102 of file SchemaNormalization.cs.

◆ ParsingFingerprint64()

static long Avro.SchemaNormalization.ParsingFingerprint64 ( Schema  s)
inlinestatic

Returns Fingerprint64(byte[]) applied to the parsing canonical form of the supplied schema.

Parameters
sSchema to be hashed.
Returns
Fingerprint

Definition at line 112 of file SchemaNormalization.cs.

◆ ToParsingForm()

static string Avro.SchemaNormalization.ToParsingForm ( Schema  s)
inlinestatic

Parses a schema into the canonical form as defined by Avro spec.

Parameters
sSchema
Returns
Parsing Canonical Form of a schema as defined by Avro spec.

Definition at line 37 of file SchemaNormalization.cs.

Member Data Documentation

◆ Empty64

long Avro.SchemaNormalization.Empty64 = -4513414715797952619
static

Definition at line 30 of file SchemaNormalization.cs.


The documentation for this class was generated from the following file: