ableegoldman commented on a change in pull request #10755:
URL: https://github.com/apache/kafka/pull/10755#discussion_r639356381



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/TaskId.java
##########
@@ -80,6 +83,35 @@ public String toString() {
         return namedTopology != null ? namedTopology + "_" + topicGroupId + 
"_" + partition : topicGroupId + "_" + partition;
     }
 
+    /**
+     * @throws TaskIdFormatException if the taskIdStr is not a valid {@link 
TaskId}
+     */
+    public static TaskId parse(final String taskIdStr) {

Review comment:
       Well that would be a breaking change by removing a non-deprecated API, 
no? And in this case I actually believe we should _not_ deprecate it -- if 
`toString` is part of the public TaskId API (and it should be) then this 
`parse` method which does the reverse should be as well. As I discussed with 
some during the KIP-740 ~debacle~ debate, part of the public contract of TaskId 
is in its string representation since that is what ends up in logs, metrics, 
etc. So imo it does make sense to provide a String-to-TaskId API




-- 
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:
us...@infra.apache.org


Reply via email to