kafka.tools
Class KafkaMigrationTool

java.lang.Object
  extended by kafka.tools.KafkaMigrationTool

public class KafkaMigrationTool
extends java.lang.Object

This is a kafka 0.7 to 0.8 online migration tool used for migrating data from 0.7 to 0.8 cluster. Internally, it's composed of a kafka 0.7 consumer and kafka 0.8 producer. The kafka 0.7 consumer consumes data from the 0.7 cluster, and the kafka 0.8 producer produces data to the 0.8 cluster. The 0.7 consumer is loaded from kafka 0.7 jar using a "parent last, child first" java class loader. Ordinary class loader is "parent first, child last", and kafka 0.8 and 0.7 both have classes for a lot of class names like "kafka.consumer.Consumer", etc., so ordinary java URLClassLoader with kafka 0.7 jar will will still load the 0.8 version class. As kafka 0.7 and kafka 0.8 used different version of zkClient, the zkClient jar used by kafka 0.7 should also be used by the class loader. The user need to provide the configuration file for 0.7 consumer and 0.8 producer. For 0.8 producer, the "serializer.class" config is set to "kafka.serializer.DefaultEncoder" by the code.


Constructor Summary
KafkaMigrationTool()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KafkaMigrationTool

public KafkaMigrationTool()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.InterruptedException,
                        java.io.IOException
Throws:
java.lang.InterruptedException
java.io.IOException