Source:
<code>public KafkaIndexTask( @JsonProperty("id") String id, @JsonProperty("resource") TaskResource taskResource, @JsonProperty("dataSchema") DataSchema dataSchema, @JsonProperty("tuningConfig") KafkaTuningConfig tuningConfig, @JsonProperty("ioConfig") KafkaIOConfig ioConfig, @JsonProperty("context") Map<String, Object> context, @JacksonInject ChatHandlerProvider chatHandlerProvider, @JacksonInject AuthorizerMapper authorizerMapper ) { super( id == null ? makeTaskId(dataSchema.getDataSource(), RANDOM.nextInt()) : id, StringUtils.format("%s_%s", TYPE, dataSchema.getDataSource()), taskResource, dataSchema.getDataSource(), context ); this.dataSchema = Preconditions.checkNotNull(dataSchema, "dataSchema"); this.parser = Preconditions.checkNotNull((InputRowParser<ByteBuffer>) dataSchema.getParser(), "parser"); this.tuningConfig = Preconditions.checkNotNull(tuningConfig, "tuningConfig"); this.ioConfig = Preconditions.checkNotNull(ioConfig, "ioConfig"); this.chatHandlerProvider = Optional.fromNullable(chatHandlerProvider); this.authorizerMapper = authorizerMapper; this.endOffsets.putAll(ioConfig.getEndPartitions().getPartitionOffsetMap()); this.maxEndOffsets.putAll(endOffsets.entrySet() .stream() .collect(Collectors.toMap( Map.Entry::getKey, integerLongEntry -> Long.MAX_VALUE ))); this.topic = ioConfig.getStartPartitions().getTopic(); this.sequences = new CopyOnWriteArrayList<>(); <START> this.publishExecService = MoreExecutors.listeningDecorator(Execs.singleThreaded("publish-driver")); <END> }</code><technical_language>is create executor service else instead of constructor this executor created/started time a KafkaIndexTask instance is created e.g. user supervisor creates them</technical_language>

Target:
public KafkaIndexTask( @JsonProperty("id") String id, @JsonProperty("resource") TaskResource taskResource, @JsonProperty("dataSchema") DataSchema dataSchema, @JsonProperty("tuningConfig") KafkaTuningConfig tuningConfig, @JsonProperty("ioConfig") KafkaIOConfig ioConfig, @JsonProperty("context") Map<String, Object> context, @JacksonInject ChatHandlerProvider chatHandlerProvider, @JacksonInject AuthorizerMapper authorizerMapper ) { super( id == null ? makeTaskId(dataSchema.getDataSource(), RANDOM.nextInt()) : id, StringUtils.format("%s_%s", TYPE, dataSchema.getDataSource()), taskResource, dataSchema.getDataSource(), context ); this.dataSchema = Preconditions.checkNotNull(dataSchema, "dataSchema"); this.parser = Preconditions.checkNotNull((InputRowParser<ByteBuffer>) dataSchema.getParser(), "parser"); this.tuningConfig = Preconditions.checkNotNull(tuningConfig, "tuningConfig"); this.ioConfig = Preconditions.checkNotNull(ioConfig, "ioConfig"); this.chatHandlerProvider = Optional.fromNullable(chatHandlerProvider); this.authorizerMapper = authorizerMapper; this.endOffsets.putAll(ioConfig.getEndPartitions().getPartitionOffsetMap()); this.maxEndOffsets.putAll(endOffsets.entrySet() .stream() .collect(Collectors.toMap( Map.Entry::getKey, integerLongEntry -> Long.MAX_VALUE ))); this.topic = ioConfig.getStartPartitions().getTopic(); this.sequences = new CopyOnWriteArrayList<>(); if (context != null && context.get(KafkaSupervisor.IS_INCREMENTAL_HANDOFF_SUPPORTED) != null && ((boolean) context.get(KafkaSupervisor.IS_INCREMENTAL_HANDOFF_SUPPORTED))) { useLegacy = false; } else { useLegacy = true; } }