[jira] Commented: (SOLR-1807) UpdateHandler plugin is not fully supported

2010-03-09 Thread John Wang (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843362#action_12843362
 ] 

John Wang commented on SOLR-1807:
-

bq. I almost think thats the lessor of two evils. While it breaks impls, those 
impls cannot fully work with Solr anyway.

I agree 100%

bq. ReplicationHandler

This is a terrific idea. This separates the concern with indexing updating and 
replication. 

> UpdateHandler plugin is not fully supported
> ---
>
> Key: SOLR-1807
> URL: https://issues.apache.org/jira/browse/SOLR-1807
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 1.4
>Reporter: John Wang
>
> UpdateHandler is published as a supported Plugin, but code such as the 
> following:
> if (core.getUpdateHandler() instanceof DirectUpdateHandler2) {
> ((DirectUpdateHandler2) 
> core.getUpdateHandler()).forceOpenWriter();
>   } else {
> LOG.warn("The update handler being used is not an instance or 
> sub-class of DirectUpdateHandler2. " +
> "Replicate on Startup cannot work.");
>   } 
> suggest that it is really not fully supported.
> Must all implementations of UpdateHandler be subclasses of 
> DirectUpdateHandler2 for it to work with replication?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1807) UpdateHandler plugin is not fully supported

2010-03-09 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843357#action_12843357
 ] 

Mark Miller commented on SOLR-1807:
---

bq. I guess the only way is to change the UpdateHandler interface.

I almost think thats the lessor of two evils. While it breaks impls, those 
impls cannot fully work with Solr anyway.

> UpdateHandler plugin is not fully supported
> ---
>
> Key: SOLR-1807
> URL: https://issues.apache.org/jira/browse/SOLR-1807
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 1.4
>Reporter: John Wang
>
> UpdateHandler is published as a supported Plugin, but code such as the 
> following:
> if (core.getUpdateHandler() instanceof DirectUpdateHandler2) {
> ((DirectUpdateHandler2) 
> core.getUpdateHandler()).forceOpenWriter();
>   } else {
> LOG.warn("The update handler being used is not an instance or 
> sub-class of DirectUpdateHandler2. " +
> "Replicate on Startup cannot work.");
>   } 
> suggest that it is really not fully supported.
> Must all implementations of UpdateHandler be subclasses of 
> DirectUpdateHandler2 for it to work with replication?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1807) UpdateHandler plugin is not fully supported

2010-03-09 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843356#action_12843356
 ] 

Hoss Man commented on SOLR-1807:


No all plugin APIs are created equal ... some like TokenizerFactories are 
designed to be extended by lots of people, others werent' particularly well 
thought out abstractions in the first place, and your milage may vary when 
implementing them -- feel free to post doc patches/suggestions to help make 
this more clear.

as to the specific problem...

Even if UpdateHandler had been an abstract class, at best we could have added a 
version of {{forceOpenWriter()}} that just threw an UnsupportedOpException -- 
there's no "default" impl we could have provided that would have worked for any 
possible UpdateHandler subclass people might have written.

The best conceivable solution we probably could have come up with at the time 
would be to introduce a marker interface that UpdateHandlers could optionaly 
implement containing the APIs needed to support replication, and make the 
ReplicationHandler test the registered UpdateHandler on startup to see if it 
implements that API, and if not then throw an error.

This type of solution could still be implemented today, in place of the 
"instanceof DirectUpdateHandler2" ... particularly now that the code has been 
vetted a little bit by users and we have a pretty good idea of what type of 
functionality an UpdateHandler needs to support in order to play nice with 
ReplicationHandler.



> UpdateHandler plugin is not fully supported
> ---
>
> Key: SOLR-1807
> URL: https://issues.apache.org/jira/browse/SOLR-1807
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 1.4
>Reporter: John Wang
>
> UpdateHandler is published as a supported Plugin, but code such as the 
> following:
> if (core.getUpdateHandler() instanceof DirectUpdateHandler2) {
> ((DirectUpdateHandler2) 
> core.getUpdateHandler()).forceOpenWriter();
>   } else {
> LOG.warn("The update handler being used is not an instance or 
> sub-class of DirectUpdateHandler2. " +
> "Replicate on Startup cannot work.");
>   } 
> suggest that it is really not fully supported.
> Must all implementations of UpdateHandler be subclasses of 
> DirectUpdateHandler2 for it to work with replication?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1807) UpdateHandler plugin is not fully supported

2010-03-06 Thread Shalin Shekhar Mangar (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842369#action_12842369
 ] 

Shalin Shekhar Mangar commented on SOLR-1807:
-

UpdateHandler is an interface so instead of adding a method to it and breaking 
compatibility, we added it to the DirectUpdateHandler2 class. I guess the only 
way is to change the UpdateHandler interface.

> UpdateHandler plugin is not fully supported
> ---
>
> Key: SOLR-1807
> URL: https://issues.apache.org/jira/browse/SOLR-1807
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 1.4
>Reporter: John Wang
>
> UpdateHandler is published as a supported Plugin, but code such as the 
> following:
> if (core.getUpdateHandler() instanceof DirectUpdateHandler2) {
> ((DirectUpdateHandler2) 
> core.getUpdateHandler()).forceOpenWriter();
>   } else {
> LOG.warn("The update handler being used is not an instance or 
> sub-class of DirectUpdateHandler2. " +
> "Replicate on Startup cannot work.");
>   } 
> suggest that it is really not fully supported.
> Must all implementations of UpdateHandler be subclasses of 
> DirectUpdateHandler2 for it to work with replication?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.