public class DataGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
_count |
protected java.lang.String |
_offsetsDir |
protected kafka.javaapi.producer.Producer |
_producer |
protected Props |
_props |
protected java.lang.String |
_topic |
protected java.net.URI |
_uri |
protected int |
CONNECT_TIMEOUT |
protected static java.util.Random |
RANDOM |
protected int |
RECONNECT_INTERVAL |
protected int |
TCP_BUFFER_SIZE |
Constructor and Description |
---|
DataGenerator(java.lang.String id,
Props props) |
Modifier and Type | Method and Description |
---|---|
protected void |
generateOffsets() |
static void |
main(java.lang.String[] args) |
void |
run() |
protected static final java.util.Random RANDOM
protected Props _props
protected kafka.javaapi.producer.Producer _producer
protected java.net.URI _uri
protected java.lang.String _topic
protected int _count
protected java.lang.String _offsetsDir
protected final int TCP_BUFFER_SIZE
protected final int CONNECT_TIMEOUT
protected final int RECONNECT_INTERVAL
public DataGenerator(java.lang.String id, Props props) throws java.lang.Exception
java.lang.Exception
public void run() throws java.lang.Exception
java.lang.Exception
protected void generateOffsets() throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception