public void sendMessage(String type, String key, String value) {
    //TODO: validate keys and values
    if (type.equals(SET_CONFIG_TYPE)) {
      sendSetConfigMessage(key, value);
    } else {
      throw new IllegalArgumentException("Type is invalid. The possible values are {" + SET_CONFIG_TYPE + "}");
    }
  }
This method sends a message to the coordinator stream. This creates a message containing (type,key,value).
For example if you want to set the number of yarn containers to 3, you would use
("set-config", "yarn.container.count", "3").

@param type  defines the kind of message of the control message from the set {"set-config"}.
@param key   defines a key to associate with the value.  This can be null for messages with no key or value.
@param value defines the value being sent along with the message. This can be null for messages with no value.
samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java