Class DataServiceEncoderImpl

  • All Implemented Interfaces:
    DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>, java.util.function.Function<cern.nxcals.api.ingestion.RecordData,​byte[]>

    @Deprecated
    public class DataServiceEncoderImpl
    extends java.lang.Object
    implements DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>, java.util.function.Function<cern.nxcals.api.ingestion.RecordData,​byte[]>
    Deprecated.
    - please use DataEncoderImpl
    • Constructor Summary

      Constructors 
      Constructor Description
      DataServiceEncoderImpl​(org.apache.avro.Schema entityKeyDefs, org.apache.avro.Schema partitionKeyDefs, org.apache.avro.Schema timeKeyDefs, org.apache.avro.Schema recordVersionKeySchema, cern.nxcals.common.converters.TimeConverter timeConverter)
      Deprecated.
      Constructor that builds encoder based on supplied schemas.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      byte[] apply​(cern.nxcals.api.ingestion.RecordData record)
      Deprecated.
       
      KeyValues encodeEntityKeyValues​(cern.cmw.datax.ImmutableData data)
      Deprecated.
      Provide encoding of record for entity key values.
      KeyValues encodePartitionKeyValues​(cern.cmw.datax.ImmutableData data)
      Deprecated.
      Provide encoding of record for partition key values.
      java.lang.String encodeRecordFieldDefinitions​(cern.cmw.datax.ImmutableData record)
      Deprecated.
      Creates a Schema from a given CMW Data record.
      java.lang.Long encodeTimeKeyValues​(cern.cmw.datax.ImmutableData record)
      Deprecated.
      Provide encoding of record for time key values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • DataServiceEncoderImpl

        public DataServiceEncoderImpl​(org.apache.avro.Schema entityKeyDefs,
                                      org.apache.avro.Schema partitionKeyDefs,
                                      org.apache.avro.Schema timeKeyDefs,
                                      org.apache.avro.Schema recordVersionKeySchema,
                                      cern.nxcals.common.converters.TimeConverter timeConverter)
        Deprecated.
        Constructor that builds encoder based on supplied schemas.
        Parameters:
        entityKeyDefs - Entity schema definition.
        partitionKeyDefs - Partition schema definition.
        timeKeyDefs - Time schema definition.
        recordVersionKeySchema - Record version schema definition.
        timeConverter - Timestamp converter from generic record.
    • Method Detail

      • encodeTimeKeyValues

        public java.lang.Long encodeTimeKeyValues​(cern.cmw.datax.ImmutableData record)
        Deprecated.
        Description copied from interface: DataServiceEncoder
        Provide encoding of record for time key values.
        Specified by:
        encodeTimeKeyValues in interface DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>
        Parameters:
        record - Data to encode.
        Returns:
        an internal representation of the time key values.
      • encodeEntityKeyValues

        public KeyValues encodeEntityKeyValues​(cern.cmw.datax.ImmutableData data)
        Deprecated.
        Description copied from interface: DataServiceEncoder
        Provide encoding of record for entity key values.
        Specified by:
        encodeEntityKeyValues in interface DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>
        Parameters:
        data - Data to encode.
        Returns:
        an internal representation of the entity key values
      • encodePartitionKeyValues

        public KeyValues encodePartitionKeyValues​(cern.cmw.datax.ImmutableData data)
        Deprecated.
        Description copied from interface: DataServiceEncoder
        Provide encoding of record for partition key values.
        Specified by:
        encodePartitionKeyValues in interface DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>
        Parameters:
        data - Data to encode.
        Returns:
        an internal representation of the partition key values
      • encodeRecordFieldDefinitions

        public java.lang.String encodeRecordFieldDefinitions​(cern.cmw.datax.ImmutableData record)
        Deprecated.
        Creates a Schema from a given CMW Data record.
        Specified by:
        encodeRecordFieldDefinitions in interface DataServiceEncoder<KeyValues,​KeyValues,​java.lang.String,​java.lang.Long>
        Parameters:
        record - Data to encode.
        Returns:
        an internal representation of the record definition (fields + types), aka schema.
      • apply

        public byte[] apply​(cern.nxcals.api.ingestion.RecordData record)
        Deprecated.
        Specified by:
        apply in interface java.util.function.Function<cern.nxcals.api.ingestion.RecordData,​byte[]>