Skip to content

Conversation

@ctubbsii
Copy link
Member

  • Use LinkedHashMap for order-preserved mapping of volume replacements instead of a List of Pairs
  • Use this to simplify VolumeUtil.switchVolume
  • Rename VolumeUtil.switchVolumes to switchVolume so it's actually an overloaded method for LogEntry, rather than merely having a similar name
  • Also remove redundant trace logging for switching volumes for LogEntry, say "No replacement available" instead of the more concerning-sounding "Could not find replacement" (which implies there's supposed to be one, when it's fine if there isn't), and include the FileType in the trace log when the replacement is found

* Use LinkedHashMap for order-preserved mapping of volume replacements
  instead of a List of Pairs
* Use this to simplify VolumeUtil.switchVolume
* Rename VolumeUtil.switchVolumes to switchVolume so it's actually an
  overloaded method for LogEntry, rather than merely having a similar
  name
* Also remove redundant trace logging for switching volumes for
  LogEntry, say "No replacement available" instead of the more
  concerning-sounding "Could not find replacement" (which implies
  there's supposed to be one, when it's fine if there isn't), and
  include the FileType in the trace log when the replacement is found
@ctubbsii ctubbsii self-assigned this Dec 21, 2023
Copy link
Member

@DomGarguilo DomGarguilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement. Wonder if there are any other cases like this that can be replaced with a Map.

@ctubbsii ctubbsii merged commit a7aca33 into apache:main Dec 21, 2023
@ctubbsii ctubbsii deleted the use-map-instead-of-list-of-pairs branch December 21, 2023 19:22
asfgit pushed a commit that referenced this pull request Dec 21, 2023
@ctubbsii ctubbsii added this to the 3.1.0 milestone Jul 12, 2024
@ctubbsii ctubbsii modified the milestones: 3.1.0, 4.0.0 Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants