You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/13 20:49:36 UTC

[GitHub] [incubator-druid] surekhasaharan commented on a change in pull request #8810: Make submit task API similar to supervisor API

surekhasaharan commented on a change in pull request #8810: Make submit task API similar to supervisor API
URL: https://github.com/apache/incubator-druid/pull/8810#discussion_r344464621
 
 

 ##########
 File path: indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java
 ##########
 @@ -123,9 +123,26 @@
   private static final HashFunction HASH_FUNCTION = Hashing.murmur3_128();
   private static final String TYPE = "index";
 
-  private static String makeGroupId(IndexIngestionSpec ingestionSchema)
+  private static String makeGroupId(
+      IndexIngestionSpec ingestionSchema,
+      DataSchema dataSchema,
+      IndexIOConfig ioConfig,
+      TuningConfig tuningConfig
+  )
   {
-    return makeGroupId(ingestionSchema.ioConfig.appendToExisting, ingestionSchema.dataSchema.getDataSource());
+    final boolean isValid = (ingestionSchema != null) ^ (dataSchema != null
+                                                         && ioConfig != null
+                                                         && tuningConfig != null);
+    if (!isValid) {
+      throw new ISE("invalid spec input");
+    }
+    if (ingestionSchema == null) {
+      assert (ioConfig != null);
+      assert (dataSchema != null);
 
 Review comment:
   these were added because of lgtm warnings

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org