Package com.linkedin.venice
Class ZkCopier
- java.lang.Object
-
- com.linkedin.venice.ZkCopier
-
public class ZkCopier extends java.lang.Object
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
Constructors Constructor Description ZkCopier()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
extractVenicePaths(java.lang.String inputPath, java.lang.String outputPath, java.util.Set<java.lang.String> clusterNames, java.lang.String basePath)
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, java.util.Set<java.lang.String> clusterNames, java.lang.String basePath)
Migrate Venice-specific metadata from a source ZK to a destination ZK.
-
-
-
Method Detail
-
migrateVenicePaths
public static void migrateVenicePaths(org.apache.helix.zookeeper.impl.client.ZkClient srcZkClient, org.apache.helix.zookeeper.impl.client.ZkClient destZkClient, java.util.Set<java.lang.String> clusterNames, java.lang.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(java.lang.String inputPath, java.lang.String outputPath, java.util.Set<java.lang.String> clusterNames, java.lang.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
-
-