/** * @return the set of SystemStreams which were configured as bootstrap streams. */ public Set<SystemStream> getBootstrapStreams() { Set<SystemStream> bootstrapInputs = new HashSet<>(); Set<SystemStream> allInputs = taskConfigJava.getAllInputStreams(); for (SystemStream systemStream : allInputs) { if (streamConfig.getBootstrapEnabled(systemStream)) { bootstrapInputs.add(systemStream); } } return Collections.unmodifiableSet(bootstrapInputs); }
/** * @return the set of SystemStreams which were configured as bootstrap streams. */ public Set<SystemStream> getBootstrapStreams() { Set<SystemStream> bootstrapInputs = new HashSet<>(); Set<SystemStream> allInputs = taskConfigJava.getAllInputStreams(); for (SystemStream systemStream : allInputs) { if (streamConfig.getBootstrapEnabled(systemStream)) { bootstrapInputs.add(systemStream); } } return Collections.unmodifiableSet(bootstrapInputs); }
/** * @return the set of SystemStreams which were configured as bootstrap streams. */ public Set<SystemStream> getBootstrapStreams() { Set<SystemStream> bootstrapInputs = new HashSet<>(); Set<SystemStream> allInputs = taskConfigJava.getAllInputStreams(); for (SystemStream systemStream : allInputs) { if (streamConfig.getBootstrapEnabled(systemStream)) { bootstrapInputs.add(systemStream); } } return Collections.unmodifiableSet(bootstrapInputs); }
/** * @return the set of SystemStreams which were configured as bootstrap streams. */ public Set<SystemStream> getBootstrapStreams() { Set<SystemStream> bootstrapInputs = new HashSet<>(); Set<SystemStream> allInputs = taskConfigJava.getAllInputStreams(); for (SystemStream systemStream : allInputs) { if (streamConfig.getBootstrapEnabled(systemStream)) { bootstrapInputs.add(systemStream); } } return Collections.unmodifiableSet(bootstrapInputs); }
/** * @return the set of SystemStreams which were configured as bootstrap streams. */ public Set<SystemStream> getBootstrapStreams() { Set<SystemStream> bootstrapInputs = new HashSet<>(); Set<SystemStream> allInputs = taskConfigJava.getAllInputStreams(); for (SystemStream systemStream : allInputs) { if (streamConfig.getBootstrapEnabled(systemStream)) { bootstrapInputs.add(systemStream); } } return Collections.unmodifiableSet(bootstrapInputs); }
protected void validateConfig(String system, Config config) { // Kinesis system does not support groupers other than AllSspToSingleTaskGrouper JobConfig jobConfig = new JobConfig(config); if (!jobConfig.getSystemStreamPartitionGrouperFactory().equals( AllSspToSingleTaskGrouperFactory.class.getCanonicalName())) { String errMsg = String.format("Incorrect Grouper %s used for KinesisSystemConsumer %s. Please set the %s config" + " to %s.", jobConfig.getSystemStreamPartitionGrouperFactory(), system, JobConfig.SSP_GROUPER_FACTORY(), AllSspToSingleTaskGrouperFactory.class.getCanonicalName()); throw new ConfigException(errMsg); } // Kinesis streams cannot be configured as broadcast streams TaskConfigJava taskConfig = new TaskConfigJava(config); if (taskConfig.getBroadcastSystemStreams().stream().anyMatch(ss -> system.equals(ss.getSystem()))) { throw new ConfigException("Kinesis streams cannot be configured as broadcast streams."); } // Kinesis streams cannot be configured as bootstrap streams KinesisConfig kConfig = new KinesisConfig(config); kConfig.getKinesisStreams(system).forEach(stream -> { StreamConfig streamConfig = new StreamConfig(kConfig); SystemStream ss = new SystemStream(system, stream); if (streamConfig.getBootstrapEnabled(ss)) { throw new ConfigException("Kinesis streams cannot be configured as bootstrap streams."); } }); } }