Class ComputeGenericRecord

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord

    public class ComputeGenericRecord
    extends java.lang.Object
    implements org.apache.avro.generic.GenericRecord
    A simple wrapper to throw exception when retrieving failed computation.
    • Constructor Summary

      Constructors 
      Constructor Description
      ComputeGenericRecord​(org.apache.avro.generic.GenericRecord record, org.apache.avro.Schema valueSchema)
      Schema of the original record that was used to compute the result
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(int i)  
      java.lang.Object get​(java.lang.String key)  
      org.apache.avro.Schema getSchema()  
      org.apache.avro.Schema getValueSchema()  
      void put​(int i, java.lang.Object v)  
      void put​(java.lang.String key, java.lang.Object v)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.avro.generic.GenericRecord

        hasField
    • Constructor Detail

      • ComputeGenericRecord

        public ComputeGenericRecord​(org.apache.avro.generic.GenericRecord record,
                                    org.apache.avro.Schema valueSchema)
        Schema of the original record that was used to compute the result
    • Method Detail

      • put

        public void put​(java.lang.String key,
                        java.lang.Object v)
        Specified by:
        put in interface org.apache.avro.generic.GenericRecord
      • get

        public java.lang.Object get​(java.lang.String key)
        Specified by:
        get in interface org.apache.avro.generic.GenericRecord
      • put

        public void put​(int i,
                        java.lang.Object v)
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
      • get

        public java.lang.Object get​(int i)
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
      • getSchema

        public org.apache.avro.Schema getSchema()
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
      • getValueSchema

        public org.apache.avro.Schema getValueSchema()