[
https://issues.apache.org/jira/browse/SOLR-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451408#comment-13451408
]
Yonik Seeley commented on SOLR-3755:
------------------------------------
bq. Make Slice subclass ZkNodeProps
After a lot of code modification, I've realized that "ZkNodeProps" was probably
supposed to be the same as "Replica". I was fooled by thinking it was generic
properties in ZK on any type of node (slice, replica, or whatever), and that
was reinforced by it's use in other context as generic properties (messages in
the overseer queue use ZkNodeProps as general properties - Overseer.java:125)
Given that Node also has another meaning (A Node is a CoreContainer/JVM that
can contain multiple cores), I'm leaning toward renaming ZkNodeProps to
Replica, and making a truly generic class ZkProps that Replica, Slice, etc, can
subclass from.
Here's an example of the types of code changes I've been making to hopefully
make things more readable:
{code}
- for (Map.Entry<String,Slice> entry : slices.entrySet()) {
- Slice slice = entry.getValue();
- Map<String,ZkNodeProps> shards = slice.getShards();
- Set<Map.Entry<String,ZkNodeProps>> shardEntries = shards.entrySet();
- for (Map.Entry<String,ZkNodeProps> shardEntry : shardEntries) {
- final ZkNodeProps node = shardEntry.getValue();
- if
(clusterState.liveNodesContain(node.get(ZkStateReader.NODE_NAME_PROP))) {
- return new ZkCoreNodeProps(node).getCoreUrl();
+ for (Slice slice : slices.values()) {
+ for (Replica replica : slice.getReplicas()) {
+ if
(clusterState.liveNodesContain(replica.get(ZkStateReader.NODE_NAME_PROP))) {
+ return new ZkCoreNodeProps(replica).getCoreUrl();
{code}
Unfortunately, when I got all done, ZK related tests were no longer passing.
I'm going to try and make another attempt and see if I can make more
incremental changes (so that I can run tests periodically).
> shard splitting
> ---------------
>
> Key: SOLR-3755
> URL: https://issues.apache.org/jira/browse/SOLR-3755
> Project: Solr
> Issue Type: New Feature
> Components: SolrCloud
> Reporter: Yonik Seeley
> Attachments: SOLR-3755.patch, SOLR-3755.patch
>
>
> We can currently easily add replicas to handle increases in query volume, but
> we should also add a way to add additional shards dynamically by splitting
> existing shards.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]