[ https://issues.apache.org/jira/browse/KAFKA-5515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152596#comment-16152596 ]
ASF GitHub Bot commented on KAFKA-5515: --------------------------------------- GitHub user dguy opened a pull request: https://github.com/apache/kafka/pull/3783 KAFKA-5515: Remove date formatting from Segments Remove date formatting from `Segments` and use the `segementId` instead. Add tests to make sure can load old segments. Rename old segment dirs to new formatting at load time. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dguy/kafka kafka-5515 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3783.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3783 ---- commit 2a6220f3d8302e2edcd78de666cb1f4a4909b0e3 Author: Damian Guy <damian....@gmail.com> Date: 2017-09-04T12:29:12Z blah commit c62b086d5a46f4df91fb166f958d407b11bb9942 Author: Damian Guy <damian....@gmail.com> Date: 2017-09-04T13:05:36Z use segment id rather than date ---- > Consider removing date formatting from Segments class > ----------------------------------------------------- > > Key: KAFKA-5515 > URL: https://issues.apache.org/jira/browse/KAFKA-5515 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Bill Bejeck > Assignee: Damian Guy > Labels: performance > > Currently the {{Segments}} class uses a date when calculating the segment id > and uses {{SimpleDateFormat}} for formatting the segment id. However this is > a high volume code path and creating a new {{SimpleDateFormat}} and > formatting each segment id is expensive. We should look into removing the > date from the segment id or at a minimum use a faster alternative to > {{SimpleDateFormat}}. We should also consider keeping a lookup of existing > segments to avoid as many string operations as possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)