@Override public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) { Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null."); Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(), "Default system must be set before creating any input or output streams."); addSystemDescriptor(defaultSystemDescriptor); defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor); return (S) this; }
@Override public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) { Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null."); Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(), "Default system must be set before creating any input or output streams."); addSystemDescriptor(defaultSystemDescriptor); defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor); return (S) this; }
@Override public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) { Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null."); Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(), "Default system must be set before creating any input or output streams."); addSystemDescriptor(defaultSystemDescriptor); defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor); return (S) this; }
@Override public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) { Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null."); Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(), "Default system must be set before creating any input or output streams."); addSystemDescriptor(defaultSystemDescriptor); defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor); return (S) this; }
@Override public S withDefaultSystem(SystemDescriptor<?> defaultSystemDescriptor) { Preconditions.checkNotNull(defaultSystemDescriptor, "Provided defaultSystemDescriptor must not be null."); Preconditions.checkState(getInputStreamIds().isEmpty() && getOutputStreamIds().isEmpty(), "Default system must be set before creating any input or output streams."); addSystemDescriptor(defaultSystemDescriptor); defaultSystemDescriptorOptional = Optional.of(defaultSystemDescriptor); return (S) this; }
private Map<String, String> getGeneratedConfig(String runId) { Map<String, String> generatedConfig = new HashMap<>(); if (StringUtils.isNoneEmpty(runId)) { generatedConfig.put(ApplicationConfig.APP_RUN_ID, runId); } StreamConfig streamConfig = new StreamConfig(userConfig); Set<String> inputStreamIds = new HashSet<>(appDesc.getInputStreamIds()); inputStreamIds.removeAll(appDesc.getOutputStreamIds()); // exclude intermediate streams ApplicationConfig.ApplicationMode mode = inputStreamIds.stream().allMatch(streamConfig::getIsBounded) ? ApplicationConfig.ApplicationMode.BATCH : ApplicationConfig.ApplicationMode.STREAM; generatedConfig.put(ApplicationConfig.APP_MODE, mode.name()); Map<String, String> systemStreamConfigs = generateSystemStreamConfigs(appDesc); generatedConfig.putAll(systemStreamConfigs); // adding app.class in the configuration, unless it is LegacyTaskApplication if (!LegacyTaskApplication.class.getName().equals(appDesc.getAppClass().getName())) { generatedConfig.put(ApplicationConfig.APP_CLASS, appDesc.getAppClass().getName()); } return generatedConfig; }
private Map<String, String> getGeneratedConfig(String runId) { Map<String, String> generatedConfig = new HashMap<>(); if (StringUtils.isNoneEmpty(runId)) { generatedConfig.put(ApplicationConfig.APP_RUN_ID, runId); } StreamConfig streamConfig = new StreamConfig(userConfig); Set<String> inputStreamIds = new HashSet<>(appDesc.getInputStreamIds()); inputStreamIds.removeAll(appDesc.getOutputStreamIds()); // exclude intermediate streams ApplicationConfig.ApplicationMode mode = inputStreamIds.stream().allMatch(streamConfig::getIsBounded) ? ApplicationConfig.ApplicationMode.BATCH : ApplicationConfig.ApplicationMode.STREAM; generatedConfig.put(ApplicationConfig.APP_MODE, mode.name()); Map<String, String> systemStreamConfigs = generateSystemStreamConfigs(appDesc); generatedConfig.putAll(systemStreamConfigs); // adding app.class in the configuration, unless it is LegacyTaskApplication if (!LegacyTaskApplication.class.getName().equals(appDesc.getAppClass().getName())) { generatedConfig.put(ApplicationConfig.APP_CLASS, appDesc.getAppClass().getName()); } return generatedConfig; }
private Map<String, String> getGeneratedConfig(String runId) { Map<String, String> generatedConfig = new HashMap<>(); if (StringUtils.isNoneEmpty(runId)) { generatedConfig.put(ApplicationConfig.APP_RUN_ID, runId); } StreamConfig streamConfig = new StreamConfig(userConfig); Set<String> inputStreamIds = new HashSet<>(appDesc.getInputStreamIds()); inputStreamIds.removeAll(appDesc.getOutputStreamIds()); // exclude intermediate streams ApplicationConfig.ApplicationMode mode = inputStreamIds.stream().allMatch(streamConfig::getIsBounded) ? ApplicationConfig.ApplicationMode.BATCH : ApplicationConfig.ApplicationMode.STREAM; generatedConfig.put(ApplicationConfig.APP_MODE, mode.name()); Map<String, String> systemStreamConfigs = generateSystemStreamConfigs(appDesc); generatedConfig.putAll(systemStreamConfigs); // adding app.class in the configuration, unless it is LegacyTaskApplication if (!LegacyTaskApplication.class.getName().equals(appDesc.getAppClass().getName())) { generatedConfig.put(ApplicationConfig.APP_CLASS, appDesc.getAppClass().getName()); } return generatedConfig; }
private Map<String, String> getGeneratedConfig(String runId) { Map<String, String> generatedConfig = new HashMap<>(); if (StringUtils.isNoneEmpty(runId)) { generatedConfig.put(ApplicationConfig.APP_RUN_ID, runId); } StreamConfig streamConfig = new StreamConfig(userConfig); Set<String> inputStreamIds = new HashSet<>(appDesc.getInputStreamIds()); inputStreamIds.removeAll(appDesc.getOutputStreamIds()); // exclude intermediate streams ApplicationConfig.ApplicationMode mode = inputStreamIds.stream().allMatch(streamConfig::getIsBounded) ? ApplicationConfig.ApplicationMode.BATCH : ApplicationConfig.ApplicationMode.STREAM; generatedConfig.put(ApplicationConfig.APP_MODE, mode.name()); Map<String, String> systemStreamConfigs = generateSystemStreamConfigs(appDesc); generatedConfig.putAll(systemStreamConfigs); // adding app.class in the configuration, unless it is LegacyTaskApplication if (!LegacyTaskApplication.class.getName().equals(appDesc.getAppClass().getName())) { generatedConfig.put(ApplicationConfig.APP_CLASS, appDesc.getAppClass().getName()); } return generatedConfig; }
private Map<String, String> getGeneratedConfig(String runId) { Map<String, String> generatedConfig = new HashMap<>(); if (StringUtils.isNoneEmpty(runId)) { generatedConfig.put(ApplicationConfig.APP_RUN_ID, runId); } StreamConfig streamConfig = new StreamConfig(userConfig); Set<String> inputStreamIds = new HashSet<>(appDesc.getInputStreamIds()); inputStreamIds.removeAll(appDesc.getOutputStreamIds()); // exclude intermediate streams ApplicationConfig.ApplicationMode mode = inputStreamIds.stream().allMatch(streamConfig::getIsBounded) ? ApplicationConfig.ApplicationMode.BATCH : ApplicationConfig.ApplicationMode.STREAM; generatedConfig.put(ApplicationConfig.APP_MODE, mode.name()); Map<String, String> systemStreamConfigs = generateSystemStreamConfigs(appDesc); generatedConfig.putAll(systemStreamConfigs); // adding app.class in the configuration, unless it is LegacyTaskApplication if (!LegacyTaskApplication.class.getName().equals(appDesc.getAppClass().getName())) { generatedConfig.put(ApplicationConfig.APP_CLASS, appDesc.getAppClass().getName()); } return generatedConfig; }
Set<StreamSpec> sinkStreams = getStreamSpecs(appDesc.getOutputStreamIds(), streamConfig);
Set<StreamSpec> sinkStreams = getStreamSpecs(appDesc.getOutputStreamIds(), streamConfig);
Set<StreamSpec> sinkStreams = getStreamSpecs(appDesc.getOutputStreamIds(), streamConfig);
Set<StreamSpec> sinkStreams = getStreamSpecs(appDesc.getOutputStreamIds(), streamConfig);
Set<StreamSpec> sinkStreams = getStreamSpecs(appDesc.getOutputStreamIds(), streamConfig);