ankitsultana commented on code in PR #15550:
URL: https://github.com/apache/pinot/pull/15550#discussion_r2045310571


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -961,7 +962,11 @@ private static String getPinotTaskName(String 
helixJobName) {
    * @return Task type
    */
   private static String getTaskType(String name) {
-    return name.split(TASK_NAME_SEPARATOR)[1];
+    String[] parts = name.split(TASK_NAME_SEPARATOR);
+    if (parts.length < 2) {
+      throw new IllegalArgumentException("Invalid task name (missing 
separator): " + name);

Review Comment:
   can you also add the separator in the message? Otherwise we'll have to go 
through the code to figure it out



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to