Source:
public void validate() { if (batchsize < 0) { exitWithMessageAndUsage("batch size number must be >= 0"); } if (flush <= 0) { exitWithMessageAndUsage("Periodic Flush Interval must be > 0"); } if (topic.trim().isEmpty()) { exitWithMessageAndUsage("Topic must be specified."); } if (zookeeper.trim().isEmpty() && brokers.trim().isEmpty()) { exitWithMessageAndUsage("Either Kafka Zookeeper or list of brokers must be specified."); } if (!zookeeper.trim().isEmpty() && !brokers.trim().isEmpty()) { exitWithMessageAndUsage("Only one of Kafka Zookeeper or list of brokers can be specified."); } if (procedure.trim().isEmpty() && table.trim().isEmpty()) { exitWithMessageAndUsage("procedure name or a table name required"); } if (!procedure.trim().isEmpty() && !table.trim().isEmpty()) { exitWithMessageAndUsage("Only a procedure name or a table name required, pass only one please"); } if (!procedure.trim().isEmpty()) { useSuppliedProcedure = true; } if ((useSuppliedProcedure) && (update)){ update = false; exitWithMessageAndUsage("update is not applicable when stored procedure specified"); } if (commitPolicy.trim().isEmpty()) { commitPolicy = KafkaImporterCommitPolicy.NONE.name(); } if (!servers.trim().isEmpty()) { warningWriter.println("Warning: --servers argument is deprecated; please use --host instead."); } if (!port.trim().isEmpty()) { warningWriter.println("Warning: --port argument is deprecated, please use --host with <host:port> URIs instead."); } if (kpartitions !=0) { warningWriter.println("Warning: --kpartions argument is deprecated, value is ignored."); } try { initializeCustomFormatter(); initializeDefaultsFromPropertiesFile(); } catch (Exception e) { System.err.println("Exception processing commandline arguments"); e.printStackTrace(); System.exit(-1); } }

Target:
public void validate() { if (batchsize < 0) { exitWithMessageAndUsage("batch size number must be >= 0"); } if (flush <= 0) { exitWithMessageAndUsage("Periodic Flush Interval must be > 0"); } if (topic.trim().isEmpty()) { exitWithMessageAndUsage("Topic must be specified."); } if (zookeeper.trim().isEmpty() && brokers.trim().isEmpty()) { exitWithMessageAndUsage("Either Kafka Zookeeper or list of brokers must be specified."); } if (!zookeeper.trim().isEmpty() && !brokers.trim().isEmpty()) { exitWithMessageAndUsage("Only one of Kafka Zookeeper or list of brokers can be specified."); } if (procedure.trim().isEmpty() && table.trim().isEmpty()) { exitWithMessageAndUsage("procedure name or a table name required"); } if (!procedure.trim().isEmpty() && !table.trim().isEmpty()) { exitWithMessageAndUsage("Only a procedure name or a table name required, pass only one please"); } if (!procedure.trim().isEmpty()) { useSuppliedProcedure = true; } if ((useSuppliedProcedure) && (update)){ update = false; exitWithMessageAndUsage("update is not applicable when stored procedure specified"); } if (commitPolicy.trim().isEmpty()) { commitPolicy = KafkaImporterCommitPolicy.NONE.name(); } if (!servers.trim().isEmpty()) { if (!host.trim().isEmpty()) { warningWriter.println("Warning: --servers argument is deprecated in favor of --host; value is ignored."); } else { warningWriter.println("Warning: --servers argument is deprecated; please use --host instead."); } } if (!port.trim().isEmpty()) { warningWriter.println("Warning: --port argument is deprecated, please use --host with <host:port> URIs instead."); } if (kpartitions !=0) { warningWriter.println("Warning: --kpartions argument is deprecated, value is ignored."); } if (!servers.trim().isEmpty() && !host.trim().isEmpty()) { } try { initializeCustomFormatter(); initializeDefaultsFromPropertiesFile(); } catch (Exception e) { System.err.println("Exception processing commandline arguments"); e.printStackTrace(); System.exit(-1); } }