GWphua commented on code in PR #18853:
URL: https://github.com/apache/druid/pull/18853#discussion_r2629733294


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/UpdateLocationAction.java:
##########
@@ -23,26 +23,34 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.google.common.base.Optional;
+import org.apache.druid.error.InvalidInput;
 import org.apache.druid.indexer.TaskLocation;
 import org.apache.druid.indexing.common.task.Task;
 import org.apache.druid.indexing.overlord.TaskRunner;
 
+import java.util.Objects;
+
+/**
+ * Notifies the Overlord that the location of a task is now updated.
+ * Used when running K8s-based tasks in encapsulated mode.
+ */
 public class UpdateLocationAction implements TaskAction<Void>
 {
-  private final TaskLocation taskLocation;
+  private final TaskLocation location;
 
   @JsonCreator
   public UpdateLocationAction(
       @JsonProperty("location") TaskLocation location
   )
   {
-    this.taskLocation = location;
+    InvalidInput.conditionalException(location != null, "No task location 
specified");

Review Comment:
   What is the difference between `InvalidInput` and 
`Preconditions.checkNotNull`?
   
   I'm thinking it may be neater to standardise the usage in the codebase?



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