[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625289#action_12625289
 ] 

Noble Paul commented on SOLR-724:
-

bq.I'm just trying to reduce public method exposure. 

There is no harm is exposing methods as long as we are exposing immutable 
stuff. It can actually enable a lot of components to get information w/o 
raising new issues in JIRA

 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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



[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Henri Biestro (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625305#action_12625305
 ] 

Henri Biestro commented on SOLR-724:


I'm confused about when the 'what-if' rule can apply or not wrt public methods.
My understanding was that till a use-case exists, we shouldn't publicly expose 
the method ( and it's been quite a hard lesson... :-) )
Besides, the SolrResourceLoader *is* available from everywhere.

 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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



[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Henri Biestro (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625346#action_12625346
 ] 

Henri Biestro commented on SOLR-724:


When a method is public, it also has to be maintained  up-compatible; if you 
write a component that uses some private methods or members, that's your 
prerogative but there is no guarantee from Apache that it's existence and 
behavior will remain in the future.
In this issue, I'm stating that exposing Properties in the CoreDescriptor is 
hindering future evolution because they will have to be maintained, that the 
same information should be available from what I consider a narrower scope 
location that does not reduce the  functional possibilities.



 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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



[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Shalin Shekhar Mangar (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625369#action_12625369
 ] 

Shalin Shekhar Mangar commented on SOLR-724:


I feel that CoreContainer and CoreDescriptor seem to be the most logical place 
to *find* the properties since they directly correspond to the solr and 
core elements in solr.xml and SolrResourceLoader is the most logical place to 
*use* them since that's what we use to load config files. I think it should be 
OK to keep both the ways.

Thoughts?

 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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



[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Henri Biestro (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625377#action_12625377
 ] 

Henri Biestro commented on SOLR-724:



Obviously different :-)
In my mind, these are resources of the core-container / cores; resources are 
accessed through their respective ResourceLoader.
And the CoreDescriptor is, at its name hints, a parameter; it should not play 
any active role besides carrying data to create a SolrCore (and should not be 
used beyond that role).




 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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



[jira] Commented: (SOLR-724) CoreDescriptor.{get,set}CoreProperties should probably not be public (but package private)

2008-08-25 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12625390#action_12625390
 ] 

Mark Miller commented on SOLR-724:
--

I agree with Henri.

Having these methods public ties core properties to the CoreDescriptor for no 
apparent good reason. This has the possibility of being an annoyance down the 
road. Unless specifically needed, why create this burden? Keeping the link 
between core properties and the descriptor package private allows for more 
flexibility in the future - and will keep users happier - we don't want to have 
to deprecate and change user exposed APIs if we can help it.

bq. My understanding was that till a use-case exists, we shouldn't publicly 
expose the method ( and it's been quite a hard lesson...  )

I think this is a great rule of thumb, and should be the guiding principal 
here. Whats the use case that this solves beyond what using the resource loader 
provides? The benefit should clearly outweigh having to maintain/support the 
public API.

bq. Another question to ask before making things public is that can the user 
can alter some state in a way that can affect the functionality. If it is 
purely a read-only state I guess it should be OK

I think it goes further than this - there is a public link between the 
descriptor and the core properties. Its not a huge issue obviously, but there 
should be good reason for publicly linking two classes I think - the fact that 
the implementation contains the linked class privately doesn't seem like a very 
good reason.

- Mark 

 CoreDescriptor.{get,set}CoreProperties should probably not be public (but 
 package private)
 --

 Key: SOLR-724
 URL: https://issues.apache.org/jira/browse/SOLR-724
 Project: Solr
  Issue Type: Bug
Affects Versions: 1.3
Reporter: Henri Biestro
Priority: Minor

 Exposing them precludes being ever able to fill the CoreDescriptor with 
 property expressions.
 Since a 'public' method can not be removed easily, this is a future problem.
 Besides, as is, their is no reason for them to be public.

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