Package com.linkedin.venice
Class ZkCopier
java.lang.Object
com.linkedin.venice.ZkCopier
This class contains methods to 1)migrate Venice-specific metadata from a source ZooKeeper (ZK) to a destination ZK and 2)extract Venice-specific paths from an input text file containing ZK paths to an output text file. We implement a tree data structure to represent ZK paths as nested children and use it to filter out Venice-specific paths efficiently.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Extract Venice-specific paths from an input text file to an output text file.static void
migrateVenicePaths
(org.apache.helix.zookeeper.impl.client.ZkClient srcZkClient, org.apache.helix.zookeeper.impl.client.ZkClient destZkClient, Set<String> clusterNames, String basePath) Migrate Venice-specific metadata from a source ZK to a destination ZK.
-
Constructor Details
-
ZkCopier
public ZkCopier()
-
-
Method Details
-
migrateVenicePaths
public static void migrateVenicePaths(org.apache.helix.zookeeper.impl.client.ZkClient srcZkClient, org.apache.helix.zookeeper.impl.client.ZkClient destZkClient, Set<String> clusterNames, String basePath) Migrate Venice-specific metadata from a source ZK to a destination ZK.- Parameters:
srcZkClient
- source ZK clientdestZkClient
- destination ZK clientclusterNames
- set of cluster namesbasePath
- base path for ZK
-
extractVenicePaths
public static void extractVenicePaths(String inputPath, String outputPath, Set<String> clusterNames, String basePath) Extract Venice-specific paths from an input text file to an output text file.- Parameters:
inputPath
- absolute path to the ZK snapshot input text file, which contains one path per lineoutputPath
- absolute path to output text file with extracted Venice-specific paths, which contains one path per lineclusterNames
- set of cluster namesbasePath
- base path for ZK
-