public static void main(String[] args) {
    CoordinatorStreamWriterCommandLine cmdline = new CoordinatorStreamWriterCommandLine();
    OptionSet options = cmdline.parser().parse(args);
    Config userConfig = cmdline.loadConfig(options);
    Config generatedConfig = JobPlanner.generateSingleJobConfig(userConfig);
    String type = cmdline.loadType(options);
    String key = cmdline.loadKey(options);
    String value = cmdline.loadValue(options);

    CoordinatorStreamWriter writer = new CoordinatorStreamWriter(generatedConfig);
    writer.start();
    writer.sendMessage(type, key, value);
    writer.stop();
  }
Main function for using the CoordinatorStreamWriter. The main function starts a CoordinatorStreamWriter
and sends control messages.
To run the code use the following command:
{path to samza deployment}/samza/bin/run-coordinator-stream-writer.sh  --config job.config.loader.factory={config-loader-factory} --config job.config.loader.properties{properties needed for config loader to load config} --type={type of the message} --key={[optional] key of the message} --value={[optional] value of the message}

@param args input arguments for running the writer. These arguments are:
            "type" = type of the message being written
            "key" = [optional] key of the message being written
            "value" = [optional] value of the message being written
samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java