b-slim commented on a change in pull request #6431: Add Kinesis Indexing
Service to core Druid
URL: https://github.com/apache/incubator-druid/pull/6431#discussion_r223516311
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java
##########
@@ -16,55 +16,61 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.druid.indexing.kafka;
+package org.apache.druid.indexing.seekablestream;
+
import com.google.common.annotations.VisibleForTesting;
import org.apache.druid.indexer.TaskStatus;
import org.apache.druid.indexing.common.TaskToolbox;
import org.apache.druid.indexing.common.stats.RowIngestionMeters;
-import org.apache.druid.indexing.kafka.KafkaIndexTask.Status;
import org.apache.druid.segment.realtime.appenderator.Appenderator;
import org.apache.druid.segment.realtime.firehose.ChatHandler;
import javax.ws.rs.core.Response;
import java.util.Map;
/**
- * This class is used by only {@link KafkaIndexTask}. We currently have two
implementations of this interface, i.e.,
- * {@link IncrementalPublishingKafkaIndexTaskRunner} and {@link
LegacyKafkaIndexTaskRunner}. The latter one was used in
- * the versions prior to 0.12.0, but being kept to support rolling update from
them.
+ * Interface for abstracting the indexing task run logic. Only used by Kafka
indexing tasks,
+ * but will also be used by Kinesis indexing tasks once implemented
*
- * We don't have a good reason for having this interface except for better
code maintenance for the latest kakfa
- * indexing algorithm. As a result, this interface can be removed in the
future when {@link LegacyKafkaIndexTaskRunner}
- * is removed and it's no longer useful.
+ * @param <T1> Partition Number Type
+ * @param <T2> Sequence Number Type
*/
-public interface KafkaIndexTaskRunner extends ChatHandler
+public interface SeekableStreamIndexTaskRunner<T1, T2> extends ChatHandler
{
Appenderator getAppenderator();
+ /**
+ * Run the task
Review comment:
please avoid repeating the code it self as a comment. In general if the
comment does not add any information to the reader then there is no need for
it. Reading the method signature i can tell that is running something since it
is called run... same for stop.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]