You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Jason Gerlowski (Jira)" <ji...@apache.org> on 2021/06/18 23:12:00 UTC

[jira] [Commented] (SOLR-15488) Unify package structure for v2 APIs

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

Jason Gerlowski commented on SOLR-15488:
----------------------------------------

I sortof lean towards doing the least change that gets us the benefit of clearer convention and organization with as little surgery as possible.

One way to do this would be to create a series of subpackages named 'api' in most of the places that v2 API classes currently exist.  Using the examples above, this would look something like:

- {{ClusterAPI}} would move from {{o.a.s.handler}} to {{o.a.s.handler.api}} (maybe it should go to the {{o.a.s.h.admin.api}} package, since that already exists and it is an admin API)
- {{ZooKeeperReadAPI}} woud move from {{o.a.s.handler.admin}} to {{o.a.s.handler.admin.api}}
- {{PackageAPI}} would move from {{o.a.s.pkg}} to {{o.a.s.pkg.api}}
- {{AddReplicaPropertyAPI}} would stay where it is in {{o.a.s.handler.admin.api}}

This steers clear of the scope creep that other options would raise, such as trying to move everything into feature-specific packages.  And it avoids superficial categorization by not just throwing everything in the same directory regardless of feature area. 

I'll take a crack at this to see how feasible it is.

> Unify package structure for v2 APIs
> -----------------------------------
>
>                 Key: SOLR-15488
>                 URL: https://issues.apache.org/jira/browse/SOLR-15488
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: v2 API
>    Affects Versions: main (9.0)
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Minor
>
> Currently, V2 APIs are scattered throughout solr-core's package structure.
> Some live in feature-specific packages (e.g. {{PackageAPI}} in {{org.apache.solr.pkg}}).  Some live alongside v1 "handler" code ({{ClusterAPI}} in {{org.apache.solr.handler}}), or in a feature specific package below that ({{ZookeeperReadAPI}} in {{org.apache.solr.handler.admin}}).  Some (the most recently created), live in a package intended for v2 APIs within the "handler" package (e.g. {{AddReplicaPropertyAPI}} in {{org.apache.solr.handler.admin.api}}).
> We should decided on the best place(s) for these classes to live, and realign them accordingly so that the convention is clear for future work on the v2 APIs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org