Search in sources :

Example 1 with JobConfigOverlay

use of com.ibm.streamsx.topology.internal.streams.JobConfigOverlay in project streamsx.topology by IBMStreams.

the class JSONStreamsContext method addConfigToDeploy.

/**
     * Convert the config information into the JSON deploy.
     */
private static void addConfigToDeploy(JsonObject deploy, Map<String, Object> config) {
    // For job configuration information we convert to a job
    // config overlay
    JobConfig jc = JobConfig.fromProperties(config);
    JobConfigOverlay jco = new JobConfigOverlay(jc);
    jco.fullOverlayAsJSON(deploy);
    for (String key : config.keySet()) {
        if (CONFIG_SKIP_KEYS.contains(key))
            continue;
        try {
            deploy.add(key, convertConfigValue(config.get(key)));
        } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Unknown type for config:" + key + " - " + e.getMessage());
        }
    }
}
Also used : JobConfigOverlay(com.ibm.streamsx.topology.internal.streams.JobConfigOverlay) JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig)

Aggregations

JobConfigOverlay (com.ibm.streamsx.topology.internal.streams.JobConfigOverlay)1 JobConfig (com.ibm.streamsx.topology.jobconfig.JobConfig)1