From 6339da9d6d6dbc69f3973466a8c7542d214322ef Mon Sep 17 00:00:00 2001 From: Ben Osheroff Date: Mon, 9 Mar 2015 16:10:54 -0700 Subject: [PATCH] add position_file parameter --- src/main/java/com/zendesk/maxwell/MaxwellConfig.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/zendesk/maxwell/MaxwellConfig.java b/src/main/java/com/zendesk/maxwell/MaxwellConfig.java index d40278896..49a96eb51 100644 --- a/src/main/java/com/zendesk/maxwell/MaxwellConfig.java +++ b/src/main/java/com/zendesk/maxwell/MaxwellConfig.java @@ -77,6 +77,7 @@ private void parseOptions(String [] argv) { parser.accepts( "user" ).withRequiredArg(); parser.accepts( "port" ).withRequiredArg(); parser.accepts( "producer" ).withRequiredArg(); + parser.accepts( "position_file" ).withRequiredArg(); parser.accepts( "kafka.bootstrap.servers" ).withRequiredArg(); OptionSet options = parser.parse(argv); @@ -91,6 +92,8 @@ private void parseOptions(String [] argv) { this.mysqlPort = Integer.valueOf((String) options.valueOf("port")); if ( options.has("producer")) this.producerType = (String) options.valueOf("producer"); + if ( options.has("position_file")) + this.currentPositionFile = (String) options.valueOf("position_file"); if ( options.has("kafka.bootstrap.servers")) this.kafkaProperties.setProperty("bootstrap.servers", (String) options.valueOf("kafka.bootstrap.servers"));