Package cern.nxcals.api.ingestion
Class DataServiceEncoderImpl
- java.lang.Object
-
- cern.nxcals.api.ingestion.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 useDataEncoderImpl
-
-
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.KeyValuesencodeEntityKeyValues(cern.cmw.datax.ImmutableData data)Deprecated.Provide encoding ofrecordfor entity key values.KeyValuesencodePartitionKeyValues(cern.cmw.datax.ImmutableData data)Deprecated.Provide encoding ofrecordfor partition key values.java.lang.StringencodeRecordFieldDefinitions(cern.cmw.datax.ImmutableData record)Deprecated.Creates a Schema from a given CMW Data record.java.lang.LongencodeTimeKeyValues(cern.cmw.datax.ImmutableData record)Deprecated.Provide encoding ofrecordfor time key values.
-
-
-
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:DataServiceEncoderProvide encoding ofrecordfor time key values.- Specified by:
encodeTimeKeyValuesin interfaceDataServiceEncoder<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:DataServiceEncoderProvide encoding ofrecordfor entity key values.- Specified by:
encodeEntityKeyValuesin interfaceDataServiceEncoder<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:DataServiceEncoderProvide encoding ofrecordfor partition key values.- Specified by:
encodePartitionKeyValuesin interfaceDataServiceEncoder<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:
encodeRecordFieldDefinitionsin interfaceDataServiceEncoder<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:
applyin interfacejava.util.function.Function<cern.nxcals.api.ingestion.RecordData,byte[]>
-
-