[
https://issues.apache.org/jira/browse/SOLR-11487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated SOLR-11487:
--------------------------------
Attachment: SOLR_11487.patch
I admit I'm getting a bit obsessive over Aliases.java. My problem, not yours.
Check out my latest version Gus; I hope you find my changes are improvements.
* Due to a bug, we weren't _actually_ keeping back-compat of the format of
aliases.json. In toJSON, building the new map was fine but it ultimately used
the original map to actually serialize. Doh! I added a test for this and
fixed the bug.
* Refactored away the presence of the top level map "aliasMap" so that instead
it's only used in toJSON & fromJSON. Aliases now has two fields for both child
maps on Aliases, both non-null.
* Moved the comma delimited parsing from Aliases constructor to fromJSON since
that's where we expect it to be needed.
* Aliases constructor is now trivial but its docs insist that it's callers
ensure that deeply nested collections are unmodifiable. So it's 3 callers now
ensure that.
* less clone related method LOC; IMO it looks simpler.
* more consistently used LinkedHashMap instead of HashMap (no big deal)
Net change was around ~60 lines of fewer code with other misc things since the
last patch.
BTW I discovered Map.replaceAll which made it easy to replace deeply nested
collections with unmodifiable ones
> Collection Alias metadata for time partitioned collections
> ----------------------------------------------------------
>
> Key: SOLR-11487
> URL: https://issues.apache.org/jira/browse/SOLR-11487
> Project: Solr
> Issue Type: Sub-task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrCloud
> Reporter: David Smiley
> Attachments: SOLR_11487.patch, SOLR_11487.patch, SOLR_11487.patch,
> SOLR_11487.patch, SOLR_11487.patch, SOLR_11487.patch, SOLR_11487.patch,
> SOLR_11487.patch, SOLR_11487.patch
>
>
> SOLR-11299 outlines an approach to using a collection Alias to refer to a
> series of collections of a time series. We'll need to store some metadata
> about these time series collections, such as which field of the document
> contains the timestamp to route on.
> The current {{/aliases.json}} is a Map with a key {{collection}} which is in
> turn a Map of alias name strings to a comma delimited list of the collections.
> _If we change the comma delimited list to be another Map to hold the existing
> list and more stuff, older CloudSolrClient (configured to talk to ZooKeeper)
> will break_. Although if it's configured with an HTTP Solr URL then it would
> not break. There's also some read/write hassle to worry about -- we may need
> to continue to read an aliases.json in the older format.
> Alternatively, we could add a new map entry to aliases.json, say,
> {{collection_metadata}} keyed by alias name?
> Perhaps another very different approach is to attach metadata to the
> configset in use?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]