Package com.linkedin.venice.persona
Class StoragePersonaAccessor
java.lang.Object
com.linkedin.venice.persona.StoragePersonaAccessor
Zookeeper accessor for
StoragePersona
objects, allowing for read/write to persona paths.
The data structure on ZK would be: /Persona/StoragePersona/$name, where $name is specified at creation. Nothing in the accessor is cached locally.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStoragePersonaAccessor
(String clusterName, HelixAdapterSerializer adapter, org.apache.helix.zookeeper.impl.client.ZkClient zkClient) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPersona
(String name) void
createPersona
(StoragePersona persona) void
Note that this method does not return an error if the persona already exists.void
deletePersona
(StoragePersona persona) void
deletePersona
(String personaName) getPersonaFromZk
(String name) void
updatePersona
(StoragePersona persona)
-
Field Details
-
STORAGE_PERSONA_SUB_PATH
- See Also:
-
-
Constructor Details
-
StoragePersonaAccessor
public StoragePersonaAccessor(String clusterName, HelixAdapterSerializer adapter, org.apache.helix.zookeeper.impl.client.ZkClient zkClient)
-
-
Method Details
-
createPersona
public void createPersona(String name, long quotaNumber, Set<String> storesToEnforce, Set<String> owners) Note that this method does not return an error if the persona already exists. It is up to the caller, i.e.StoragePersonaRepository
to throw an error in this case. -
createPersona
-
updatePersona
-
deletePersona
-
deletePersona
-
containsPersona
-
getPersonaFromZk
-
getAllPersonasFromZk
-