Class TypeConversion.MapConversion

  • All Implemented Interfaces:
    TypeConversion<java.util.Map<?,​?>>
    Enclosing interface:
    TypeConversion<T>

    public static class TypeConversion.MapConversion
    extends java.lang.Object
    implements TypeConversion<java.util.Map<?,​?>>
    Converts GenericData.Array (, which is a List,) of GenericRecord into Map The contained GenericRecord should be an avro key-value record. The conversion is done recursively, meaning the keys and values of the input are converted too.
    • Constructor Detail

      • MapConversion

        public MapConversion()
    • Method Detail

      • convert

        public java.util.Map<?,​?> convert​(org.apache.avro.Schema fieldSchema,
                                                @NotNull
                                                java.lang.Object fieldValue)
        Description copied from interface: TypeConversion
        Convert value from the source type to the target type. Runtime exceptions are thrown on invalid argument or conversion failure.
        Specified by:
        convert in interface TypeConversion<java.util.Map<?,​?>>
        Parameters:
        fieldSchema - avro schema to loop up the source schema
        fieldValue - value in the source type. The value cannot be null.
        Returns:
        the converted value