Package com.linkedin.venice.common
Class VeniceRmdTTLFilter<INPUT_VALUE>
java.lang.Object
com.linkedin.venice.hadoop.AbstractVeniceFilter<INPUT_VALUE>
com.linkedin.venice.common.VeniceRmdTTLFilter<INPUT_VALUE>
- Type Parameters:
INPUT_VALUE- , the value contains schemaID, rmdId and rmdPayload that are required to retrieve RMD timestamp.
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
VeniceChunkedPayloadTTLFilter,VeniceKafkaInputTTLFilter
This class is responsible to filter records based on the RMD information and the ttl config.
It requires RMD schemas for a given store from an existing HDFS directory to be able to parse timestamp information in RMD.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis function implements how to parse the value and determine if filtering is needed.voidclose()protected abstract ByteBuffergetRmdPayload(INPUT_VALUE value) protected abstract intgetRmdProtocolId(INPUT_VALUE value) protected abstract intgetSchemaId(INPUT_VALUE value) protected abstract ByteBuffergetValuePayload(INPUT_VALUE value) protected booleanskipRmdRecord(INPUT_VALUE value) Define how records could be skipped if certain conditions are met.protected abstract voidupdateRmdPayload(INPUT_VALUE value, ByteBuffer payload) protected abstract voidupdateValuePayload(INPUT_VALUE value, byte[] payload)
-
Field Details
-
rmdSchemaMap
-
valueSchemaMap
-
-
Constructor Details
-
VeniceRmdTTLFilter
- Throws:
IOException
-
-
Method Details
-
checkAndMaybeFilterValue
Description copied from class:AbstractVeniceFilterThis function implements how to parse the value and determine if filtering is needed. For certain value from Active/Active partial update enabled stores, it might filter out part of its input value and only keep the remaining fresh part based on filter timestamp.- Specified by:
checkAndMaybeFilterValuein classAbstractVeniceFilter<INPUT_VALUE>- Returns:
- true if the value should be filtered out, otherwise false.
-
close
public void close() -
getSchemaId
-
getRmdProtocolId
-
getRmdPayload
-
getValuePayload
-
updateRmdPayload
-
updateValuePayload
-
skipRmdRecord
Define how records could be skipped if certain conditions are met. Do not skip by default.- Parameters:
value-- Returns:
- true if this record should not be filtered and skipped.
-