container-common/src/main/java/com/streamsets/datacollector/main/RuntimeInfo.java
public static void storeControlHubConfigs(
      RuntimeInfo runtimeInfo,
      Map<String, String> newConfigs
  ) throws IOException {
    File configFile = new File(runtimeInfo.getDataDir(), SCH_CONF_OVERRIDE);
    Properties properties = new Properties();

    // Load existing properties from disk if they exists
    if(configFile.exists()) {
      try (FileReader reader = new FileReader(configFile)) {
        properties.load(reader);
      }
    }

    // Propagate updated configuration
    for(Map.Entry<String, String> entry : newConfigs.entrySet()) {
      if(entry.getValue() == null) {
        properties.remove(entry.getKey());
      } else {
        properties.setProperty(entry.getKey(), entry.getValue());
      }
    }

    // Store the new updated configuration back to disk
    try(FileWriter writer = new FileWriter(configFile)) {
      properties.store(writer, null);
    }
  }
public static void storeControlHubConfigs(
      RuntimeInfo runtimeInfo,
      Map<String, String> newConfigs
  ) throws IOException {
    File configFile = new File(runtimeInfo.getDataDir(), SCH_CONF_OVERRIDE);
    Properties properties = new Properties();

    // Load existing properties from disk if they exists
    if(configFile.exists()) {
      try (FileReader reader = new FileReader(configFile)) {
        properties.load(reader);
      }
    }

    // Propagate updated configuration
    for(Map.Entry<String, String> entry : newConfigs.entrySet()) {
      if(entry.getValue() == null) {
        properties.remove(entry.getKey());
      } else {
        properties.setProperty(entry.getKey(), entry.getValue());
      }
    }

    // Store the new updated configuration back to disk
    try(FileWriter writer = new FileWriter(configFile)) {
      properties.store(writer, null);
    }
  }
Store configuration from control hub in persistent manner inside data directory. This configuration will be
loaded on data collector start and will override any configuration from sdc.properties.

This method call is able to remove existing properties if the value is "null". Please note that the removal will
only happen from the 'override' file. This method does not have the capability to remove configuration directly
from sdc.properties.

@param runtimeInfo RuntimeInfo instance
@param newConfigs New set of config properties
@throws IOException