jon-wei commented on code in PR #12488:
URL: https://github.com/apache/druid/pull/12488#discussion_r878537193


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/AbstractTask.java:
##########
@@ -219,4 +269,75 @@ protected boolean isUseMaxMemoryEstimates()
         Tasks.DEFAULT_USE_MAX_MEMORY_ESTIMATES
     );
   }
+
+  protected ServiceMetricEvent.Builder getMetricBuilder()
+  {
+    return metricBuilder;
+  }
+
+  public IngestionMode getIngestionMode()
+  {
+    return ingestionMode;
+  }
+
+  protected static IngestionMode computeIngestionMode(@Nullable 
CompactionIOConfig ioConfig)

Review Comment:
   Suggest distinguishing these two `computeIngestionMode` methods with 
different names since they both have nullable parameters



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/AbstractTask.java:
##########
@@ -219,4 +269,75 @@ protected boolean isUseMaxMemoryEstimates()
         Tasks.DEFAULT_USE_MAX_MEMORY_ESTIMATES
     );
   }
+
+  protected ServiceMetricEvent.Builder getMetricBuilder()
+  {
+    return metricBuilder;
+  }
+
+  public IngestionMode getIngestionMode()
+  {
+    return ingestionMode;
+  }
+
+  protected static IngestionMode computeIngestionMode(@Nullable 
CompactionIOConfig ioConfig)
+  {
+    final boolean isAppendToExisting;
+    final boolean isDropExisting;
+
+    if (ioConfig == null) {
+      isAppendToExisting = BatchIOConfig.DEFAULT_APPEND_EXISTING;
+      isDropExisting = BatchIOConfig.DEFAULT_DROP_EXISTING;
+    } else {
+      isAppendToExisting = BatchIOConfig.DEFAULT_APPEND_EXISTING;

Review Comment:
   How come this uses the default from BatchIOConfig instead of using 
ioConfig.isAppendToExisting()



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to