Class VeniceClientBasedMetadata
- java.lang.Object
-
- com.linkedin.venice.fastclient.meta.AbstractStoreMetadata
-
- com.linkedin.venice.fastclient.meta.VeniceClientBasedMetadata
-
- All Implemented Interfaces:
StoreMetadata
,SchemaReader
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
DaVinciClientBasedMetadata
,ThinClientBasedMetadata
public abstract class VeniceClientBasedMetadata extends AbstractStoreMetadata
A store metadata abstraction that uses Venice clients to fetch the metadata and keep the local cache updated. There are currently two types implementations/clients for this. One is using a DaVinci client based metadata (deprecating it due to cyclic dependency when the application is also running DVCs) and a thin client based metadata.
-
-
Field Summary
-
Fields inherited from class com.linkedin.venice.fastclient.meta.AbstractStoreMetadata
routingStrategy, storeName
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VeniceClientBasedMetadata(ClientConfig clientConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
VeniceCompressor
getCompressor(CompressionStrategy compressionStrategy, int version)
int
getCurrentStoreVersion()
org.apache.avro.Schema
getKeySchema()
DerivedSchemaEntry
getLatestUpdateSchema()
org.apache.avro.Schema
getLatestValueSchema()
java.lang.Integer
getLatestValueSchemaId()
Get the latest value schema id.int
getPartitionId(int version, java.nio.ByteBuffer key)
java.util.List<java.lang.String>
getReplicas(int version, int partitionId)
protected abstract StoreMetaValue
getStoreMetaValue(StoreMetaKey key)
org.apache.avro.Schema
getUpdateSchema(int valueSchemaId)
org.apache.avro.Schema
getValueSchema(int id)
int
getValueSchemaId(org.apache.avro.Schema schema)
void
start()
-
Methods inherited from class com.linkedin.venice.fastclient.meta.AbstractStoreMetadata
getBatchGetLimit, getCompressor, getInstanceHealthMonitor, getPartitionId, getReplicas, getStoreName, setRoutingStrategy, trackHealthBasedOnRequestToInstance
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.fastclient.meta.StoreMetadata
getReplicas, isReady
-
-
-
-
Constructor Detail
-
VeniceClientBasedMetadata
protected VeniceClientBasedMetadata(ClientConfig clientConfig)
-
-
Method Detail
-
getCurrentStoreVersion
public int getCurrentStoreVersion()
-
getPartitionId
public int getPartitionId(int version, java.nio.ByteBuffer key)
-
getReplicas
public java.util.List<java.lang.String> getReplicas(int version, int partitionId)
-
getCompressor
public VeniceCompressor getCompressor(CompressionStrategy compressionStrategy, int version)
-
start
public void start()
-
getKeySchema
public org.apache.avro.Schema getKeySchema()
-
getValueSchema
public org.apache.avro.Schema getValueSchema(int id)
-
getValueSchemaId
public int getValueSchemaId(org.apache.avro.Schema schema)
-
getLatestValueSchema
public org.apache.avro.Schema getLatestValueSchema()
-
getLatestValueSchemaId
public java.lang.Integer getLatestValueSchemaId()
Description copied from interface:SchemaReader
Get the latest value schema id. This may be different from the value schema with the largest id if the superset schema is not the value schema with the largest id
-
getUpdateSchema
public org.apache.avro.Schema getUpdateSchema(int valueSchemaId)
-
getLatestUpdateSchema
public DerivedSchemaEntry getLatestUpdateSchema()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classAbstractStoreMetadata
- Throws:
java.io.IOException
-
getStoreMetaValue
protected abstract StoreMetaValue getStoreMetaValue(StoreMetaKey key)
-
-