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.KeyValues
encodeEntityKeyValues(cern.cmw.datax.ImmutableData data)
Deprecated.Provide encoding ofrecord
for entity key values.KeyValues
encodePartitionKeyValues(cern.cmw.datax.ImmutableData data)
Deprecated.Provide encoding ofrecord
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 ofrecord
for 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:DataServiceEncoder
Provide encoding ofrecord
for time key values.- Specified by:
encodeTimeKeyValues
in 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:DataServiceEncoder
Provide encoding ofrecord
for entity key values.- Specified by:
encodeEntityKeyValues
in 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:DataServiceEncoder
Provide encoding ofrecord
for partition key values.- Specified by:
encodePartitionKeyValues
in 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:
encodeRecordFieldDefinitions
in 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:
apply
in interfacejava.util.function.Function<cern.nxcals.api.ingestion.RecordData,byte[]>
-
-